diff options
author | Romain Guy <romainguy@google.com> | 2011-01-07 14:48:35 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-07 14:48:35 -0800 |
commit | 2c602e6a66469c9fcd8bc4d7d64aa24134dad8d9 (patch) | |
tree | 24f3ef1debb80c36a1237de19b63518d202a6b45 | |
parent | 8244562c79a735cf3307878f13bc24ca3db23405 (diff) | |
parent | 7e68efb0a098149e1e6f86663e978e9fd26e0ea1 (diff) | |
download | frameworks_base-2c602e6a66469c9fcd8bc4d7d64aa24134dad8d9.zip frameworks_base-2c602e6a66469c9fcd8bc4d7d64aa24134dad8d9.tar.gz frameworks_base-2c602e6a66469c9fcd8bc4d7d64aa24134dad8d9.tar.bz2 |
Merge "Non-opaque views with fading edges cannot be marked dirty opaque. Bug #3325084" into honeycomb
-rw-r--r-- | core/java/android/view/ViewGroup.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 82cf753..bde467b 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3392,7 +3392,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager child.getAnimation() == null; // Mark the child as dirty, using the appropriate flag // Make sure we do not set both flags at the same time - final int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY; + int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY; final int[] location = attachInfo.mInvalidateChildLocation; location[CHILD_LEFT_INDEX] = child.mLeft; @@ -3423,8 +3423,14 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager // If the parent is dirty opaque or not dirty, mark it dirty with the opaque // flag coming from the child that initiated the invalidate - if (view != null && (view.mPrivateFlags & DIRTY_MASK) != DIRTY) { - view.mPrivateFlags = (view.mPrivateFlags & ~DIRTY_MASK) | opaqueFlag; + if (view != null) { + if ((view.mViewFlags & FADING_EDGE_MASK) != 0 && + view.getSolidColor() == 0 && !view.isOpaque()) { + opaqueFlag = DIRTY; + } + if ((view.mPrivateFlags & DIRTY_MASK) != DIRTY) { + view.mPrivateFlags = (view.mPrivateFlags & ~DIRTY_MASK) | opaqueFlag; + } } parent = parent.invalidateChildInParent(location, dirty); |