OSDN Git Service

Fix artifacts in clip reveal animations
authorChet Haase <chet@google.com>
Thu, 5 Mar 2015 15:30:13 +0000 (07:30 -0800)
committerChet Haase <chet@google.com>
Tue, 10 Mar 2015 18:23:10 +0000 (11:23 -0700)
clip-reveal the entire screen, not just the app window contents.
Also, account for position of window in non-fullscreen apps.

Issue #19638386 fix launch animation artifacts

Change-Id: I08bc09a89974e28af72c08ddd61bd555e5330221

services/core/java/com/android/server/wm/AppTransition.java
services/core/java/com/android/server/wm/WindowStateAnimator.java

index ef70895..4c06cbe 100644 (file)
@@ -977,7 +977,9 @@ public class AppTransition implements Dump {
                             + " anim=" + a + " nextAppTransition=ANIM_CUSTOM_IN_PLACE"
                             + " transit=" + transit + " Callers=" + Debug.getCallers(3));
         } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_CLIP_REVEAL) {
-            a = createClipRevealAnimationLocked(transit, enter, appWidth, appHeight);
+            a = createClipRevealAnimationLocked(transit, enter,
+                    containingFrame.right - containingFrame.left,
+                    containingFrame.bottom - containingFrame.top);
             if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG,
                     "applyAnimation:"
                             + " anim=" + a + " nextAppTransition=ANIM_CLIP_REVEAL"
index 89ed5b7..ac1b0f1 100644 (file)
@@ -1139,6 +1139,8 @@ class WindowStateAnimator {
                     mShownAlpha *= appTransformation.getAlpha();
                     if (appTransformation.hasClipRect()) {
                         mClipRect.set(appTransformation.getClipRect());
+                        // Account for non-fullscreen windows
+                        mClipRect.offset(frame.left, frame.top);
                         if (mWin.mHScale > 0) {
                             mClipRect.left /= mWin.mHScale;
                             mClipRect.right /= mWin.mHScale;