From 42aea458f36cacbfd90efb68ca9a75790df07b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pomini?= Date: Mon, 21 Aug 2023 18:18:39 +0000 Subject: [PATCH] Revert "Load and draw bitmap only once with ImageWallpaper" This reverts commit 11514a9032345c6ded05ef70176b5b82efc6fe64. Reason for revert: regression: b/296441848 Change-Id: Id433af188e654885c5d9ff024d68a634ab931aad --- .../src/com/android/systemui/wallpapers/ImageWallpaper.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/wallpapers/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/wallpapers/ImageWallpaper.java index 091a54fe98017..316b54eb0c80a 100644 --- a/packages/SystemUI/src/com/android/systemui/wallpapers/ImageWallpaper.java +++ b/packages/SystemUI/src/com/android/systemui/wallpapers/ImageWallpaper.java @@ -109,7 +109,6 @@ public class ImageWallpaper extends WallpaperService { private WallpaperManager mWallpaperManager; private final WallpaperLocalColorExtractor mWallpaperLocalColorExtractor; private SurfaceHolder mSurfaceHolder; - private boolean mDrawn = false; @VisibleForTesting static final int MIN_SURFACE_WIDTH = 128; @VisibleForTesting @@ -239,7 +238,6 @@ public class ImageWallpaper extends WallpaperService { private void drawFrameSynchronized() { synchronized (mLock) { - if (mDrawn) return; drawFrameInternal(); } } @@ -277,7 +275,6 @@ public class ImageWallpaper extends WallpaperService { Rect dest = mSurfaceHolder.getSurfaceFrame(); try { canvas.drawBitmap(bitmap, null, dest, null); - mDrawn = true; } finally { surface.unlockCanvasAndPost(canvas); }