Revert "Skip a step when blurring"

Modified revert of I4caa7ef3b5357c723fdc81c8e18b159c87366b60.

The thinking behind that CL was that we could skip drawing the non-
blurred image, because we would draw over it anyway with the blurred
image.

But during rotation and other animations, we don't always cover up
the old drawing, leading to old images showing up. This is particularly
jarring on a tablet.

Put the change behind a flag.

Bug: 236231351
Fixes: 255921628
Test: manual
Test: librenderengine_test
Change-Id: Ie9969b17b49964395f2d055bbb610c516e5df10c
diff --git a/libs/renderengine/skia/SkiaRenderEngine.cpp b/libs/renderengine/skia/SkiaRenderEngine.cpp
index 47a95a7..6e393f0 100644
--- a/libs/renderengine/skia/SkiaRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaRenderEngine.cpp
@@ -764,10 +764,11 @@
             // save a snapshot of the activeSurface to use as input to the blur shaders
             blurInput = activeSurface->makeImageSnapshot();
 
-            // blit the offscreen framebuffer into the destination AHB, but only
-            // if there are blur regions. backgroundBlurRadius blurs the entire
-            // image below, so it can skip this step.
-            if (layer.blurRegions.size()) {
+            // blit the offscreen framebuffer into the destination AHB. This ensures that
+            // even if the blurred image does not cover the screen (for example, during
+            // a rotation animation, or if blur regions are used), the entire screen is
+            // initialized.
+            if (layer.blurRegions.size() || FlagManager::getInstance().restore_blur_step()) {
                 SkPaint paint;
                 paint.setBlendMode(SkBlendMode::kSrc);
                 if (CC_UNLIKELY(mCapture->isCaptureRunning())) {