1 /*
2  * Copyright 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 
17 #pragma once
18 
19 #include <compositionengine/DisplayColorProfile.h>
20 #include <gmock/gmock.h>
21 #include <ui/HdrCapabilities.h>
22 
23 namespace android::compositionengine::mock {
24 
25 class DisplayColorProfile : public compositionengine::DisplayColorProfile {
26 public:
27     DisplayColorProfile();
28     ~DisplayColorProfile() override;
29 
30     MOCK_CONST_METHOD0(isValid, bool());
31 
32     MOCK_CONST_METHOD1(hasRenderIntent, bool(ui::RenderIntent));
33     MOCK_CONST_METHOD1(hasLegacyHdrSupport, bool(ui::Dataspace));
34     MOCK_CONST_METHOD5(getBestColorMode,
35                        void(ui::Dataspace, ui::RenderIntent, ui::Dataspace*, ui::ColorMode*,
36                             ui::RenderIntent*));
37     MOCK_CONST_METHOD0(hasWideColorGamut, bool());
38     MOCK_CONST_METHOD0(getSupportedPerFrameMetadata, int32_t());
39     MOCK_CONST_METHOD0(hasHDR10PlusSupport, bool());
40     MOCK_CONST_METHOD0(hasHDR10Support, bool());
41     MOCK_CONST_METHOD0(hasHLGSupport, bool());
42     MOCK_CONST_METHOD0(hasDolbyVisionSupport, bool());
43 
44     MOCK_CONST_METHOD0(getHdrCapabilities, const HdrCapabilities&());
45     MOCK_CONST_METHOD1(isDataspaceSupported, bool(ui::Dataspace));
46 
47     MOCK_CONST_METHOD1(dump, void(std::string&));
48 };
49 
50 } // namespace android::compositionengine::mock
51