Add support for crossfading blur with original input.
If we know that we need to sample the destination for the blur,
then we go ahead and render contents into an offscreen to avoid
an extra render target switch and texture copy.
If the radius is less than kMaxCrossFadeRadius then the final
composition of the blur mixes with the original content to hide
any downscaling artifacts.
Bug: 178503959
Bug: 176903027
Test: notification shade and SilkFX test app
Change-Id: If836461c1c62020447797e9b2d1050156d9c7d0c
diff --git a/libs/renderengine/skia/SkiaGLRenderEngine.h b/libs/renderengine/skia/SkiaGLRenderEngine.h
index 4f4a9d4..8ef7359 100644
--- a/libs/renderengine/skia/SkiaGLRenderEngine.h
+++ b/libs/renderengine/skia/SkiaGLRenderEngine.h
@@ -88,11 +88,9 @@
base::unique_fd flush();
bool waitFence(base::unique_fd fenceFd);
+ void initCanvas(SkCanvas* canvas, const DisplaySettings& display);
void drawShadow(SkCanvas* canvas, const SkRect& casterRect, float casterCornerRadius,
const ShadowSettings& shadowSettings);
- void drawBlurRegion(SkCanvas* canvas, const BlurRegion& blurRegion, const SkRect& layerRect,
- sk_sp<SkImage> blurredImage);
- SkMatrix getBlurShaderTransform(const SkCanvas* canvas, const SkRect& layerRect);
// If mUseColorManagement is correct and layer needsLinearEffect, it returns a linear runtime
// shader. Otherwise it returns the input shader.
sk_sp<SkShader> createRuntimeEffectShader(sk_sp<SkShader> shader, const LayerSettings* layer,