From 1743b64d87cee56e51dedbe4ad60fa2acc28af9c Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 12 Mar 2012 17:04:43 -0700 Subject: Dejank: also animate window moves due to requested size changes. This performance an animation when, for example, a dialog window is moved because the size of its content has changed. Change-Id: I2d79a1a57f94e0f2f8ef706a473fca6c9cc637cf --- services/java/com/android/server/wm/WindowState.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'services') diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java index 167746f..e11c87a 100644 --- a/services/java/com/android/server/wm/WindowState.java +++ b/services/java/com/android/server/wm/WindowState.java @@ -100,6 +100,8 @@ final class WindowState implements WindowManagerPolicy.WindowState, */ int mRequestedWidth; int mRequestedHeight; + int mLastRequestedWidth; + int mLastRequestedHeight; int mLayer; int mAnimLayer; @@ -391,6 +393,8 @@ final class WindowState implements WindowManagerPolicy.WindowState, mSurface = null; mRequestedWidth = 0; mRequestedHeight = 0; + mLastRequestedWidth = 0; + mLastRequestedHeight = 0; mXOffset = 0; mYOffset = 0; mLayer = 0; @@ -458,6 +462,11 @@ final class WindowState implements WindowManagerPolicy.WindowState, mParentFrame.set(pf); mContentChanged = true; } + if (mRequestedWidth != mLastRequestedWidth || mRequestedHeight != mLastRequestedHeight) { + mLastRequestedWidth = mRequestedWidth; + mLastRequestedHeight = mRequestedHeight; + mContentChanged = true; + } final Rect content = mContentFrame; content.set(cf); @@ -1701,6 +1710,10 @@ final class WindowState implements WindowManagerPolicy.WindowState, pw.print(prefix); pw.print("Requested w="); pw.print(mRequestedWidth); pw.print(" h="); pw.print(mRequestedHeight); pw.print(" mLayoutSeq="); pw.println(mLayoutSeq); + if (mRequestedWidth != mLastRequestedWidth || mRequestedHeight != mLastRequestedHeight) { + pw.print(prefix); pw.print("LastRequested w="); pw.print(mLastRequestedWidth); + pw.print(" h="); pw.println(mLastRequestedHeight); + } if (mAttachedWindow != null || mLayoutAttached) { pw.print(prefix); pw.print("mAttachedWindow="); pw.print(mAttachedWindow); pw.print(" mLayoutAttached="); pw.println(mLayoutAttached); -- cgit v1.1