缩放动效维测黄蓝同步

Signed-off-by: link <18727210873@163.com>
This commit is contained in:
link 2024-09-27 15:09:26 +08:00
parent 43edbdcee6
commit 50932f835b
3 changed files with 19 additions and 2 deletions

View File

@ -2380,8 +2380,10 @@ void UIContentImpl::UpdateViewportConfig(const ViewportConfig& config, OHOS::Ros
const std::shared_ptr<OHOS::Rosen::RSTransaction>& rsTransaction,
const std::map<OHOS::Rosen::AvoidAreaType, OHOS::Rosen::AvoidArea>& avoidAreas)
{
PerfMonitor::GetPerfMonitor()->RecordWindowRectResize(static_cast<OHOS::Ace::WindowSizeChangeReason>(reason),
bundleName_);
if (SystemProperties::GetWindowRectResizeEnabled()) {
PerfMonitor::GetPerfMonitor()->RecordWindowRectResize(static_cast<OHOS::Ace::WindowSizeChangeReason>(reason),
bundleName_);
}
UpdateViewportConfigWithAnimation(config, reason, {}, rsTransaction, avoidAreas);
}

View File

@ -148,6 +148,11 @@ bool IsDeveloperModeOn()
return (system::GetParameter("const.security.developermode.state", "false") == "true");
}
bool IsWindowRectResizeEnabled()
{
return (system::GetParameter("persist.ace.windowresize.enabled", "true") == "true");
}
bool IsHookModeEnabled()
{
#ifdef PREVIEW
@ -413,6 +418,7 @@ bool SystemProperties::imageFileCacheConvertAstc_ = GetImageFileCacheConvertToAs
int32_t SystemProperties::imageFileCacheConvertAstcThreshold_ = GetImageFileCacheConvertAstcThresholdProp();
ACE_WEAK_SYM bool SystemProperties::extSurfaceEnabled_ = IsExtSurfaceEnabled();
ACE_WEAK_SYM uint32_t SystemProperties::dumpFrameCount_ = GetSysDumpFrameCount();
ACE_WEAK_SYM bool SystemProperties::windowRectResizeEnabled_ = IsWindowRectResizeEnabled();
bool SystemProperties::enableScrollableItemPool_ = IsEnableScrollableItemPool();
bool SystemProperties::resourceDecoupling_ = IsResourceDecoupling();
bool SystemProperties::navigationBlurEnabled_ = IsNavigationBlurEnabled();
@ -574,6 +580,7 @@ void SystemProperties::InitDeviceInfo(
sideBarContainerBlurEnable_ = IsSideBarContainerBlurEnable();
acePerformanceMonitorEnable_.store(IsAcePerformanceMonitorEnabled());
faultInjectEnabled_ = IsFaultInjectEnabled();
windowRectResizeEnabled_ = IsWindowRectResizeEnabled();
if (isRound_) {
screenShape_ = ScreenShape::ROUND;
} else {
@ -759,6 +766,11 @@ void SystemProperties::AddWatchSystemParameter(const char* key, void* context, E
WatchParameter(key, callback, context);
}
ACE_WEAK_SYM bool SystemProperties::GetWindowRectResizeEnabled()
{
return windowRectResizeEnabled_;
}
void SystemProperties::RemoveWatchSystemParameter(
const char* key, void* context, EnableSystemParameterCallback callback)
{

View File

@ -471,6 +471,8 @@ public:
return astcEnabled_;
}
static bool GetWindowRectResizeEnabled();
static int32_t GetAstcMaxError()
{
return astcMax_;
@ -660,6 +662,7 @@ private:
static float dragStartPanDisThreshold_;
static float fontScale_;
static float fontWeightScale_;
static bool windowRectResizeEnabled_;
static FoldScreenType foldScreenType_;
};