fix private space switch show error

Signed-off-by: chuchengcheng <chuchengcheng4@huawei.com>
Change-Id: Ic671258e799278ea0ff33b5048b6964a4ea9819c
This commit is contained in:
chuchengcheng 2024-10-13 16:30:27 +08:00
parent 0820f665cb
commit d7430b5d5d
2 changed files with 11 additions and 0 deletions

View File

@ -161,6 +161,10 @@ public:
virtual void SetIsOnTheTree(bool flag, NodeId instanceRootNodeId = INVALID_NODEID,
NodeId firstLevelNodeId = INVALID_NODEID, NodeId cacheNodeId = INVALID_NODEID,
NodeId uifirstRootNodeId = INVALID_NODEID);
void SetIsOntheTreeOnlyFlag(bool flag)
{
SetIsOnTheTree(flag, instanceRootNodeId_, firstLevelNodeId_, drawingCacheRootId_, uifirstRootNodeId_);
}
inline bool IsOnTheTree() const
{
return isOnTheTree_;

View File

@ -427,7 +427,14 @@ RSRenderNode::ChildrenListSharedPtr RSDisplayRenderNode::GetSortedChildren() con
auto childPid = ExtractPid(child->GetId());
auto pidIter = std::find(oldScbPids.begin(), oldScbPids.end(), childPid);
if (pidIter != oldScbPids.end()) {
if (child) {
child->SetIsOntheTreeOnlyFlag(false);
}
continue;
} else if (childPid == currentScbPid) {
if (child) {
child->SetIsOntheTreeOnlyFlag(true);
}
}
currentChildrenList_->emplace_back(child);
}