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

Commit 83680093 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SurfaceFlinger: Consider parent alpha as well"

parents dfabb598 2eae6d38
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -68,8 +68,7 @@ void ColorLayer::drawNow(const RenderArea& renderArea, bool useIdentityTransform
}

bool ColorLayer::isVisible() const {
    const Layer::State& s(getDrawingState());
    return !isHiddenByPolicy() && s.color.a;
    return !isHiddenByPolicy() && getAlpha() > 0.0f;
}

void ColorLayer::setPerFrameData(const sp<const DisplayDevice>& display) {
+2 −1
Original line number Diff line number Diff line
@@ -3214,7 +3214,8 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& display) {
                case HWC2::Composition::SolidColor: {
                    const Layer::State& state(layer->getDrawingState());
                    if (layer->getClearClientTarget(displayId) && !firstLayer &&
                        layer->isOpaque(state) && (state.color.a == 1.0f) && hasClientComposition) {
                        layer->isOpaque(state) && (layer->getAlpha() == 1.0f) &&
                        hasClientComposition) {
                        // never clear the very first layer since we're
                        // guaranteed the FB is already cleared
                        layer->clearWithOpenGL(renderArea);