mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-10-07 08:24:11 +00:00
!33316 SetRootRect在主线程同步执行
Merge pull request !33316 from fangzhiyuan/0517_setRoot
This commit is contained in:
commit
f9db9fe409
@ -2040,8 +2040,9 @@ void UIContentImpl::UpdateViewportConfig(const ViewportConfig& config, OHOS::Ros
|
||||
pipelineContext->ChangeDarkModeBrightness(true);
|
||||
}
|
||||
};
|
||||
if (container->IsUseStageModel() && (reason == OHOS::Rosen::WindowSizeChangeReason::ROTATION ||
|
||||
reason == OHOS::Rosen::WindowSizeChangeReason::UPDATE_DPI_SYNC)) {
|
||||
if ((container->IsUseStageModel() && (reason == OHOS::Rosen::WindowSizeChangeReason::ROTATION ||
|
||||
reason == OHOS::Rosen::WindowSizeChangeReason::UPDATE_DPI_SYNC)) ||
|
||||
taskExecutor->WillRunOnCurrentThread(TaskExecutor::TaskType::PLATFORM)) {
|
||||
task();
|
||||
} else {
|
||||
AceViewportConfig aceViewportConfig(modifyConfig, reason, rsTransaction);
|
||||
|
@ -226,15 +226,14 @@ void PipelineBase::SetRootSize(double density, float width, float height)
|
||||
}
|
||||
context->SetRootRect(width, height);
|
||||
};
|
||||
#ifdef NG_BUILD
|
||||
if (taskExecutor_->WillRunOnCurrentThread(TaskExecutor::TaskType::UI)) {
|
||||
|
||||
auto container = Container::GetContainer(instanceId_);
|
||||
auto settings = container->GetSettings();
|
||||
if (settings.usePlatformAsUIThread && settings.useUIAsJSThread) {
|
||||
task();
|
||||
} else {
|
||||
taskExecutor_->PostTask(task, TaskExecutor::TaskType::UI, "ArkUISetRootSize");
|
||||
}
|
||||
#else
|
||||
taskExecutor_->PostTask(task, TaskExecutor::TaskType::UI, "ArkUISetRootSize");
|
||||
#endif
|
||||
}
|
||||
|
||||
void PipelineBase::SetFontScale(float fontScale)
|
||||
|
Loading…
Reference in New Issue
Block a user