blob: 4ccafa740652fb0fc4cc844958d214e187fcf9e4
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 ICOMPOSER_H |
19 | #define ICOMPOSER_H |
20 | |
21 | #include <HwcLayer.h> |
22 | |
23 | namespace android { |
24 | namespace amlogic { |
25 | |
26 | // aml composer interface |
27 | class IComposer { |
28 | public: |
29 | IComposer() {} |
30 | virtual ~IComposer() {} |
31 | public: |
32 | virtual bool initialize(framebuffer_info_t* fbInfo) = 0; |
33 | virtual void deinitialize() = 0; |
34 | virtual int32_t startCompose(Vector< hwc2_layer_t > hwcLayers, int32_t *offset = 0, int32_t frameCount = 0) = 0; |
35 | virtual const char* getName() const = 0; |
36 | // virtual void setCurGlesFbSlot(uint32_t slot) = 0; |
37 | virtual const buffer_handle_t getBufHnd() = 0; |
38 | virtual void mergeRetireFence(int32_t slot, int32_t retireFence) = 0; |
39 | virtual void removeRetireFence(int32_t slot) = 0; |
40 | virtual void setVideoOverlayLayerId(hwc2_layer_t layerId) = 0; |
41 | virtual void fillRectangle(hwc_rect_t clipRect, uint32_t color, uint32_t offset, int shared_fd) = 0; |
42 | }; |
43 | |
44 | } |
45 | } |
46 | |
47 | #endif /* IDISPLAY_DEVICE_H */ |
48 |