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

Commit 79510c2b authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "WindowManager: Move mGlobalScale application to WindowState"

parents b41548eb 41e42254
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -421,6 +421,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP

    // Current transformation being applied.
    float mGlobalScale=1;
    float mLastGlobalScale=1;
    float mInvGlobalScale=1;
    float mHScale=1, mVScale=1;
    float mLastHScale=1, mLastVScale=1;
@@ -5301,6 +5302,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        }
    }

    private void updateGlobalScaleIfNeeded() {
        if (mLastGlobalScale != mGlobalScale) {
            getPendingTransaction().setMatrix(getSurfaceControl(),
                mGlobalScale, 0, 0, mGlobalScale);
            mLastGlobalScale = mGlobalScale;
        }
    }

    @Override
    void prepareSurfaces() {
        mIsDimming = false;
@@ -5308,6 +5317,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        updateSurfacePositionNonOrganized();
        // Send information to SufaceFlinger about the priority of the current window.
        updateFrameRateSelectionPriorityIfNeeded();
        updateGlobalScaleIfNeeded();

        mWinAnimator.prepareSurfaceLocked(SurfaceControl.getGlobalTransaction(), true);
        super.prepareSurfaces();
+2 −2
Original line number Diff line number Diff line
@@ -624,10 +624,10 @@ class WindowStateAnimator {

        mShownAlpha = mAlpha;
        mHaveMatrix = false;
        mDsDx = mWin.mGlobalScale;
        mDsDx = 1;
        mDtDx = 0;
        mDtDy = 0;
        mDsDy = mWin.mGlobalScale;
        mDsDy = 1;
    }

    private boolean shouldConsumeMainWindowSizeTransaction() {