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

Commit 99dccfc3 authored by Pablo Ceballos's avatar Pablo Ceballos Committed by Android (Google) Code Review
Browse files

Merge "Revert "SF: detachLayer from Client earlier on destruction"" into nyc-dev

parents 9018f173 8ea4e7b8
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -165,6 +165,11 @@ void Layer::onFirstRef() {
}

Layer::~Layer() {
  sp<Client> c(mClientRef.promote());
    if (c != 0) {
        c->detachLayer(this);
    }

    for (auto& point : mRemoteSyncPoints) {
        point->setTransactionApplied();
    }
@@ -260,10 +265,6 @@ void Layer::onSidebandStreamChanged() {
// the layer has been remove from the current state list (and just before
// it's removed from the drawing state list)
void Layer::onRemoved() {
    sp<Client> c(mClientRef.promote());
    if (c != 0) {
        c->detachLayer(this);
    }
    mSurfaceFlingerConsumer->abandon();
}