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

Commit f4fa8fb4 authored by Chia-I Wu's avatar Chia-I Wu Committed by android-build-merger
Browse files

surfaceflinger: clear HWC layers in Layer::onRemoved v2 am: 3851225f

am: 7062f1cb

Change-Id: I2b56e2db8e4fc55f59d064da5908b08a5761c0fb
parents 442b6de7 7062f1cb
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -298,6 +298,11 @@ void Layer::onRemoved() {
    }
    }


    mSurfaceFlingerConsumer->abandon();
    mSurfaceFlingerConsumer->abandon();

#ifdef USE_HWC2
    clearHwcLayers();
#endif

    for (const auto& child : mCurrentChildren) {
    for (const auto& child : mCurrentChildren) {
        child->onRemoved();
        child->onRemoved();
    }
    }