[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
This commit is contained in:
Mathias Agopian
2010-12-02 15:19:36 -08:00
parent 1989af22b5
commit e33811512e

View File

@@ -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;
}