Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48a60cc3 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

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
parent df8166e6
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -764,10 +764,11 @@ void SkiaRenderEngine::drawLayersInternal(
            // 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())) {
+2 −0
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@ void FlagManager::dump(std::string& result) const {
    DUMP_READ_ONLY_FLAG(screenshot_fence_preservation);
    DUMP_READ_ONLY_FLAG(vulkan_renderengine);
    DUMP_READ_ONLY_FLAG(renderable_buffer_usage);
    DUMP_READ_ONLY_FLAG(restore_blur_step);
#undef DUMP_READ_ONLY_FLAG
#undef DUMP_SERVER_FLAG
#undef DUMP_FLAG_INTERVAL
@@ -208,6 +209,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(enable_layer_command_batching, "")
FLAG_MANAGER_READ_ONLY_FLAG(screenshot_fence_preservation, "debug.sf.screenshot_fence_preservation")
FLAG_MANAGER_READ_ONLY_FLAG(vulkan_renderengine, "debug.renderengine.vulkan")
FLAG_MANAGER_READ_ONLY_FLAG(renderable_buffer_usage, "")
FLAG_MANAGER_READ_ONLY_FLAG(restore_blur_step, "debug.renderengine.restore_blur_step")

/// Trunk stable server flags ///
FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "")
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ public:
    bool screenshot_fence_preservation() const;
    bool vulkan_renderengine() const;
    bool renderable_buffer_usage() const;
    bool restore_blur_step() const;

protected:
    // overridden for unit tests
+11 −0
Original line number Diff line number Diff line
@@ -185,3 +185,14 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "restore_blur_step"
  namespace: "core_graphics"
  description: "Restore drawing the blur input prior to drawing blurred content."
  bug: "255921628"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}