Add parent layer's name to dumpsys info.
Added additional info to the dumpsys to print the parent of
the layer.
Change-Id: Ie7b5dcffeca93d996a99c7ee3c6b89f43869f7ff
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index b14fd7b..8eb4067 100755
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2383,6 +2383,8 @@
pf = buffer->getPixelFormat();
}
+ sp<Layer> parent = getParent();
+
result.appendFormat( " "
"layerStack=%4d, z=%9d, pos=(%g,%g), size=(%4d,%4d), "
"crop=(%4d,%4d,%4d,%4d), finalCrop=(%4d,%4d,%4d,%4d), "
@@ -2393,7 +2395,7 @@
#else
"alpha=0x%02x, flags=0x%08x, tr=[%.2f, %.2f][%.2f, %.2f]\n"
#endif
- " client=%p\n",
+ " client=%p parent=%s\n",
getLayerStack(), s.z,
s.active.transform.tx(), s.active.transform.ty(),
s.active.w, s.active.h,
@@ -2406,7 +2408,7 @@
s.alpha, s.flags,
s.active.transform[0][0], s.active.transform[0][1],
s.active.transform[1][0], s.active.transform[1][1],
- client.get());
+ client.get(), parent == nullptr ? "none" : parent->getName().string());
sp<const GraphicBuffer> buf0(mActiveBuffer);
uint32_t w0=0, h0=0, s0=0, f0=0;