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

Commit 7772dadd authored by David Sodman's avatar David Sodman
Browse files

SF: use Layer::getAlpha rather than state.color.a

Bug: 110632776
Test: run Cts -m CtsViewTestCases
Change-Id: I4902ad480b098d03e43c9b3d11911d4316c4204e
parent 2a268cf2
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -3231,9 +3231,10 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& display) {
                case HWC2::Composition::Sideband:
                case HWC2::Composition::SolidColor: {
                    const Layer::State& state(compositionInfo.layer->mLayer->getDrawingState());
                    const bool opaque = compositionInfo.layer->mLayer->isOpaque(state);
                    if (compositionInfo.hwc.clearClientTarget && !firstLayer &&
                            opaque && (state.color.a == 1.0f) && hasClientComposition) {
                    const bool opaque = compositionInfo.layer->mLayer->isOpaque(state) &&
                                        compositionInfo.layer->mLayer->getAlpha() == 1.0f;
                    if (compositionInfo.hwc.clearClientTarget && !firstLayer && opaque &&
                            hasClientComposition) {
                        // never clear the very first layer since we're
                        // guaranteed the FB is already cleared
                        compositionInfo.layer->clear(getRenderEngine());