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

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

Merge changes from topic "presubmit-am-2547badef93c4b82b645e06e98481458" into tm-mainline-prod

* changes:
  [automerge] Don't create CE Layer when EffectLayer has nothing to draw. 2p: a3c4d372
  Don't create CE Layer when EffectLayer has nothing to draw.
parents c870430f 0637957e
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() {