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

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

Merge "Enable effect layers with blur"

parents ae00b8c5 b83097dd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ std::vector<compositionengine::LayerFE::LayerSettings> EffectLayer::prepareClien
        // Set color for color fill settings.
        layerSettings->source.solidColor = getColor().rgb;
        results.push_back(*layerSettings);
    } else if (hasBlur()) {
        results.push_back(*layerSettings);
    }

    return results;
@@ -148,6 +150,10 @@ bool EffectLayer::fillsColor() const {
            mDrawingState.color.b >= 0.0_hf;
}

bool EffectLayer::hasBlur() const {
    return getBackgroundBlurRadius() > 0;
}

} // namespace android

// TODO(b/129481165): remove the #pragma below and fix conversion issues
+3 −1
Original line number Diff line number Diff line
@@ -62,7 +62,9 @@ protected:
private:
    // Returns true if there is a valid color to fill.
    bool fillsColor() const;
    bool hasSomethingToDraw() const { return fillsColor() || drawShadows(); }
    // Returns true if this layer has a blur value.
    bool hasBlur() const;
    bool hasSomethingToDraw() const { return fillsColor() || drawShadows() || hasBlur(); }
};

} // namespace android