From a92deb8e5a184c7573588e7a49ef6849f84a4957 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Wed, 26 Jan 2022 16:31:07 +0100 Subject: [PATCH] Provide all the reasons a layer is invisible in Winscope Currently we print only 1 reason and this makes debugging issues harder Bug: 210476324 Test: compile winscope and dump a trace, check if multiple reasons for invisible layers appear Change-Id: Ia755c001a32a8bdcae3d8a31365ff1cfde28bb2f --- tools/winscope/src/SurfaceFlingerTraceView.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/winscope/src/SurfaceFlingerTraceView.vue b/tools/winscope/src/SurfaceFlingerTraceView.vue index 5a848c10b..165afb1de 100644 --- a/tools/winscope/src/SurfaceFlingerTraceView.vue +++ b/tools/winscope/src/SurfaceFlingerTraceView.vue @@ -37,7 +37,14 @@ export default { const summary = []; if (layer?.visibilityReason) { - summary.push({key: 'Invisible due to', value: layer.visibilityReason}); + let reason = ""; + if (Array.isArray(layer.visibilityReason)) { + reason = layer.visibilityReason.join(", "); + } else { + reason = layer.visibilityReason; + } + + summary.push({key: 'Invisible due to', value: reason}); } if (layer?.occludedBy?.length > 0) {