From 75bf03d7aee68a2146277de7ff0ae1c757bef0a7 Mon Sep 17 00:00:00 2001 From: keminLuo Date: Sat, 18 Jan 2025 15:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3PR605=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E5=AF=BC=E8=87=B4=E7=9A=84=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: keminLuo --- shell/platform/ohos/ohos_shell_holder.cpp | 2 +- shell/platform/ohos/vsync_waiter_ohos.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/shell/platform/ohos/ohos_shell_holder.cpp b/shell/platform/ohos/ohos_shell_holder.cpp index 980c63fee5..980840cee1 100644 --- a/shell/platform/ohos/ohos_shell_holder.cpp +++ b/shell/platform/ohos/ohos_shell_holder.cpp @@ -149,7 +149,7 @@ OHOSShellHolder::OHOSShellHolder( auto vsync_waiter = std::shared_ptr(shell_->GetVsyncWaiter().lock()); auto vsync_waiter_ohos = std::static_pointer_cast(vsync_waiter); displays.push_back(std::make_unique(vsync_waiter_ohos)); - shell_->OnDisplayUpdates(DisplayUpdateType::kStartUp, std::move(displays)); + shell_->OnDisplayUpdates(DisplayUpdateType::kStartup, std::move(displays)); shell_->GetDartVM()->GetConcurrentMessageLoop()->PostTaskToAllWorkers([]() { if (::setpriority(PRIO_PROCESS, gettid(), 1) != 0) { diff --git a/shell/platform/ohos/vsync_waiter_ohos.h b/shell/platform/ohos/vsync_waiter_ohos.h index 020b804cdf..51f0ab05bd 100644 --- a/shell/platform/ohos/vsync_waiter_ohos.h +++ b/shell/platform/ohos/vsync_waiter_ohos.h @@ -46,12 +46,10 @@ private: fml::TimePoint frame_start_time, fml::TimePoint frame_target_time); void SetDvsyncSwitch(bool enableDvsync); - std::atomic dvsyncEnabled{false}; + std::atomic dvsyncEnabled{false}; thread_local static bool firstCall; OH_NativeVSync* vsyncHandle; - FML_DISALLOW_COPY_AND_ASSIGN(VsyncWaiterOHOS); - OH_NativeVSync* vsyncHandle; NativeDvsyncFunc nativeDvsyncFunc_ = nullptr; void *handle_ = nullptr; int32_t apiVersion_ = 0; -- Gitee