提高更新数据和UI任务的优先级,修复同一提供方的多张卡片同时恢复会闪一下问题

Signed-off-by: s00800643 <shuxinyue1@huawei.com>
Change-Id: Id9406acc24037e8c872d68d718c77b65d66750c0
This commit is contained in:
s00800643 2024-07-22 10:07:31 +08:00
parent a135c6b9e5
commit da36b2177a
2 changed files with 3 additions and 4 deletions

View File

@ -77,6 +77,7 @@ UIContentErrorCode FormFrontendDeclarative::RunDynamicPage(
void FormFrontendDeclarative::UpdateData(const std::string& dataList)
{
CHECK_NULL_VOID(taskExecutor_);
// eTSCard UI == Main JS/UI/PLATFORM
taskExecutor_->PostTask(
[weak = AceType::WeakClaim(this), dataList] {
auto frontend = weak.Upgrade();
@ -84,7 +85,7 @@ void FormFrontendDeclarative::UpdateData(const std::string& dataList)
frontend->UpdatePageData(dataList);
}
},
TaskExecutor::TaskType::UI, "ArkUIFormFrontendUpdatePageData"); // eTSCard UI == Main JS/UI/PLATFORM
TaskExecutor::TaskType::UI, "ArkUIFormFrontendUpdatePageData", PriorityType::HIGH);
}
void FormFrontendDeclarative::UpdatePageData(const std::string& dataList)

View File

@ -82,9 +82,7 @@ FormRenderWindow::FormRenderWindow(RefPtr<TaskExecutor> taskExecutor, int32_t id
return;
}
uiTaskRunner.PostTask([callback = std::move(onVsync)]() {
callback();
}, "ArkUIFormRenderWindowVsync");
taskExecutor->PostTask(onVsync, TaskExecutor::TaskType::UI, "ArkUIFormRenderWindowVsync", PriorityType::VIP);
};
frameCallback_.userData_ = nullptr;