diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-03-12 17:04:43 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-03-12 17:04:43 -0700 |
commit | 1743b64d87cee56e51dedbe4ad60fa2acc28af9c (patch) | |
tree | 2d699fdbd52b7c3917643e61cca63aabb8eabc17 /services | |
parent | 035c20f5b4f31a2a4b592ff5004fe67fef0106d2 (diff) | |
download | frameworks_base-1743b64d87cee56e51dedbe4ad60fa2acc28af9c.zip frameworks_base-1743b64d87cee56e51dedbe4ad60fa2acc28af9c.tar.gz frameworks_base-1743b64d87cee56e51dedbe4ad60fa2acc28af9c.tar.bz2 |
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
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/wm/WindowState.java | 13 |
1 files changed, 13 insertions, 0 deletions
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); |