Add visible region to list of visibility reasons
Test: open trace from bug Fixes: 157252333 Change-Id: Ifebac00a112798bbd03cf74458a1ffc7682890f6
This commit is contained in:
@@ -144,7 +144,7 @@ function is_visible(layer, hiddenByPolicy, includesCompositionState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function get_visibility_reason(layer) {
|
||||
function get_visibility_reason(layer, includesCompositionState) {
|
||||
if (layer.type === 'ContainerLayer') {
|
||||
return 'ContainerLayer';
|
||||
}
|
||||
@@ -193,6 +193,10 @@ function get_visibility_reason(layer) {
|
||||
return 'Layer is occluded by:' + layer.occludedBy.join();
|
||||
}
|
||||
|
||||
if (includesCompositionState && is_empty(layer.visibleRegion)) {
|
||||
return 'Visible region calculated by Composition Engine is empty';
|
||||
}
|
||||
|
||||
if (layer.visible) {
|
||||
return 'Unknown';
|
||||
};
|
||||
@@ -256,7 +260,7 @@ function fill_occlusion_state(layerMap, rootLayers, includesCompositionState) {
|
||||
|
||||
layer.visible = is_visible(layer, layer.hidden, includesCompositionState);
|
||||
if (!layer.visible) {
|
||||
layer.invisibleDueTo = get_visibility_reason(layer);
|
||||
layer.invisibleDueTo = get_visibility_reason(layer, includesCompositionState);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user