Merge "WindowState: Correct wallpaper scaling" into sc-dev
This commit is contained in:
@@ -5512,7 +5512,19 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
mSurfacePlacementNeeded = false;
|
mSurfacePlacementNeeded = false;
|
||||||
transformFrameToSurfacePosition(mWindowFrames.mFrame.left, mWindowFrames.mFrame.top,
|
transformFrameToSurfacePosition(mWindowFrames.mFrame.left, mWindowFrames.mFrame.top,
|
||||||
mSurfacePosition);
|
mSurfacePosition);
|
||||||
mSurfacePosition.offset(mXOffset, mYOffset);
|
|
||||||
|
if (mWallpaperScale != 1f) {
|
||||||
|
DisplayInfo displayInfo = getDisplayInfo();
|
||||||
|
Matrix matrix = mTmpMatrix;
|
||||||
|
matrix.setTranslate(mXOffset, mYOffset);
|
||||||
|
matrix.postScale(mWallpaperScale, mWallpaperScale, displayInfo.logicalWidth / 2f,
|
||||||
|
displayInfo.logicalHeight / 2f);
|
||||||
|
matrix.getValues(mTmpMatrixArray);
|
||||||
|
mSurfacePosition.offset(Math.round(mTmpMatrixArray[Matrix.MTRANS_X]),
|
||||||
|
Math.round(mTmpMatrixArray[Matrix.MTRANS_Y]));
|
||||||
|
} else {
|
||||||
|
mSurfacePosition.offset(mXOffset, mYOffset);
|
||||||
|
}
|
||||||
|
|
||||||
// Freeze position while we're unrotated, so the surface remains at the position it was
|
// Freeze position while we're unrotated, so the surface remains at the position it was
|
||||||
// prior to the rotation.
|
// prior to the rotation.
|
||||||
|
|||||||
Reference in New Issue
Block a user