!17322 trans-window blur delay display bugfix

Merge pull request !17322 from 肖邵安/master
This commit is contained in:
openharmony_ci 2024-11-22 02:12:35 +00:00 committed by Gitee
commit 07cc32c573
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 22 additions and 4 deletions

View File

@ -2089,6 +2089,10 @@ void RSMainThread::UniRender(std::shared_ptr<RSBaseRenderNode> rootNode)
RS_TRACE_NAME("RSMainThread::UniRender ForceUpdateUniRender");
} else if (!pendingUiCaptureTasks_.empty()) {
RS_LOGD("RSMainThread::Render pendingUiCaptureTasks_ not empty");
} else if (needRequestNextVsyncDrawBehindWindow_) {
RS_LOGD("RSMainThread::UniRender NeedRequestNextVsyncDrawBehindWindow");
RS_OPTIONAL_TRACE_NAME_FMT("RSMainThread::UniRender NeedRequestNextVsyncDrawBehindWindow");
needRequestNextVsyncDrawBehindWindow_ = false;
} else {
needDrawFrame_ = false;
RS_LOGD("RSMainThread::Render nothing to update");

View File

@ -347,6 +347,16 @@ public:
return needRequestNextVsyncAnimate_;
}
bool GetNextDVsyncDrawBehindWindowFlag() const
{
return needRequestNextVsyncDrawBehindWindow_;
}
void SetNextDVsyncDrawBehindWindowFlag(bool flag)
{
needRequestNextVsyncDrawBehindWindow_ = flag;
}
bool IsFirstFrameOfPartialRender() const
{
return isFirstFrameOfPartialRender_;
@ -699,6 +709,8 @@ private:
// for dvsync (animate requestNextVSync after mark rsnotrendering)
bool needRequestNextVsyncAnimate_ = false;
bool needRequestNextVsyncDrawBehindWindow_ = false;
bool forceUIFirstChanged_ = false;
// uiextension

View File

@ -900,6 +900,12 @@ void RSUniRenderVisitor::QuickPrepareSurfaceRenderNode(RSSurfaceRenderNode& node
parentSurfaceNodeMatrix_ = parentSurfaceNodeMatrix;
node.RenderTraceDebug();
node.SetNeedOffscreen(isScreenRotationAnimating_);
if (node.NeedUpdateDrawableBehindWindow()) {
node.AddDirtyType(RSModifierType::BACKGROUND_BLUR_RADIUS);
node.SetDirty(true);
RSMainThread::Instance()->SetNextDVsyncDrawBehindWindowFlag(true);
RSMainThread::Instance()->RequestNextVSync("drawBehindWindow");
}
}
void RSUniRenderVisitor::PrepareForCrossNode(RSSurfaceRenderNode& node)

View File

@ -561,10 +561,6 @@ void RSSurfaceRenderNode::QuickPrepare(const std::shared_ptr<RSNodeVisitor>& vis
if (!visitor) {
return;
}
if (NeedUpdateDrawableBehindWindow()) {
AddDirtyType(RSModifierType::BACKGROUND_BLUR_RADIUS);
SetDirty(true);
}
ApplyModifiers();
visitor->QuickPrepareSurfaceRenderNode(*this);