mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2025-03-03 18:21:45 +00:00
classify sys pid
Signed-off-by: lee <liwei576@huawei.com>
This commit is contained in:
parent
aee431af48
commit
17298529fc
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user