1 /* 2 * Copyright (c) 2025 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 MULTISCREEN_PARAM_H 17 #define MULTISCREEN_PARAM_H 18 19 #include "draw/canvas.h" 20 #include "feature_param.h" 21 22 namespace OHOS::Rosen { 23 class MultiScreenParam : public FeatureParam { 24 public: 25 MultiScreenParam() = default; 26 ~MultiScreenParam() = default; 27 28 static bool IsExternalScreenSecure(); 29 static bool IsSlrScaleEnabled(); 30 static bool IsRsReportHwcDead(); 31 static bool IsRsSetScreenPowerStatus(); 32 static bool IsMirrorDisplayCloseP3(); 33 static Drawing::MipmapMode GetMipmapMode(); 34 35 protected: 36 static void SetExternalScreenSecure(bool isSecure); 37 static void SetSlrScaleEnabled(bool isEnabled); 38 static void SetRsReportHwcDead(bool isEnabled); 39 static void SetRsSetScreenPowerStatus(bool isEnabled); 40 static void SetMirrorDisplayCloseP3(bool isEnabled); 41 static void SetMipmapMode(Drawing::MipmapMode modeValue); 42 43 private: 44 inline static bool isExternalScreenSecure_ = false; 45 inline static bool isSlrScaleEnabled_ = false; 46 inline static bool isRsReportHwcDead_ = false; 47 inline static bool isRsSetScreenPowerStatus_ = true; 48 inline static bool isMirrorDisplayCloseP3_ = true; 49 inline static Drawing::MipmapMode mipMapModeValue_ = Drawing::MipmapMode::NEAREST; 50 51 friend class MultiScreenParamParse; 52 }; 53 } // namespace OHOS::Rosen 54 #endif // MULTISCREEN_PARAM_H