summaryrefslogtreecommitdiff
path: root/hwc2/common/composers/IComposeDevice.h (plain)
blob: 74e2829111fd531b84183ff6815937290548fb7f
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 __AM_COMPOSER_H
19#define __AM_COMPOSER_H
20
21#include <gralloc_priv.h>
22#include <framebuffer.h>
23#include <HwcLayer.h>
24
25namespace android {
26namespace amlogic {
27
28class IDisplayDevice;
29
30class IComposeDevice {
31public:
32 IComposeDevice(IDisplayDevice& disp);
33 virtual ~IComposeDevice();
34
35public:
36
37 virtual bool initialize(framebuffer_info_t* fbInfo);
38 virtual void deinitialize();
39 virtual int32_t startCompose(Vector< hwc2_layer_t > hwcLayers, int32_t *offset = 0, int32_t frameCount = 0) = 0;
40 virtual const char* getName() const = 0;
41 // virtual void setCurGlesFbSlot(uint32_t slot) = 0;
42 virtual const buffer_handle_t getBufHnd() = 0;
43 virtual void mergeRetireFence(int32_t slot, int32_t retireFence) = 0;
44 virtual void removeRetireFence(int32_t slot) = 0;
45 virtual void setVideoOverlayLayerId(hwc2_layer_t layerId) = 0;
46 virtual void fillRectangle(hwc_rect_t clipRect, uint32_t color, uint32_t offset, int shared_fd) = 0;
47
48private:
49 IDisplayDevice& mDisplayDevice;
50
51 bool mInitialized;
52};
53
54} // namespace amlogic
55} // namespace android
56
57
58#endif /* __AM_COMPOSER_H */
59
60