Trace drawing state
Some state that was dumped was still the current state, creating
misalignment between what was visible on screen and what was being
dumped. Make sure to dump all state consistently.
Test: adb shell service call SurfaceFlinger 1025 i32 1 &&
adb shell service call SurfaceFlinger 1025 i32 0 &&
adb pull /data/misc/trace/layerstrace.pb
Inspect with WindowScope
Change-Id: I16ea06764328fd8c506ed90dfc59929f7d26d156
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index aa3100e..f5fb109 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1786,7 +1786,7 @@
LayerProtoHelper::writeToProto(transform, layerInfo->mutable_transform());
LayerProtoHelper::writeToProto(requestedTransform, layerInfo->mutable_requested_transform());
- auto parent = getParent();
+ auto parent = useDrawing ? mDrawingParent.promote() : mCurrentParent.promote();
if (parent != nullptr) {
layerInfo->set_parent(parent->sequence);
}