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

Commit 14df9a0d authored by Valerie Hau's avatar Valerie Hau Committed by Automerger Merge Worker
Browse files

[RESTRICT AUTOMERGE] Send callbacks earlier am: 7687b3cd

Change-Id: I70078b1a443d34d361257885c9b6eaa05e763640
parents d8ff894f 7687b3cd
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -2092,6 +2092,16 @@ void SurfaceFlinger::postComposition()
        }
        }
    });
    });


    mTransactionCompletedThread.addPresentFence(mPreviousPresentFences[0]);

    // Lock the mStateLock in case SurfaceFlinger is in the middle of applying a transaction.
    // If we do not lock here, a callback could be sent without all of its SurfaceControls and
    // metrics.
    {
        Mutex::Autolock _l(mStateLock);
        mTransactionCompletedThread.sendCallbacks();
    }

    if (presentFenceTime->isValid()) {
    if (presentFenceTime->isValid()) {
        mScheduler->addPresentFence(presentFenceTime);
        mScheduler->addPresentFence(presentFenceTime);
    }
    }
@@ -2163,16 +2173,6 @@ void SurfaceFlinger::postComposition()
        }
        }
    }
    }


    mTransactionCompletedThread.addPresentFence(mPreviousPresentFences[0]);

    // Lock the mStateLock in case SurfaceFlinger is in the middle of applying a transaction.
    // If we do not lock here, a callback could be sent without all of its SurfaceControls and
    // metrics.
    {
        Mutex::Autolock _l(mStateLock);
        mTransactionCompletedThread.sendCallbacks();
    }

    if (mLumaSampling && mRegionSamplingThread) {
    if (mLumaSampling && mRegionSamplingThread) {
        mRegionSamplingThread->notifyNewContent();
        mRegionSamplingThread->notifyNewContent();
    }
    }