Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cea854e authored by Santiago Etchebehere's avatar Santiago Etchebehere Committed by Automerger Merge Worker
Browse files

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

Change-Id: I9010cbbe453846d217a6e5a9230d59c78528c5c6
parents 7f5ed283 661d4706
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -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 =
            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) {