Revert "Load and draw bitmap only once with ImageWallpaper"
This reverts commit 11514a9032.
Reason for revert: regression: b/296441848
Change-Id: Id433af188e654885c5d9ff024d68a634ab931aad
This commit is contained in:
committed by
Android (Google) Code Review
parent
11514a9032
commit
42aea458f3
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user