diff options
| author | Chet Haase <chet@google.com> | 2012-10-23 15:45:41 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-23 15:46:04 -0700 |
| commit | fbba753f62f13a12d9287c67921d1ea60e92768d (patch) | |
| tree | fc7c9718a6056e41d0923d63107c702f17452972 /core | |
| parent | b75ade9cce02dffb967ff4719381254585074c58 (diff) | |
| parent | 3561d062ff01f3455c984e4cfcd101a64a2e902f (diff) | |
| download | frameworks_base-fbba753f62f13a12d9287c67921d1ea60e92768d.zip frameworks_base-fbba753f62f13a12d9287c67921d1ea60e92768d.tar.gz frameworks_base-fbba753f62f13a12d9287c67921d1ea60e92768d.tar.bz2 | |
Merge "Handle offscreen animations correctly" into jb-mr1-dev
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index fa79b07..cd63f07 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -859,7 +859,7 @@ public final class ViewRootImpl implements ViewParent, if (dirty == null) { invalidate(); return null; - } else if (dirty.isEmpty()) { + } else if (dirty.isEmpty() && !mIsAnimating) { return null; } @@ -888,14 +888,14 @@ public final class ViewRootImpl implements ViewParent, // Intersect with the bounds of the window to skip // updates that lie outside of the visible region final float appScale = mAttachInfo.mApplicationScale; - if (localDirty.intersect(0, 0, - (int) (mWidth * appScale + 0.5f), (int) (mHeight * appScale + 0.5f))) { - if (!mWillDrawSoon) { - scheduleTraversals(); - } - } else { + final boolean intersected = localDirty.intersect(0, 0, + (int) (mWidth * appScale + 0.5f), (int) (mHeight * appScale + 0.5f)); + if (!intersected) { localDirty.setEmpty(); } + if (!mWillDrawSoon && (intersected || mIsAnimating)) { + scheduleTraversals(); + } return null; } |
