summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdy Abraham <adyabr@google.com>2021-07-13 14:02:19 -0700
committerAdy Abraham <adyabr@google.com>2021-07-13 14:02:19 -0700
commitbaa6cf585169c9d2f87c2033785992953b265692 (patch)
treeee9f5d34d204b6aa9a56207887c4c5a10ddea96a
parent6e8e36486152c3602c5ba3214f34fc01a6a13937 (diff)
downloadnative-baa6cf585169c9d2f87c2033785992953b265692.tar.gz
SF: don't skip draw for clearContent
Layers that needs to punch a hole using clearContent (HWC request) should not be skipped for drawing, as we need to draw the punch hole. Bug: 190765526 Test: Force all non-SurfaceViews to client composition Change-Id: I891f697b0cea1bcbe9782714acd6b8f88ecc99b3
-rw-r--r--services/surfaceflinger/Layer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 00e043289a..bbe2c3e575 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -580,8 +580,8 @@ std::optional<compositionengine::LayerFE::LayerSettings> Layer::prepareClientCom
layerSettings.geometry.positionTransform = getTransform().asMatrix4();
// skip drawing content if the targetSettings indicate the content will be occluded
- layerSettings.skipContentDraw =
- layerSettings.skipContentDraw || !targetSettings.realContentIsVisible;
+ const bool drawContent = targetSettings.realContentIsVisible || targetSettings.clearContent;
+ layerSettings.skipContentDraw = !drawContent;
if (hasColorTransform()) {
layerSettings.colorTransform = getColorTransform();