Loading core/java/com/android/internal/service/wallpaper/ImageWallpaper.java +26 −23 Original line number Diff line number Diff line Loading @@ -187,9 +187,6 @@ public class ImageWallpaper extends WallpaperService { } SurfaceHolder sh = getSurfaceHolder(); Canvas c = sh.lockCanvas(); if (c != null) { try { final Rect frame = sh.getSurfaceFrame(); final Drawable background = mBackground; final int dw = frame.width(); Loading @@ -202,19 +199,25 @@ public class ImageWallpaper extends WallpaperService { int yPixels = availh < 0 ? (int)(availh * mYOffset + .5f) : (availh / 2); mOffsetsChanged = false; if (!mRedrawNeeded) { if (xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (!mRedrawNeeded && xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (DEBUG) { Log.d(TAG, "Suppressed drawFrame since the image has not " + "actually moved an integral number of pixels."); } return; } } mRedrawNeeded = false; mLastXTranslation = xPixels; mLastYTranslation = yPixels; Canvas c = sh.lockCanvas(); if (c != null) { try { if (DEBUG) { Log.d(TAG, "Redrawing: xPixels=" + xPixels + ", yPixels=" + yPixels); } c.translate(xPixels, yPixels); if (availw < 0 || availh < 0) { c.save(Canvas.CLIP_SAVE_FLAG); Loading Loading
core/java/com/android/internal/service/wallpaper/ImageWallpaper.java +26 −23 Original line number Diff line number Diff line Loading @@ -187,9 +187,6 @@ public class ImageWallpaper extends WallpaperService { } SurfaceHolder sh = getSurfaceHolder(); Canvas c = sh.lockCanvas(); if (c != null) { try { final Rect frame = sh.getSurfaceFrame(); final Drawable background = mBackground; final int dw = frame.width(); Loading @@ -202,19 +199,25 @@ public class ImageWallpaper extends WallpaperService { int yPixels = availh < 0 ? (int)(availh * mYOffset + .5f) : (availh / 2); mOffsetsChanged = false; if (!mRedrawNeeded) { if (xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (!mRedrawNeeded && xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (DEBUG) { Log.d(TAG, "Suppressed drawFrame since the image has not " + "actually moved an integral number of pixels."); } return; } } mRedrawNeeded = false; mLastXTranslation = xPixels; mLastYTranslation = yPixels; Canvas c = sh.lockCanvas(); if (c != null) { try { if (DEBUG) { Log.d(TAG, "Redrawing: xPixels=" + xPixels + ", yPixels=" + yPixels); } c.translate(xPixels, yPixels); if (availw < 0 || availh < 0) { c.save(Canvas.CLIP_SAVE_FLAG); Loading