提交 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()
#if defined __linux__ || defined __LITEOS__ || defined __APPLE__
pthread_mutex_lock(&lock_);
#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 (!invalidateMap_.empty()) {
RenderManager::RenderRect(GetRect(), this);
invalidateMap_.clear();
#else
if (renderFlag_) {
RenderManager::RenderRect(invalidRect_, this);
invalidRect_ = {0, 0, 0, 0};
renderFlag_ = false;
if (renderFlagTmp) {
RenderManager::RenderRect(invalidRectTmp, this);
#endif
#if ENABLE_WINDOW
......@@ -493,10 +498,6 @@ void RootView::Render()
#endif
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册