summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-11-05 15:36:16 -0700
committerChet Haase <chet@google.com>2010-11-09 06:38:56 -0800
commit0d200833fdc53f9796698f97c18cefc4a1b82df2 (patch)
treebef2739584bf97f330eda7c691c011e420cee8e9 /core
parentc55fa1b999068fc7f242b88a87270b249ab366eb (diff)
downloadframeworks_base-0d200833fdc53f9796698f97c18cefc4a1b82df2.zip
frameworks_base-0d200833fdc53f9796698f97c18cefc4a1b82df2.tar.gz
frameworks_base-0d200833fdc53f9796698f97c18cefc4a1b82df2.tar.bz2
Fix GL rendering of translucent surfaces
GL renderer was not initializing scissor correctly for translucent surfaces, resulting in invisible window backgrounds in some cases like fading popup windows Change-Id: I87a964986e1ba2c4f59708c8892c5fa71903e6fc
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/ViewGroup.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 17384c1..ac63742 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -3254,13 +3254,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
// through
final boolean drawAnimation = (child.mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION;
- // Check whether the child that requests the invalidate is fully opaque
- final boolean isOpaque = child.isOpaque() && !drawAnimation &&
- 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;
-
if (dirty == null) {
do {
View view = null;
@@ -3286,10 +3279,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
} else if (view != null) {
if ((mPrivateFlags & DRAWN) == DRAWN) {
view.mPrivateFlags &= ~DRAWING_CACHE_VALID;
- if (view != null && (view.mPrivateFlags & DIRTY_MASK) != DIRTY) {
- view.mPrivateFlags =
- (view.mPrivateFlags & ~DIRTY_MASK) | opaqueFlag;
- }
+ view.mPrivateFlags |= DIRTY;
parent = view.mParent;
} else {
parent = null;
@@ -3297,6 +3287,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
}
} while (parent != null);
} else {
+ // Check whether the child that requests the invalidate is fully opaque
+ final boolean isOpaque = child.isOpaque() && !drawAnimation &&
+ 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;
+
final int[] location = attachInfo.mInvalidateChildLocation;
location[CHILD_LEFT_INDEX] = child.mLeft;
location[CHILD_TOP_INDEX] = child.mTop;