Add more layer state changes to SurfaceInterceptor
Track flag set and clear state changes.
Track reparenting, detach children and relative z changes.
Test: run surface interceptor and view results
Test: atest SurfaceFlinger_test:SurfaceInterceptorTest#*
Change-Id: I0c55e6d45034e180a3c8970c60af21bf8f2bb01c
diff --git a/services/surfaceflinger/SurfaceInterceptor.h b/services/surfaceflinger/SurfaceInterceptor.h
index 563a44c..7f86c14 100644
--- a/services/surfaceflinger/SurfaceInterceptor.h
+++ b/services/surfaceflinger/SurfaceInterceptor.h
@@ -116,9 +116,11 @@
void addInitialDisplayStateLocked(Increment* increment, const DisplayDeviceState& display);
status_t writeProtoFileLocked();
- const sp<const Layer> getLayer(const wp<const IBinder>& weakHandle);
- const std::string getLayerName(const sp<const Layer>& layer);
- int32_t getLayerId(const sp<const Layer>& layer);
+ const sp<const Layer> getLayer(const wp<const IBinder>& weakHandle) const;
+ const std::string getLayerName(const sp<const Layer>& layer) const;
+ int32_t getLayerId(const sp<const Layer>& layer) const;
+ int32_t getLayerIdFromWeakRef(const wp<const Layer>& layer) const;
+ int32_t getLayerIdFromHandle(const sp<const IBinder>& weakHandle) const;
Increment* createTraceIncrementLocked();
void addSurfaceCreationLocked(Increment* increment, const sp<const Layer>& layer);
@@ -141,7 +143,7 @@
const layer_state_t::matrix22_t& matrix);
void addTransparentRegionLocked(Transaction* transaction, int32_t layerId,
const Region& transRegion);
- void addFlagsLocked(Transaction* transaction, int32_t layerId, uint8_t flags);
+ void addFlagsLocked(Transaction* transaction, int32_t layerId, uint8_t flags, uint8_t mask);
void addLayerStackLocked(Transaction* transaction, int32_t layerId, uint32_t layerStack);
void addCropLocked(Transaction* transaction, int32_t layerId, const Rect& rect);
void addCornerRadiusLocked(Transaction* transaction, int32_t layerId, float cornerRadius);
@@ -153,6 +155,11 @@
void addTransactionLocked(Increment* increment, const Vector<ComposerState>& stateUpdates,
const DefaultKeyedVector< wp<IBinder>, DisplayDeviceState>& displays,
const Vector<DisplayState>& changedDisplays, uint32_t transactionFlags);
+ void addReparentLocked(Transaction* transaction, int32_t layerId, int32_t parentId);
+ void addReparentChildrenLocked(Transaction* transaction, int32_t layerId, int32_t parentId);
+ void addDetachChildrenLocked(Transaction* transaction, int32_t layerId, bool detached);
+ void addRelativeParentLocked(Transaction* transaction, int32_t layerId, int32_t parentId,
+ int z);
// Add display transactions to the trace
DisplayChange* createDisplayChangeLocked(Transaction* transaction, int32_t sequenceId);