!36459 像素取整调试开关性能优化

Merge pull request !36459 from 郝烁/master
This commit is contained in:
openharmony_ci 2024-06-27 04:26:31 +00:00 committed by Gitee
commit c2c1a3fa2e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 13 additions and 8 deletions

View File

@ -363,6 +363,7 @@ bool SystemProperties::traceInputEventEnable_ = IsTraceInputEventEnabled() && de
bool SystemProperties::stateManagerEnable_ = IsStateManagerEnable();
bool SystemProperties::buildTraceEnable_ = IsBuildTraceEnabled() && developerModeOn_;
bool SystemProperties::syncDebugTraceEnable_ = IsSyncDebugTraceEnabled();
bool SystemProperties::pixelRoundEnable_ = IsPixelRoundEnabled();
bool SystemProperties::textTraceEnable_ = IsTextTraceEnabled();
bool SystemProperties::accessTraceEnable_ = IsAccessTraceEnabled();
bool SystemProperties::accessibilityEnabled_ = IsAccessibilityEnabled();
@ -548,6 +549,7 @@ void SystemProperties::InitDeviceInfo(
stateManagerEnable_ = IsStateManagerEnable();
buildTraceEnable_ = IsBuildTraceEnabled() && developerModeOn_;
syncDebugTraceEnable_ = IsSyncDebugTraceEnabled();
pixelRoundEnable_ = IsPixelRoundEnabled();
accessibilityEnabled_ = IsAccessibilityEnabled();
canvasDebugMode_ = ReadCanvasDebugMode();
isHookModeEnabled_ = IsHookModeEnabled();
@ -664,7 +666,7 @@ bool SystemProperties::GetDebugPixelMapSaveEnabled()
return system::GetBoolParameter("persist.ace.save.pixelmap.enabled", false);
}
bool SystemProperties::GetPixelRoundEnable()
bool SystemProperties::IsPixelRoundEnabled()
{
return system::GetBoolParameter("ace.debug.pixelround.enabled", true);
}

View File

@ -45,6 +45,7 @@ bool SystemProperties::traceInputEventEnable_ = false;
bool SystemProperties::stateManagerEnable_ = false;
bool SystemProperties::buildTraceEnable_ = false;
bool SystemProperties::syncDebugTraceEnable_ = false;
bool SystemProperties::pixelRoundEnable_ = true;
bool SystemProperties::textTraceEnable_ = false;
bool SystemProperties::accessTraceEnable_ = false;
bool SystemProperties::accessibilityEnabled_ = false;
@ -248,11 +249,6 @@ bool SystemProperties::GetDebugPixelMapSaveEnabled()
return false;
}
bool SystemProperties::GetPixelRoundEnable()
{
return true;
}
bool SystemProperties::GetResourceDecoupling()
{
return true;

View File

@ -231,7 +231,7 @@ public:
static bool GetDebugPixelMapSaveEnabled();
static bool GetPixelRoundEnable();
static bool IsPixelRoundEnabled();
static bool GetRosenBackendEnabled()
{
@ -283,6 +283,11 @@ public:
return syncDebugTraceEnable_;
}
static bool GetPixelRoundEnabled()
{
return pixelRoundEnable_;
}
static bool GetTextTraceEnabled()
{
return textTraceEnable_;
@ -541,6 +546,7 @@ private:
static bool traceInputEventEnable_;
static bool buildTraceEnable_;
static bool syncDebugTraceEnable_;
static bool pixelRoundEnable_;
static bool textTraceEnable_;
static bool accessTraceEnable_;
static bool accessibilityEnabled_;

View File

@ -6138,7 +6138,7 @@ void RosenRenderContext::SavePaintRect(bool isRound, uint8_t flag)
const auto& geometryNode = host->GetGeometryNode();
CHECK_NULL_VOID(geometryNode);
AdjustPaintRect();
if (!SystemProperties::GetPixelRoundEnable()) {
if (!SystemProperties::GetPixelRoundEnabled()) {
isRound = false;
}
if (Container::GreatOrEqualAPITargetVersion(PlatformVersion::VERSION_TWELVE)) {

View File

@ -41,6 +41,7 @@ bool SystemProperties::layoutTraceEnable_ = false;
bool SystemProperties::traceInputEventEnable_ = false;
bool SystemProperties::buildTraceEnable_ = false;
bool SystemProperties::syncDebugTraceEnable_ = false;
bool SystemProperties::pixelRoundEnable_ = true;
bool SystemProperties::textTraceEnable_ = false;
double SystemProperties::resolution_ = 0.0;
constexpr float defaultAnimationScale = 1.0f;