1 /*
2 * Copyright (C) 2019 The Android Open Source Project
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 #undef LOG_TAG
17 #define LOG_TAG "virtualdisplaymodule"
18
19 #include "ExynosVirtualDisplayModule.h"
20
21 using namespace gs101;
22
ExynosVirtualDisplayModule(uint32_t index,ExynosDevice * device)23 ExynosVirtualDisplayModule::ExynosVirtualDisplayModule(uint32_t index, ExynosDevice *device)
24 : ExynosVirtualDisplay(index, device)
25 {
26 mGLESFormat = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M;
27
28 if (device == NULL) {
29 ALOGE("Display creation failed!");
30 }
31
32 mBaseWindowIndex = 0;
33 mMaxWindowNum = 0;
34 }
35
~ExynosVirtualDisplayModule()36 ExynosVirtualDisplayModule::~ExynosVirtualDisplayModule ()
37 {
38
39 }
40
getDisplayAttribute(hwc2_config_t __unused config,int32_t __unused attribute,int32_t * __unused outValue)41 int32_t ExynosVirtualDisplayModule::getDisplayAttribute(
42 hwc2_config_t __unused config,
43 int32_t /*hwc2_attribute_t*/ __unused attribute, int32_t* __unused outValue)
44 {
45 switch(attribute) {
46 default:
47 ALOGE("unknown display attribute %u", attribute);
48 return -EINVAL;
49 }
50 return HWC2_ERROR_NONE;
51 }
52
53