提交 60650e7e 编写于 作者: G guyuanzhang

Description:fix render lock

Sig:graphic
Feature or Bugfix:Feature
Binary Source:No

Change-Id: I9ff7cef73694f6c29a9ab90214ba484553caf351
上级 91376559
...@@ -473,16 +473,21 @@ void RootView::Render() ...@@ -473,16 +473,21 @@ void RootView::Render()
#if defined __linux__ || defined __LITEOS__ || defined __APPLE__ #if defined __linux__ || defined __LITEOS__ || defined __APPLE__
pthread_mutex_lock(&lock_); pthread_mutex_lock(&lock_);
#endif #endif
Rect invalidRectTmp = invalidRect_;
invalidRect_ = {0, 0, 0, 0};
bool renderFlagTmp = renderFlag_;
renderFlag_ = false;
#if defined __linux__ || defined __LITEOS__ || defined __APPLE__
pthread_mutex_unlock(&lock_);
#endif
#if LOCAL_RENDER #if LOCAL_RENDER
if (!invalidateMap_.empty()) { if (!invalidateMap_.empty()) {
RenderManager::RenderRect(GetRect(), this); RenderManager::RenderRect(GetRect(), this);
invalidateMap_.clear(); invalidateMap_.clear();
#else #else
if (renderFlag_) { if (renderFlagTmp) {
RenderManager::RenderRect(invalidRect_, this); RenderManager::RenderRect(invalidRectTmp, this);
invalidRect_ = {0, 0, 0, 0};
renderFlag_ = false;
#endif #endif
#if ENABLE_WINDOW #if ENABLE_WINDOW
...@@ -493,10 +498,6 @@ void RootView::Render() ...@@ -493,10 +498,6 @@ void RootView::Render()
#endif #endif
BaseGfxEngine::GetInstance()->Flush(); BaseGfxEngine::GetInstance()->Flush();
} }
#if defined __linux__ || defined __LITEOS__ || defined __APPLE__
pthread_mutex_unlock(&lock_);
#endif
} }
void RootView::BlitMapBuffer(Rect& curViewRect, TransformMap& transMap, const Rect& invalidatedArea) void RootView::BlitMapBuffer(Rect& curViewRect, TransformMap& transMap, const Rect& invalidatedArea)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册