mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 01:00:50 +00:00
trans-window blur delay bugfix
Signed-off-by: 肖邵安 <xiaoshaoan@huawei.com>
This commit is contained in:
parent
fcd1ca083b
commit
cd39b0b488
@ -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");
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user