blob: 979a5f79ab2c351928f7ad2a24af41df8e8d8f49
1 | /* |
2 | // Copyright (c) 2014 Intel Corporation |
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 | // This file is modified by Amlogic, Inc. 2017.01.17. |
17 | */ |
18 | |
19 | #ifndef PRIMARY_DEVICE_H |
20 | #define PRIMARY_DEVICE_H |
21 | |
22 | #include <utils/KeyedVector.h> |
23 | #include <PhysicalDevice.h> |
24 | #include <IComposerFactory.h> |
25 | |
26 | namespace android { |
27 | namespace amlogic { |
28 | |
29 | |
30 | class PrimaryDevice : public PhysicalDevice { |
31 | public: |
32 | PrimaryDevice(Hwcomposer& hwc, DeviceControlFactory *composer); |
33 | virtual ~PrimaryDevice(); |
34 | public: |
35 | virtual bool initialize(); |
36 | virtual void deinitialize(); |
37 | virtual int32_t createVirtualDisplay(uint32_t width, uint32_t height, int32_t* format, hwc2_display_t* outDisplay){ return HWC2_ERROR_NONE; } |
38 | virtual int32_t destroyVirtualDisplay(hwc2_display_t display) { return HWC2_ERROR_NONE; } |
39 | virtual int32_t setOutputBuffer(buffer_handle_t buffer, int32_t releaseFence) { return HWC2_ERROR_NONE; } |
40 | |
41 | private: |
42 | static void hotplugEventListener(void *data, bool status); |
43 | void hotplugListener(bool connected); |
44 | }; |
45 | |
46 | } |
47 | } |
48 | |
49 | #endif /* PRIMARY_DEVICE_H */ |
50 |