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

Commit 85a3a71e authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

Merge "Apply final crop during surface preservation" into nyc-dev

am: 2d4d408a

* commit '2d4d408a':
  Apply final crop during surface preservation

Change-Id: I9f4f6bbb2ededda8a0836d64d73fcefda2b0f946
parents bc176c4f 2d4d408a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1298,6 +1298,9 @@ class WindowStateAnimator {
        if (!finalClipRect.equals(mLastFinalClipRect)) {
            mLastFinalClipRect.set(finalClipRect);
            mSurfaceController.setFinalCropInTransaction(finalClipRect);
            if (mDestroyPreservedSurfaceUponRedraw && mPendingDestroySurface != null) {
                mPendingDestroySurface.setFinalCropInTransaction(finalClipRect);
            }
        }
    }

@@ -1370,7 +1373,8 @@ class WindowStateAnimator {

        // If we are animating, we either apply the clip before applying all the animation
        // transformation or after all the transformation.
        final boolean useFinalClipRect = isAnimationSet() && stackClip == STACK_CLIP_AFTER_ANIM;
        final boolean useFinalClipRect = isAnimationSet() && stackClip == STACK_CLIP_AFTER_ANIM
                || mDestroyPreservedSurfaceUponRedraw;

        // We need to do some acrobatics with surface position, because their clip region is
        // relative to the inside of the surface, but the stack bounds aren't.