Merge "Account for wallpaper scale in prepareSurfaceLocked" into rvc-dev am: 661d47065f

Change-Id: I9010cbbe453846d217a6e5a9230d59c78528c5c6
This commit is contained in:
Santiago Etchebehere
2020-04-03 19:17:01 +00:00
committed by Automerger Merge Worker

View File

@@ -1066,14 +1066,15 @@ class WindowStateAnimator {
if (!w.mSeamlesslyRotated) {
// Wallpaper is already updated above when calling setWallpaperPositionAndScale so
// we only need to consider the non-wallpaper case here.
if (!mIsWallpaper) {
applyCrop(clipRect, recoveringMemory);
mSurfaceController.setMatrixInTransaction(mDsDx * w.mHScale * mExtraHScale,
mSurfaceController.setMatrixInTransaction(
mDsDx * w.mHScale * mExtraHScale,
mDtDx * w.mVScale * mExtraVScale,
mDtDy * w.mHScale * mExtraHScale,
mDsDy * w.mVScale * mExtraVScale, recoveringMemory);
} else {
setWallpaperPositionAndScale(mXOffset, mYOffset, mWallpaperScale, recoveringMemory);
}
}
@@ -1152,13 +1153,20 @@ class WindowStateAnimator {
mSurfaceController, mShownAlpha, mDsDx, w.mHScale, mDtDx, w.mVScale,
mDtDy, w.mHScale, mDsDy, w.mVScale, w);
boolean prepared =
mSurfaceController.prepareToShowInTransaction(mShownAlpha,
boolean prepared = true;
if (mIsWallpaper) {
setWallpaperPositionAndScale(
mXOffset, mYOffset, mWallpaperScale, recoveringMemory);
} else {
prepared =
mSurfaceController.prepareToShowInTransaction(mShownAlpha,
mDsDx * w.mHScale * mExtraHScale,
mDtDx * w.mVScale * mExtraVScale,
mDtDy * w.mHScale * mExtraHScale,
mDsDy * w.mVScale * mExtraVScale,
recoveringMemory);
}
if (prepared && mDrawState == HAS_DRAWN) {
if (mLastHidden) {