1 /*
2  * Copyright (C) 2020 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 #pragma once
18 
19 #include <aidl/com/google/hardware/pixel/display/BnDisplay.h>
20 #include <hwc_session.h>
21 
22 namespace aidl {
23 namespace com {
24 namespace google {
25 namespace hardware {
26 namespace pixel {
27 namespace display {
28 
29 using sdm::HWCSession;
30 
31 // Default implementation
32 class Display : public BnDisplay {
33   public:
34     Display(HWCSession *hwc_session);
35 
36     ndk::ScopedAStatus isHbmSupported(bool *_aidl_return) override;
37     ndk::ScopedAStatus setHbmState(HbmState state) override;
38     ndk::ScopedAStatus getHbmState(HbmState *_aidl_return) override;
39     ndk::ScopedAStatus isLbeSupported(bool *_aidl_return) override;
40     ndk::ScopedAStatus setLbeState(LbeState state) override;
41     ndk::ScopedAStatus setLbeAmbientLight(int ambientLux) override;
42     ndk::ScopedAStatus getLbeState(LbeState *_aidl_return) override;
43   private:
44     HWCSession *mHWCSession = nullptr;
45 };
46 }  // namespace display
47 }  // namespace pixel
48 }  // namespace hardware
49 }  // namespace google
50 }  // namespace com
51 }  // namespace aidl
52