Merge "Fix default wallpaper transition issue" into qt-qpr1-dev
am: 8de3b785c4
Change-Id: I730392200e589e97192e1612ce7517ba2d6c93e1
This commit is contained in:
@@ -111,7 +111,12 @@ public class ImageWallpaperRenderer implements GLWallpaperRenderer,
|
|||||||
mBitmap = mWallpaperManager.getBitmap();
|
mBitmap = mWallpaperManager.getBitmap();
|
||||||
mWallpaperManager.forgetLoadedWallpaper();
|
mWallpaperManager.forgetLoadedWallpaper();
|
||||||
if (mBitmap != null) {
|
if (mBitmap != null) {
|
||||||
mSurfaceSize.set(0, 0, mBitmap.getWidth(), mBitmap.getHeight());
|
float scale = (float) mScissor.height() / mBitmap.getHeight();
|
||||||
|
int surfaceHeight = Math.max(mScissor.height(), mBitmap.getHeight());
|
||||||
|
int surfaceWidth = scale > 1f
|
||||||
|
? Math.round(mBitmap.getWidth() * scale)
|
||||||
|
: mBitmap.getWidth();
|
||||||
|
mSurfaceSize.set(0, 0, surfaceWidth, surfaceHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mBitmap != null;
|
return mBitmap != null;
|
||||||
|
|||||||
Reference in New Issue
Block a user