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

Commit 04f8bdfb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes from topic "presubmit-am-5b736da41d414f9989fab9a41f2ed807" into tm-dev am: 5d71248e

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

Change-Id: I4eeaea62944a1db7079b1af8156f3df41487a428
parents e53a5850 5d71248e
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -3675,16 +3675,13 @@ uint32_t SurfaceFlinger::clearTransactionFlags(uint32_t mask) {
    return mTransactionFlags.fetch_and(~mask) & mask;
}

uint32_t SurfaceFlinger::setTransactionFlags(uint32_t mask) {
    return setTransactionFlags(mask, TransactionSchedule::Late);
}

uint32_t SurfaceFlinger::setTransactionFlags(uint32_t mask, TransactionSchedule schedule,
void SurfaceFlinger::setTransactionFlags(uint32_t mask, TransactionSchedule schedule,
                                         const sp<IBinder>& applyToken) {
    const uint32_t old = mTransactionFlags.fetch_or(mask);
    modulateVsync(&VsyncModulator::setTransactionSchedule, schedule, applyToken);
    if ((old & mask) == 0) scheduleCommit(FrameHint::kActive);
    return old;

    if (const bool scheduled = mTransactionFlags.fetch_or(mask) & mask; !scheduled) {
        scheduleCommit(FrameHint::kActive);
    }
}

bool SurfaceFlinger::stopTransactionProcessing(
+4 −10
Original line number Diff line number Diff line
@@ -786,21 +786,15 @@ private:

    uint32_t getTransactionFlags() const;

    // Sets the masked bits, and returns the old flags.
    uint32_t setTransactionFlags(uint32_t mask);
    // Sets the masked bits, and schedules a commit if needed.
    void setTransactionFlags(uint32_t mask, TransactionSchedule = TransactionSchedule::Late,
                             const sp<IBinder>& applyToken = nullptr);

    // Clears and returns the masked bits.
    uint32_t clearTransactionFlags(uint32_t mask);

    // Indicate SF should call doTraversal on layers, but don't trigger a wakeup! We use this cases
    // where there are still pending transactions but we know they won't be ready until a frame
    // arrives from a different layer. So we need to ensure we performTransaction from invalidate
    // but there is no need to try and wake up immediately to do it. Rather we rely on
    // onFrameAvailable or another layer update to wake us up.
    void setTraversalNeeded();
    uint32_t setTransactionFlags(uint32_t mask, TransactionSchedule,
                                 const sp<IBinder>& applyToken = {});
    void commitOffscreenLayers();

    enum class TransactionReadiness {
        NotReady,
        NotReadyBarrier,