diff --git a/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp b/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp index 921fdfdfc0..a9b8633484 100644 --- a/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp +++ b/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp @@ -2089,6 +2089,10 @@ void RSMainThread::UniRender(std::shared_ptr 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"); diff --git a/rosen/modules/render_service/core/pipeline/rs_main_thread.h b/rosen/modules/render_service/core/pipeline/rs_main_thread.h index c63912b343..fb59647e7b 100644 --- a/rosen/modules/render_service/core/pipeline/rs_main_thread.h +++ b/rosen/modules/render_service/core/pipeline/rs_main_thread.h @@ -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 diff --git a/rosen/modules/render_service/core/pipeline/rs_uni_render_visitor.cpp b/rosen/modules/render_service/core/pipeline/rs_uni_render_visitor.cpp index 5143ea2826..24bf2429a0 100644 --- a/rosen/modules/render_service/core/pipeline/rs_uni_render_visitor.cpp +++ b/rosen/modules/render_service/core/pipeline/rs_uni_render_visitor.cpp @@ -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) diff --git a/rosen/modules/render_service_base/src/pipeline/rs_surface_render_node.cpp b/rosen/modules/render_service_base/src/pipeline/rs_surface_render_node.cpp index 3745d86136..0a9cb56a0b 100644 --- a/rosen/modules/render_service_base/src/pipeline/rs_surface_render_node.cpp +++ b/rosen/modules/render_service_base/src/pipeline/rs_surface_render_node.cpp @@ -561,10 +561,6 @@ void RSSurfaceRenderNode::QuickPrepare(const std::shared_ptr& vis if (!visitor) { return; } - if (NeedUpdateDrawableBehindWindow()) { - AddDirtyType(RSModifierType::BACKGROUND_BLUR_RADIUS); - SetDirty(true); - } ApplyModifiers(); visitor->QuickPrepareSurfaceRenderNode(*this);