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

Commit 01709c20 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Don't create CE Layer when EffectLayer has nothing to draw." into tm-dev

parents f8ba0b95 a3c4d372
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -114,7 +114,13 @@ void EffectLayer::preparePerFrameCompositionState() {
}

sp<compositionengine::LayerFE> EffectLayer::getCompositionEngineLayerFE() const {
    // There's no need to get a CE Layer if the EffectLayer isn't going to draw anything. In that
    // case, it acts more like a ContainerLayer so returning a null CE Layer makes more sense
    if (hasSomethingToDraw()) {
        return asLayerFE();
    } else {
        return nullptr;
    }
}

compositionengine::LayerFECompositionState* EffectLayer::editCompositionState() {