trans-window blur delay bugfix

Signed-off-by: 肖邵安 <xiaoshaoan@huawei.com>
This commit is contained in:
肖邵安 2024-11-21 14:56:16 +08:00
parent fcd1ca083b
commit cd39b0b488
4 changed files with 22 additions and 4 deletions

View File

@ -2088,6 +2088,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);