From 039a475bf734550617c42a2b6f78267b454649e9 Mon Sep 17 00:00:00 2001 From: lancer <591320480@qq.com> Date: Wed, 16 Nov 2022 17:13:42 +0800 Subject: [PATCH] fixed 02443c0 from https://gitee.com/shengu_lancer/graphic_ui/pulls/812 Description: unlock immediately after finish render IssueNo:https://gitee.com/openharmony/graphic_ui/issues/I61IQH Feature or Bugfix: Bugfix Binary Source:NO Signed-off-by: lancer --- frameworks/components/root_view.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frameworks/components/root_view.cpp b/frameworks/components/root_view.cpp index 8bbe2a8..4ee6963 100644 --- a/frameworks/components/root_view.cpp +++ b/frameworks/components/root_view.cpp @@ -544,6 +544,10 @@ void RootView::Render() invalidateRects_.Clear(); #endif +#if defined __linux__ || defined __LITEOS__ || defined __APPLE__ + pthread_mutex_unlock(&lock_); +#endif + #if ENABLE_WINDOW if (boundWindow_) { boundWindow_->Flush(); @@ -551,10 +555,11 @@ void RootView::Render() } #endif BaseGfxEngine::GetInstance()->Flush(flushRect); - } + } else { #if defined __linux__ || defined __LITEOS__ || defined __APPLE__ pthread_mutex_unlock(&lock_); #endif + } } void RootView::BlitMapBuffer(Rect& curViewRect, TransformMap& transMap, const Rect& invalidatedArea) -- GitLab