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

Commit 264cb2ff authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Do not blur if all apps is fully visible

Fixes: 155093795
Fixes: 155203546
Test: manual
Change-Id: I30f4c027e5107a199791e908acbb7ffed94e6a77
parent 0d9a9b93
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -193,8 +193,17 @@ public class DepthController implements LauncherStateManager.StateHandler {
        if (windowToken != null) {
            mWallpaperManager.setWallpaperZoomOut(windowToken, mDepth);
        }
        final int blur;
        if (mLauncher.isInState(LauncherState.ALL_APPS) && mDepth == 1) {
            // All apps has a solid background. We don't need to draw blurs after it's fully
            // visible. This will take us out of GPU composition, saving battery and increasing
            // performance.
            blur = 0;
        } else {
            blur = (int) (mDepth * mMaxBlurRadius);
        }
        new TransactionCompat()
                .setBackgroundBlurRadius(mSurface, (int) (mDepth * mMaxBlurRadius))
                .setBackgroundBlurRadius(mSurface, blur)
                .apply();
    }
}