LayerComposer: always prioritize layers which are lower in the list

This commit is contained in:
Simon Fels 2017-01-18 07:48:40 +01:00
commit 8e262fe5c7

View file

@ -61,7 +61,9 @@ void LayerComposer::submit_layers(const RenderableList &renderables) {
for (auto &r : renderables) {
const auto layer_area = r.screen_position().width() * r.screen_position().height();
if (layer_area < max_layer_area)
// We always prioritize layers which are lower in the list we got
// from SurfaceFlinger as they are already ordered.
if (layer_area <= max_layer_area)
continue;
max_layer_area = layer_area;