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-22 23:59:12 -0400
commitfab5ea10b0e81e830c484e19b322a3c11fa9e9e6 (patch)
treedeab7ab595f4b333b463e0db7a46e8d9e3f5718a
parent137a6a8e9bea5c90a6832e9ed3e630f47041ab15 (diff)
downloaddrm_hwcomposer-fab5ea10b0e81e830c484e19b322a3c11fa9e9e6.tar.gz
drm_hwcomposer: Count all layers with content in SquashFrame
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>
-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;