• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_COLOR_SPACE_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_COLOR_SPACE_H
18 
19 #include <memory>
20 
21 namespace OHOS::Ace::Testing {
22 enum class TestingCMSTransferFuncType {
23     SRGB,
24     DOT2,
25     LINEAR,
26     REC2020,
27 };
28 
29 enum class TestingCMSMatrixType {
30     SRGB,
31     ADOBE_RGB,
32     DCIP3,
33     REC2020,
34     XYZ,
35 };
36 
37 enum class TestingClamp {
38     NO_CLAMP,
39     YES_CLAMP,
40 };
41 
42 class TestingColorSpace {
43 public:
44     TestingColorSpace() = default;
45     virtual ~TestingColorSpace() = default;
46 
CreateSRGB()47     static std::shared_ptr<TestingColorSpace> CreateSRGB()
48     {
49         return std::make_shared<TestingColorSpace>();
50     }
51 
CreateRGB(const TestingCMSTransferFuncType & func,const TestingCMSMatrixType & matrix)52     static std::shared_ptr<TestingColorSpace> CreateRGB(
53         const TestingCMSTransferFuncType& func, const TestingCMSMatrixType& matrix)
54     {
55         return std::make_shared<TestingColorSpace>();
56     }
57 };
58 } // namespace OHOS::Ace::Testing
59 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_COLOR_SPACE_H