Remove ScopedAddToTraversalPath
ScopedAddToTraversalPath is an RAII wrapper that copies the existing traversal path, modifies it, and then restores the modified properties from the copy when deleted. It's simpler to make the child path a copy and not modify the parent.
Bug: 403312802
Flag: EXEMPT refactor
Test: presubmits
Change-Id: I8f06ed557f29444be6df51c1c8ea60958a82ee95
diff --git a/services/surfaceflinger/LayerProtoHelper.h b/services/surfaceflinger/LayerProtoHelper.h
index 3ca553a..28924e4 100644
--- a/services/surfaceflinger/LayerProtoHelper.h
+++ b/services/surfaceflinger/LayerProtoHelper.h
@@ -98,8 +98,8 @@
private:
void writeHierarchyToProto(const frontend::LayerHierarchy& root,
- frontend::LayerHierarchy::TraversalPath& path);
- frontend::LayerSnapshot* getSnapshot(frontend::LayerHierarchy::TraversalPath& path,
+ const frontend::LayerHierarchy::TraversalPath& path);
+ frontend::LayerSnapshot* getSnapshot(const frontend::LayerHierarchy::TraversalPath& path,
const frontend::RequestedLayerState& layer);
const frontend::LayerSnapshotBuilder& mSnapshotBuilder;