Merge "Fix default wallpaper transition issue" into qt-qpr1-dev am: 8de3b785c4

am: c29e70ef63

Change-Id: Icf68f39b520ad708d3b113841c47100789d03c70
This commit is contained in:
Lucas Dupin
2019-09-06 11:32:34 -07:00
committed by android-build-merger

View File

@@ -111,7 +111,12 @@ public class ImageWallpaperRenderer implements GLWallpaperRenderer,
mBitmap = mWallpaperManager.getBitmap();
mWallpaperManager.forgetLoadedWallpaper();
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;