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

Commit 2ec1c91c authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Automerger Merge Worker
Browse files

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

parents 16d0bb19 01709c20
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() {