blob: 26baa3fba634465cbb3b4580fee8be90ab0789aa
1 | /* |
2 | // Copyright (c) 2016 Amlogic |
3 | // |
4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
5 | // you may not use this file except in compliance with the License. |
6 | // You may obtain a copy of the License at |
7 | // |
8 | // http://www.apache.org/licenses/LICENSE-2.0 |
9 | // |
10 | // Unless required by applicable law or agreed to in writing, software |
11 | // distributed under the License is distributed on an "AS IS" BASIS, |
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | // See the License for the specific language governing permissions and |
14 | // limitations under the License. |
15 | // |
16 | */ |
17 | |
18 | #ifndef COMPOSERS_H |
19 | #define COMPOSERS_H |
20 | |
21 | #include <IComposer.h> |
22 | |
23 | namespace android { |
24 | namespace amlogic { |
25 | |
26 | // class IComposer; |
27 | class IDisplayDevice; |
28 | |
29 | class Composers :public IComposer { |
30 | public: |
31 | Composers(IDisplayDevice& disp); |
32 | virtual ~Composers(); |
33 | |
34 | public: |
35 | |
36 | virtual bool initialize(framebuffer_info_t* fbInfo); |
37 | virtual void deinitialize(); |
38 | virtual int32_t startCompose(Vector< hwc2_layer_t > hwcLayers, int32_t *offset = 0, int32_t frameCount = 0) = 0; |
39 | virtual const char* getName() const = 0; |
40 | // virtual void setCurGlesFbSlot(uint32_t slot) = 0; |
41 | virtual const buffer_handle_t getBufHnd() = 0; |
42 | virtual void mergeRetireFence(int32_t slot, int32_t retireFence) = 0; |
43 | virtual void removeRetireFence(int32_t slot) = 0; |
44 | virtual void setVideoOverlayLayerId(hwc2_layer_t layerId) = 0; |
45 | virtual void fillRectangle(hwc_rect_t clipRect, uint32_t color, uint32_t offset, int shared_fd) = 0; |
46 | |
47 | private: |
48 | IDisplayDevice& mDisplayDevice; |
49 | |
50 | bool mInitialized; |
51 | }; |
52 | |
53 | } // namespace amlogic |
54 | } // namespace android |
55 | |
56 | |
57 | #endif /* COMPOSERS_H */ |
58 | |
59 |