Eliminate offscreen buffer for some blurs.
For blurs that don't need to crossfade with the original input
we should not need to render the initial input into an offscreen
buffer for sampling.
Test: `atest renderengine_test` and tracing SysUI blurs
Bug: 176903027
Change-Id: I3c6b2782b6d20c260af0077877ebf4720b0e54cc
diff --git a/libs/renderengine/skia/SkiaGLRenderEngine.cpp b/libs/renderengine/skia/SkiaGLRenderEngine.cpp
index 327b04c..1c30142 100644
--- a/libs/renderengine/skia/SkiaGLRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaGLRenderEngine.cpp
@@ -631,9 +631,8 @@
if (mBlurFilter) {
bool requiresCompositionLayer = false;
for (const auto& layer : layers) {
- if (layer->backgroundBlurRadius > 0) {
- // when skbug.com/11208 and b/176903027 are resolved we can add the additional
- // restriction for layer->backgroundBlurRadius < BlurFilter::kMaxCrossFadeRadius
+ if (layer->backgroundBlurRadius > 0 &&
+ layer->backgroundBlurRadius < BlurFilter::kMaxCrossFadeRadius) {
requiresCompositionLayer = true;
}
for (auto region : layer->blurRegions) {