diff options
author | Chet Haase <chet@google.com> | 2011-07-19 11:40:34 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-19 11:40:34 -0700 |
commit | db94b0a5b071bafd5ae8cb9735528aa9d4b31cc8 (patch) | |
tree | f46f9ecda4fce4614f269c6845639d80dc3ca769 | |
parent | 378c368f20d9746f07c8047172f5931abf69af8e (diff) | |
parent | a3db866056adb01820bbd6389d20fc550be87eb3 (diff) | |
download | frameworks_base-db94b0a5b071bafd5ae8cb9735528aa9d4b31cc8.zip frameworks_base-db94b0a5b071bafd5ae8cb9735528aa9d4b31cc8.tar.gz frameworks_base-db94b0a5b071bafd5ae8cb9735528aa9d4b31cc8.tar.bz2 |
Merge "Don't constrain invalidation rect when not clipping children"
-rw-r--r-- | core/java/android/view/ViewGroup.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index a6c158d..5624eb4 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3964,7 +3964,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager final int left = mLeft; final int top = mTop; - if (dirty.intersect(0, 0, mRight - left, mBottom - top) || + if ((mGroupFlags & FLAG_CLIP_CHILDREN) != FLAG_CLIP_CHILDREN || + dirty.intersect(0, 0, mRight - left, mBottom - top) || (mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION) { mPrivateFlags &= ~DRAWING_CACHE_VALID; @@ -3982,8 +3983,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager location[CHILD_LEFT_INDEX] = mLeft; location[CHILD_TOP_INDEX] = mTop; - - dirty.set(0, 0, mRight - mLeft, mBottom - mTop); + if ((mGroupFlags & FLAG_CLIP_CHILDREN) == FLAG_CLIP_CHILDREN) { + dirty.set(0, 0, mRight - mLeft, mBottom - mTop); + } else { + // in case the dirty rect extends outside the bounds of this container + dirty.union(0, 0, mRight - mLeft, mBottom - mTop); + } if (mLayerType != LAYER_TYPE_NONE) { mLocalDirtyRect.union(dirty); |