summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/LayerProtoHelper.h
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-11-12 22:22:43 -0800
committer Xin Li <delphij@google.com> 2024-11-12 22:22:43 -0800
commit6dc15689f6bb4b04c102ac3107f31377ee91f05e (patch)
tree3ca9d372bc99ac1182fdb4bc895c556d0f108bd3 /services/surfaceflinger/LayerProtoHelper.h
parentd4d02798539f29d00059d458fd01e5b2869acbb6 (diff)
parentf151262626f1c08a104cc35d9864493ea8a72dec (diff)
Merge 24Q4 (ab/12406339) into aosp-main-future
Bug: 370570306 Merged-In: I9be1254c3e2685b0aa950b314c581824f40ce26c Change-Id: I35bc501a2b1d9eb100aaab25cd660cf2e0542f99
Diffstat (limited to 'services/surfaceflinger/LayerProtoHelper.h')
-rw-r--r--services/surfaceflinger/LayerProtoHelper.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/surfaceflinger/LayerProtoHelper.h b/services/surfaceflinger/LayerProtoHelper.h
index 20c226006c..41ea68420f 100644
--- a/services/surfaceflinger/LayerProtoHelper.h
+++ b/services/surfaceflinger/LayerProtoHelper.h
@@ -62,7 +62,7 @@ public:
const renderengine::ExternalTexture& buffer,
std::function<perfetto::protos::ActiveBufferProto*()> getActiveBufferProto);
static void writeToProto(
- const gui::WindowInfo& inputInfo, const wp<Layer>& touchableRegionBounds,
+ const gui::WindowInfo& inputInfo,
std::function<perfetto::protos::InputWindowInfoProto*()> getInputWindowInfoProto);
static void writeToProto(const mat4 matrix,
perfetto::protos::ColorTransformProto* colorTransformProto);
@@ -88,7 +88,12 @@ public:
mLegacyLayers(legacyLayers),
mDisplayInfos(displayInfos),
mTraceFlags(traceFlags) {}
- perfetto::protos::LayersProto generate(const frontend::LayerHierarchy& root);
+ LayerProtoFromSnapshotGenerator& with(const frontend::LayerHierarchy& root);
+ // Creates a fake root and adds all offscreen layers from the passed in hierarchy to the fake
+ // root
+ LayerProtoFromSnapshotGenerator& withOffscreenLayers(
+ const frontend::LayerHierarchy& offscreenRoot);
+ perfetto::protos::LayersProto generate() { return mLayersProto; };
private:
void writeHierarchyToProto(const frontend::LayerHierarchy& root,
@@ -101,6 +106,8 @@ private:
const frontend::DisplayInfos& mDisplayInfos;
uint32_t mTraceFlags;
perfetto::protos::LayersProto mLayersProto;
+ std::unordered_set<uint32_t> mVisitedLayers;
+
// winscope expects all the layers, so provide a snapshot even if it not currently drawing
std::unordered_map<frontend::LayerHierarchy::TraversalPath, frontend::LayerSnapshot,
frontend::LayerHierarchy::TraversalPathHash>