aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2016-06-22 23:26:29 -0400
committerSean Paul <seanpaul@chromium.org>2016-06-23 00:01:34 -0400
commitc74c8b9339cb5fd4f00d1be6b857c6e60ba5fc49 (patch)
treec184777c1dc4d26f318086c281b94031e40bc434
parentb4cf01b8eab70b554b3ddcad10cade7b6f0ffe0f (diff)
downloaddrm_hwcomposer-c74c8b9339cb5fd4f00d1be6b857c6e60ba5fc49.tar.gz
DO NOT MERGE: drm_hwcomposer: Count all layers with content in SquashFramenougat-dev
SquashFrame previously didn't run if there was only one overlay layer in the layer stack. This would cause false failures when the incoming composition was composed of one or more layers with a precomposition or squash layer. To fix this, count all layers which are not disabled, and only skip squashing if there is just one content layer. BUG=b/29122961 TEST=Tested on smaug with vertical multi-window YouTube Change-Id: Icb175b7701928136730442a39c4717a780d34cfd Signed-off-by: Sean Paul <seanpaul@chromium.org> (cherry picked from commit fab5ea10b0e81e830c484e19b322a3c11fa9e9e6) Signed-off-by: Sean Paul <seanpaul@chromium.org>
-rw-r--r--drmdisplaycompositor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index 279d5a6..92323b6 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -1061,7 +1061,7 @@ int DrmDisplayCompositor::SquashFrame(DrmDisplayComposition *src,
// Make sure there is more than one layer to squash.
size_t src_planes_with_layer = std::count_if(
src_planes.begin(), src_planes.end(), [](DrmCompositionPlane &p) {
- return p.type() == DrmCompositionPlane::Type::kLayer;
+ return p.type() != DrmCompositionPlane::Type::kDisable;
});
if (src_planes_with_layer <= 1)
return -EALREADY;