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

Commit 2f0fe62c authored by Robert Carr's avatar Robert Carr
Browse files

WindowStateAnimation: Clear transformation clip rect.

Ensure the clip rect taken from transformations is cleared
when there is no transformation. Normally the failure to
clear the clip would not cause a problem, as the final clip
would be equal to the window size. However, in the event that
the window scale goes on to change (WindowState::m(H/V)Scale that is)
the clip will now be specified at the inappropriate scale (notice the
way the clip must be divided by H/VScale as SurfaceFlinger will apply
the surface transform to the clip).

Bug:23974105
Change-Id: I4548e8ecea8d66d4942e99823653a7b05f87cea0
parent 440f0a34
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1087,6 +1087,8 @@ class WindowStateAnimator {
                mAnimator.getScreenRotationAnimationLocked(displayId);
        final boolean screenAnimation =
                screenRotationAnimation != null && screenRotationAnimation.isAnimating();

        mHasClipRect = false;
        if (selfTransformation || attachedTransformation != null
                || appTransformation != null || screenAnimation) {
            // cache often used attributes locally
@@ -1165,7 +1167,6 @@ class WindowStateAnimator {
            // transforming since it is more important to have that
            // animation be smooth.
            mShownAlpha = mAlpha;
            mHasClipRect = false;
            if (!mService.mLimitedAlphaCompositing
                    || (!PixelFormat.formatHasAlpha(mWin.mAttrs.format)
                    || (mWin.isIdentityMatrix(mDsDx, mDtDx, mDsDy, mDtDy)