From e33811512eb061338792dbb0dbd37a1b8e4e1079 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 2 Dec 2010 15:19:36 -0800 Subject: [PATCH] [3253328, 3171580] Treat GONE and INVISIBLE views the same when calculating transparent regions We only used to check for INVISIBLE, which prevented some Surfaceview optimization to take place. Change-Id: I244b54696d861a022ca1c334ff61ab7efb899587 --- core/java/android/view/ViewGroup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index b9864ba3b1403..2b71b4a492e04 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3304,7 +3304,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager boolean noneOfTheChildrenAreTransparent = true; for (int i = 0; i < count; i++) { final View child = children[i]; - if ((child.mViewFlags & VISIBILITY_MASK) != GONE || child.getAnimation() != null) { + if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE || child.getAnimation() != null) { if (!child.gatherTransparentRegion(region)) { noneOfTheChildrenAreTransparent = false; }