Loading packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +26 −18 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ public class ImageWallpaper extends WallpaperService { mBackgroundWidth = mBackgroundHeight = -1; mBackground = null; mRedrawNeeded = true; drawFrameLocked(); drawFrameLocked(false); } } } Loading Loading @@ -234,7 +234,7 @@ public class ImageWallpaper extends WallpaperService { Log.d(TAG, "Visibility changed to visible=" + visible); } mVisible = visible; drawFrameLocked(); drawFrameLocked(false); } } } Loading Loading @@ -263,7 +263,7 @@ public class ImageWallpaper extends WallpaperService { mYOffset = yOffset; mOffsetsChanged = true; } drawFrameLocked(); drawFrameLocked(false); } } Loading @@ -277,7 +277,8 @@ public class ImageWallpaper extends WallpaperService { synchronized (mLock) { mRedrawNeeded = true; drawFrameLocked(); mBackgroundWidth = mBackgroundHeight = -1; drawFrameLocked(true); } } Loading @@ -290,11 +291,12 @@ public class ImageWallpaper extends WallpaperService { synchronized (mLock) { mRedrawNeeded = true; drawFrameLocked(); drawFrameLocked(false); } } void drawFrameLocked() { void drawFrameLocked(boolean force) { if (!force) { if (!mVisible) { if (DEBUG) { Log.d(TAG, "Suppressed drawFrame since wallpaper is not visible."); Loading @@ -308,7 +310,7 @@ public class ImageWallpaper extends WallpaperService { } return; } } // If we don't yet know the size of the wallpaper bitmap, // we need to get it now. boolean updateWallpaper = mBackgroundWidth < 0 || mBackgroundHeight < 0 ; Loading @@ -332,7 +334,8 @@ public class ImageWallpaper extends WallpaperService { int yPixels = availh < 0 ? (int)(availh * mYOffset + .5f) : (availh / 2); mOffsetsChanged = false; if (!mRedrawNeeded && xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (!force && !mRedrawNeeded && xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (DEBUG) { Log.d(TAG, "Suppressed drawFrame since the image has not " + "actually moved an integral number of pixels."); Loading @@ -343,6 +346,11 @@ public class ImageWallpaper extends WallpaperService { mLastXTranslation = xPixels; mLastYTranslation = yPixels; if (DEBUG) { Log.d(TAG, "drawFrameUnlocked(" + force + "): mBackgroundWxH=" + mBackgroundWidth + "x" + mBackgroundHeight + " SurfaceFrame=" + frame.toShortString() + " X,YOffset=" + mXOffset + "," + mYOffset); } if (mIsHwAccelerated) { if (!drawWallpaperWithOpenGL(sh, availw, availh, xPixels, yPixels)) { drawWallpaperWithCanvas(sh, availw, availh, xPixels, yPixels); Loading Loading
packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +26 −18 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ public class ImageWallpaper extends WallpaperService { mBackgroundWidth = mBackgroundHeight = -1; mBackground = null; mRedrawNeeded = true; drawFrameLocked(); drawFrameLocked(false); } } } Loading Loading @@ -234,7 +234,7 @@ public class ImageWallpaper extends WallpaperService { Log.d(TAG, "Visibility changed to visible=" + visible); } mVisible = visible; drawFrameLocked(); drawFrameLocked(false); } } } Loading Loading @@ -263,7 +263,7 @@ public class ImageWallpaper extends WallpaperService { mYOffset = yOffset; mOffsetsChanged = true; } drawFrameLocked(); drawFrameLocked(false); } } Loading @@ -277,7 +277,8 @@ public class ImageWallpaper extends WallpaperService { synchronized (mLock) { mRedrawNeeded = true; drawFrameLocked(); mBackgroundWidth = mBackgroundHeight = -1; drawFrameLocked(true); } } Loading @@ -290,11 +291,12 @@ public class ImageWallpaper extends WallpaperService { synchronized (mLock) { mRedrawNeeded = true; drawFrameLocked(); drawFrameLocked(false); } } void drawFrameLocked() { void drawFrameLocked(boolean force) { if (!force) { if (!mVisible) { if (DEBUG) { Log.d(TAG, "Suppressed drawFrame since wallpaper is not visible."); Loading @@ -308,7 +310,7 @@ public class ImageWallpaper extends WallpaperService { } return; } } // If we don't yet know the size of the wallpaper bitmap, // we need to get it now. boolean updateWallpaper = mBackgroundWidth < 0 || mBackgroundHeight < 0 ; Loading @@ -332,7 +334,8 @@ public class ImageWallpaper extends WallpaperService { int yPixels = availh < 0 ? (int)(availh * mYOffset + .5f) : (availh / 2); mOffsetsChanged = false; if (!mRedrawNeeded && xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (!force && !mRedrawNeeded && xPixels == mLastXTranslation && yPixels == mLastYTranslation) { if (DEBUG) { Log.d(TAG, "Suppressed drawFrame since the image has not " + "actually moved an integral number of pixels."); Loading @@ -343,6 +346,11 @@ public class ImageWallpaper extends WallpaperService { mLastXTranslation = xPixels; mLastYTranslation = yPixels; if (DEBUG) { Log.d(TAG, "drawFrameUnlocked(" + force + "): mBackgroundWxH=" + mBackgroundWidth + "x" + mBackgroundHeight + " SurfaceFrame=" + frame.toShortString() + " X,YOffset=" + mXOffset + "," + mYOffset); } if (mIsHwAccelerated) { if (!drawWallpaperWithOpenGL(sh, availw, availh, xPixels, yPixels)) { drawWallpaperWithCanvas(sh, availw, availh, xPixels, yPixels); Loading