From 8e262fe5c73dddc915e5c8a4b927f52cb417f5a1 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 18 Jan 2017 07:48:40 +0100 Subject: [PATCH] LayerComposer: always prioritize layers which are lower in the list --- src/anbox/graphics/layer_composer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/anbox/graphics/layer_composer.cpp b/src/anbox/graphics/layer_composer.cpp index 5c2e479..3483d75 100644 --- a/src/anbox/graphics/layer_composer.cpp +++ b/src/anbox/graphics/layer_composer.cpp @@ -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;