Add Kawase blur with dual filtering
Blurs are smoother between R=50 to R=200 with similar performance to
the previous version. We use between 1 and 5 passes at progressively
smaller resolutions depending on the blur radius that was requested.
This is currently not enabled in code, but will be enabled by a
follow-up CL.
Test: atest BlurTests
Bug: 185365391
Flag: EXEMPT already behind a non-aconfig flag
Change-Id: I2ad47d83b69b69215fe59a5ecda3b1766177a852
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 936e894..a8cdc84 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -853,6 +853,8 @@
auto const algorithm = base::GetProperty(PROPERTY_DEBUG_RENDERENGINE_BLUR_ALGORITHM, "");
if (algorithm == "gaussian") {
return renderengine::RenderEngine::BlurAlgorithm::GAUSSIAN;
+ } else if (algorithm == "kawase2") {
+ return renderengine::RenderEngine::BlurAlgorithm::KAWASE_DUAL_FILTER;
} else {
return renderengine::RenderEngine::BlurAlgorithm::KAWASE;
}