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

Commit 54ebc564 authored by Dan Stoza's avatar Dan Stoza Committed by Android (Google) Code Review
Browse files

Merge "SF: Clear local sync points on hide and destroy" into nyc-dev

parents 9a8ddb6e c8145170
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -178,6 +178,9 @@ Layer::~Layer() {
    for (auto& point : mRemoteSyncPoints) {
        point->setTransactionApplied();
    }
    for (auto& point : mLocalSyncPoints) {
        point->setFrameAvailable();
    }
    mFlinger->deleteTextureAsync(mTextureName);
    mFrameTracker.logAndResetStats(mName);
}
@@ -1478,6 +1481,17 @@ uint32_t Layer::doTransaction(uint32_t flags) {
                (type >= Transform::SCALE));
    }

    // If the layer is hidden, signal and clear out all local sync points so
    // that transactions for layers depending on this layer's frames becoming
    // visible are not blocked
    if (c.flags & layer_state_t::eLayerHidden) {
        Mutex::Autolock lock(mLocalSyncPointMutex);
        for (auto& point : mLocalSyncPoints) {
            point->setFrameAvailable();
        }
        mLocalSyncPoints.clear();
    }

    // Commit the transaction
    commitTransaction(c);
    return flags;