Fix artifacts in clip reveal animations

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
This commit is contained in:
Chet Haase
2015-03-05 07:30:13 -08:00
parent 86bb9ba586
commit 8da976a430
2 changed files with 5 additions and 1 deletions

View 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"

View 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;