1 /*
2  * Copyright 2022 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 
17 #include "NoOpFrameComposer.h"
18 
19 #include "Display.h"
20 #include "Drm.h"
21 #include "Layer.h"
22 
23 namespace aidl::android::hardware::graphics::composer3::impl {
24 
init()25 HWC3::Error NoOpFrameComposer::init() {
26     DEBUG_LOG("%s", __FUNCTION__);
27 
28     return HWC3::Error::None;
29 }
30 
registerOnHotplugCallback(const HotplugCallback &)31 HWC3::Error NoOpFrameComposer::registerOnHotplugCallback(const HotplugCallback&) {
32     DEBUG_LOG("%s", __FUNCTION__);
33 
34     return HWC3::Error::None;
35 }
36 
unregisterOnHotplugCallback()37 HWC3::Error NoOpFrameComposer::unregisterOnHotplugCallback() {
38     DEBUG_LOG("%s", __FUNCTION__);
39 
40     return HWC3::Error::None;
41 }
42 
onDisplayCreate(Display *)43 HWC3::Error NoOpFrameComposer::onDisplayCreate(Display*) {
44     DEBUG_LOG("%s", __FUNCTION__);
45 
46     return HWC3::Error::None;
47 }
48 
onDisplayDestroy(Display *)49 HWC3::Error NoOpFrameComposer::onDisplayDestroy(Display*) {
50     DEBUG_LOG("%s", __FUNCTION__);
51 
52     return HWC3::Error::None;
53 }
54 
onDisplayClientTargetSet(Display *)55 HWC3::Error NoOpFrameComposer::onDisplayClientTargetSet(Display*) {
56     DEBUG_LOG("%s", __FUNCTION__);
57 
58     return HWC3::Error::None;
59 }
60 
onActiveConfigChange(Display *)61 HWC3::Error NoOpFrameComposer::onActiveConfigChange(Display*) {
62     DEBUG_LOG("%s", __FUNCTION__);
63 
64     return HWC3::Error::None;
65 };
66 
validateDisplay(Display *,DisplayChanges *)67 HWC3::Error NoOpFrameComposer::validateDisplay(Display*, DisplayChanges*) {
68     DEBUG_LOG("%s", __FUNCTION__);
69 
70     return HWC3::Error::None;
71 }
72 
presentDisplay(Display *,::android::base::unique_fd *,std::unordered_map<int64_t,::android::base::unique_fd> *)73 HWC3::Error NoOpFrameComposer::presentDisplay(
74     Display*, ::android::base::unique_fd*,
75     std::unordered_map<int64_t, ::android::base::unique_fd>* /*outLayerFences*/) {
76     DEBUG_LOG("%s", __FUNCTION__);
77 
78     return HWC3::Error::None;
79 }
80 
81 }  // namespace aidl::android::hardware::graphics::composer3::impl
82