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

Commit 0637957e authored by chaviw's avatar chaviw Committed by Presubmit Automerger Backend
Browse files

[automerge] Don't create CE Layer when EffectLayer has nothing to draw. 2p: a3c4d372

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/17591706

Change-Id: I2db93754293181d985226f222780e2670f35a83a
parents 7701023b 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() {