Mark empty EffectLayer as skipContentDraw
An effect layer that only draws a shadow or blurs shouldn't draw a
color. We should skip drawing its contents altogether.
Bug: 189207458
Test: manual
Change-Id: I01bb066d4a02f6111a6974dd241f9530c4979420
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index a7c8704..690fda6 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -574,7 +574,8 @@
layerSettings.geometry.positionTransform = getTransform().asMatrix4();
// skip drawing content if the targetSettings indicate the content will be occluded
- layerSettings.skipContentDraw = !targetSettings.realContentIsVisible;
+ layerSettings.skipContentDraw =
+ layerSettings.skipContentDraw || !targetSettings.realContentIsVisible;
if (hasColorTransform()) {
layerSettings.colorTransform = getColorTransform();