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

Commit 1072fc50 authored by Anton Ivanov's avatar Anton Ivanov Committed by Android (Google) Code Review
Browse files

Merge "Add Transaction.addTransactionBarrier() for JNI." into main

parents a2f3a8f2 6676180d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ filegroup {
        "android/gui/EarlyWakeupInfo.aidl",
        "android/gui/StalledTransactionInfo.aidl",
        "android/**/TouchOcclusionMode.aidl",
        "android/gui/TransactionBarrier.aidl",
        "android/gui/TrustedOverlay.aidl",
        "android/gui/Vec2.aidl",
    ],
+6 −0
Original line number Diff line number Diff line
@@ -2369,6 +2369,12 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setConte
    return *this;
}

SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::addTransactionBarrier(
        gui::TransactionBarrier barrier) {
    mState.mBarriers.emplace_back(std::move(barrier));
    return *this;
}

// ---------------------------------------------------------------------------

DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) {
+11 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#include <android/gui/BnJankListener.h>
#include <android/gui/ISurfaceComposerClient.h>
#include <android/gui/RegionSamplingDescriptor.h>
#include <android/gui/TransactionBarrier.h>

#include <gui/BufferReleaseChannel.h>
#include <gui/CpuConsumer.h>
@@ -803,6 +804,16 @@ public:
         */
        Transaction& setContentPriority(const sp<SurfaceControl>& sc, int32_t contentPriority);

        /**
         * Adds a barrier to the transaction.
         *
         * Transaction barriers are an interprocess synchronization mechanism.
         * A transaction with a WAIT barrier will remain queued until a SIGNAL
         * transaction for this barrier is applied.  In this way, transactions
         * can be reliably sequenced.
         */
        Transaction& addTransactionBarrier(gui::TransactionBarrier barrier);

        status_t setDisplaySurface(const sp<IBinder>& token,
                const sp<IGraphicBufferProducer>& bufferProducer);