summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-10-23 15:51:24 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-23 15:51:24 -0700
commit4a82a0fc09f4743b59b5de483329fb76e60aab07 (patch)
tree6ddc08eef33139d39b2d9934a0c666fa15fd6279 /core
parentbe815669d1c41a95f79222aaa7caa4462bddfb2d (diff)
parentf5fa64f24b0ee6aa53ac2803590e8729122c445b (diff)
downloadframeworks_base-4a82a0fc09f4743b59b5de483329fb76e60aab07.zip
frameworks_base-4a82a0fc09f4743b59b5de483329fb76e60aab07.tar.gz
frameworks_base-4a82a0fc09f4743b59b5de483329fb76e60aab07.tar.bz2
am f5fa64f2: am fbba753f: Merge "Handle offscreen animations correctly" into jb-mr1-dev
* commit 'f5fa64f24b0ee6aa53ac2803590e8729122c445b': Handle offscreen animations correctly
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/ViewRootImpl.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 73b84ce..95576e9 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -861,7 +861,7 @@ public final class ViewRootImpl implements ViewParent,
if (dirty == null) {
invalidate();
return null;
- } else if (dirty.isEmpty()) {
+ } else if (dirty.isEmpty() && !mIsAnimating) {
return null;
}
@@ -890,14 +890,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;
}