diff options
-rw-r--r-- | services/surfaceflinger/EffectLayer.cpp | 5 | ||||
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/services/surfaceflinger/EffectLayer.cpp b/services/surfaceflinger/EffectLayer.cpp index fd18c3bf31..0cc5f33d73 100644 --- a/services/surfaceflinger/EffectLayer.cpp +++ b/services/surfaceflinger/EffectLayer.cpp @@ -66,6 +66,7 @@ std::vector<compositionengine::LayerFE::LayerSettings> EffectLayer::prepareClien layerSettings->source.solidColor = getColor().rgb; results.push_back(*layerSettings); } else if (hasBlur() || drawShadows()) { + layerSettings->skipContentDraw = true; results.push_back(*layerSettings); } @@ -126,7 +127,7 @@ const compositionengine::LayerFECompositionState* EffectLayer::getCompositionSta bool EffectLayer::isOpaque(const Layer::State& s) const { // Consider the layer to be opaque if its opaque flag is set or its effective // alpha (considering the alpha of its parents as well) is 1.0; - return (s.flags & layer_state_t::eLayerOpaque) != 0 || getAlpha() == 1.0_hf; + return (s.flags & layer_state_t::eLayerOpaque) != 0 || (fillsColor() && getAlpha() == 1.0_hf); } ui::Dataspace EffectLayer::getDataSpace() const { @@ -147,7 +148,7 @@ bool EffectLayer::fillsColor() const { } bool EffectLayer::hasBlur() const { - return getBackgroundBlurRadius() > 0; + return getBackgroundBlurRadius() > 0 || getDrawingState().blurRegions.size() > 0; } } // namespace android diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index a7c870483b..690fda66a6 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -574,7 +574,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 = !targetSettings.realContentIsVisible; + layerSettings.skipContentDraw = + layerSettings.skipContentDraw || !targetSettings.realContentIsVisible; if (hasColorTransform()) { layerSettings.colorTransform = getColorTransform(); |