Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 039bbb8a authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Use Layer.getAlpha instead of State.alpha to calculate occlusion

Test: CP lock-free anim CL and make sure no black flickers
when starting window fading out.

Change-Id: I422f69e26ba86414476bae9cc3253caf062d4e36
parent 931dc01a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2437,7 +2437,7 @@ void SurfaceFlinger::computeVisibleRegions(const sp<const DisplayDevice>& displa


                // compute the opaque region
                // compute the opaque region
                const int32_t layerOrientation = tr.getOrientation();
                const int32_t layerOrientation = tr.getOrientation();
                if (s.alpha == 1.0f && !translucent &&
                if (layer->getAlpha() == 1.0f && !translucent &&
                        ((layerOrientation & Transform::ROT_INVALID) == false)) {
                        ((layerOrientation & Transform::ROT_INVALID) == false)) {
                    // the opaque region is the layer's footprint
                    // the opaque region is the layer's footprint
                    opaqueRegion = visibleRegion;
                    opaqueRegion = visibleRegion;