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

Commit cc1c0a47 authored by ramindani's avatar ramindani Committed by Presubmit Automerger Backend
Browse files

[automerge] [SF] Add a new method for latch unsignaled transactions 2p: 9eff2497 2p: a92d86cd

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

Bug: 221079645
Change-Id: Ica1b4107e0c74c6342ef1af12bd071c4767d8cdf
parents 42f27af8 a92d86cd
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -3695,6 +3695,15 @@ bool SurfaceFlinger::stopTransactionProcessing(
    return false;
}

int SurfaceFlinger::flushUnsignaledPendingTransactionQueues(
        std::vector<TransactionState>& transactions,
        std::unordered_map<sp<IBinder>, uint64_t, SpHash<IBinder>>& bufferLayersReadyToPresent,
        std::unordered_set<sp<IBinder>, SpHash<IBinder>>& applyTokensWithUnsignaledTransactions) {
    return flushPendingTransactionQueues(transactions, bufferLayersReadyToPresent,
                                         applyTokensWithUnsignaledTransactions,
                                         /*tryApplyUnsignaled*/ true);
}

int SurfaceFlinger::flushPendingTransactionQueues(
        std::vector<TransactionState>& transactions,
        std::unordered_map<sp<IBinder>, uint64_t, SpHash<IBinder>>& bufferLayersReadyToPresent,
@@ -3849,9 +3858,8 @@ bool SurfaceFlinger::flushTransactionQueues(int64_t vsyncId) {
            // If we are allowing latch unsignaled of some form, now it's the time to go over the
            // transactions that were not applied and try to apply them unsignaled.
            if (enableLatchUnsignaledConfig != LatchUnsignaledConfig::Disabled) {
                flushPendingTransactionQueues(transactions, bufferLayersReadyToPresent,
                                              applyTokensWithUnsignaledTransactions,
                                              /*tryApplyUnsignaled*/ true);
                flushUnsignaledPendingTransactionQueues(transactions, bufferLayersReadyToPresent,
                                                        applyTokensWithUnsignaledTransactions);
            }

            return applyTransactions(transactions, vsyncId);
+6 −0
Original line number Diff line number Diff line
@@ -782,6 +782,12 @@ private:
            std::unordered_set<sp<IBinder>, SpHash<IBinder>>& applyTokensWithUnsignaledTransactions,
            bool tryApplyUnsignaled) REQUIRES(mStateLock, mQueueLock);

    int flushUnsignaledPendingTransactionQueues(
            std::vector<TransactionState>& transactions,
            std::unordered_map<sp<IBinder>, uint64_t, SpHash<IBinder>>& bufferLayersReadyToPresent,
            std::unordered_set<sp<IBinder>, SpHash<IBinder>>& applyTokensWithUnsignaledTransactions)
            REQUIRES(mStateLock, mQueueLock);

    uint32_t setClientStateLocked(const FrameTimelineInfo&, ComposerState&,
                                  int64_t desiredPresentTime, bool isAutoTimestamp,
                                  int64_t postTime, uint32_t permissions) REQUIRES(mStateLock);