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
This commit is contained in:
Nataniel Borges
2022-01-26 16:31:07 +01:00
parent e0439a3892
commit a92deb8e5a

View File

@@ -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) {