Merge "Apply final crop during surface preservation" into nyc-dev am: 2d4d408a5b am: 85a3a71e5f

am: 8a49755b4c

* commit '8a49755b4c84f084ff566365e7efc3abc6de7aec':
  Apply final crop during surface preservation

Change-Id: I02f76536c625d76b2a500e73663e6186bd601521
This commit is contained in:
Chong Zhang
2016-05-17 17:34:36 +00:00
committed by android-build-merger

View File

@@ -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.