Remove redundant check for blurRegions to force client composition
If there are blurRegions on a Layer, we *should* force client
composition, but this is already handled in
Output::updateCompositionState +
Output::findLayerRequestingBackgroundComposition. The check on Layer is
redundant, so remove it.
Moreover, the check on Layer doesn't do enough. It doesn't handle blur-
behind, and it doesn't force the Layers below to use client composition,
which is also necessary.
This allows us to remove blurs and client composition from protected
surfaces on devices that do not have EGL_EXT_protected_content. (See
I9763eb22884e611568b36b2e221ee6d75ec3363e.)
Bug: 196271643
Test: OutputUpdateAndWriteCompositionStateTest
Change-Id: I055d221b1fcb36fb5fbc6747c353d3fb72f4d684
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
index 23cfe928..cf39187 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
@@ -871,7 +871,7 @@
// computed snapshot properties
snapshot.forceClientComposition = snapshot.isHdrY410 || snapshot.shadowSettings.length > 0 ||
- requested.blurRegions.size() > 0 || snapshot.stretchEffect.hasEffect();
+ snapshot.stretchEffect.hasEffect();
snapshot.contentOpaque = snapshot.isContentOpaque();
snapshot.isOpaque = snapshot.contentOpaque && !snapshot.roundedCorner.hasRoundedCorners() &&
snapshot.color.a == 1.f;