Skip to content

Commit e338115

Browse files
committed
[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
1 parent 1989af2 commit e338115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/view/ViewGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3304,7 +3304,7 @@ public boolean gatherTransparentRegion(Region region) {
33043304
boolean noneOfTheChildrenAreTransparent = true;
33053305
for (int i = 0; i < count; i++) {
33063306
final View child = children[i];
3307-
if ((child.mViewFlags & VISIBILITY_MASK) != GONE || child.getAnimation() != null) {
3307+
if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE || child.getAnimation() != null) {
33083308
if (!child.gatherTransparentRegion(region)) {
33093309
noneOfTheChildrenAreTransparent = false;
33103310
}

0 commit comments

Comments
 (0)