classify sys pid

Signed-off-by: lee <liwei576@huawei.com>
This commit is contained in:
lee 2023-06-29 19:49:14 +08:00
parent aee431af48
commit 17298529fc
3 changed files with 16 additions and 0 deletions

View File

@ -52,6 +52,7 @@ public:
void TraverseSurfaceNodes(std::function<void (const std::shared_ptr<RSSurfaceRenderNode>&)> func) const;
void TraverseDrivenRenderNodes(std::function<void (const std::shared_ptr<RSRenderNode>&)> func) const;
std::unordered_map<NodeId, std::shared_ptr<RSSurfaceRenderNode>> GetResidentSurfaceNodeMap() const;
bool IsResidentProcessNode(NodeId id) const;
NodeId GetEntryViewNodeId() const;
NodeId GetWallPaperViewNodeId() const;

View File

@ -682,6 +682,10 @@ void RSRenderNode::CheckGroupableAnimation(const PropertyId& id, bool isAnimAdd)
if (id <= 0) {
return;
}
auto context = GetContext().lock();
if (!context || !context->GetNodeMap().IsResidentProcessNode(GetId())) {
return;
}
auto target = modifiers_.find(id);
if (target == modifiers_.end() || !target->second || !GROUPABLE_ANIMATION_TYPE.count(target->second->GetType())) {
return;

View File

@ -78,6 +78,17 @@ static bool IsResidentProcess(const std::shared_ptr<RSSurfaceRenderNode> surface
surfaceNode->GetName() == SCREENLOCK_WINDOW || surfaceNode->GetName() == WALLPAPER_VIEW;
}
bool RSRenderNodeMap::IsResidentProcessNode(NodeId id) const
{
auto nodePid = ExtractPid(id);
for (auto& [residentId, _] : residentSurfaceNodeMap_) {
if (ExtractPid(residentId) == nodePid) {
return true;
}
}
return false;
}
bool RSRenderNodeMap::RegisterRenderNode(const std::shared_ptr<RSBaseRenderNode>& nodePtr)
{
NodeId id = nodePtr->GetId();