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

Commit 51a23d8b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9397200 from 7c43a832 to udc-release

Change-Id: I90bfce901d98d67931e94d615b83efc3b9445974
parents 6460cc28 7c43a832
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,5 +21,7 @@ rust_fuzz {
            "waghpawan@google.com",
            "smoreland@google.com",
        ],
        // hotlist "AIDL fuzzers bugs" on buganizer
        hotlists: ["4637097"],
    },
}
+2 −0
Original line number Diff line number Diff line
@@ -29,5 +29,7 @@ rust_fuzz {
            "waghpawan@google.com",
            "smoreland@google.com",
        ],
        // hotlist "AIDL fuzzers bugs" on buganizer
        hotlists: ["4637097"],
    },
}
+21 −12
Original line number Diff line number Diff line
@@ -982,14 +982,16 @@ void SurfaceComposerClient::Transaction::cacheBuffers() {

class SyncCallback {
public:
    static void function(void* callbackContext, nsecs_t /* latchTime */,
    static auto getCallback(std::shared_ptr<SyncCallback>& callbackContext) {
        return [callbackContext](void* /* unused context */, nsecs_t /* latchTime */,
                                 const sp<Fence>& /* presentFence */,
                                 const std::vector<SurfaceControlStats>& /* stats */) {
            if (!callbackContext) {
                ALOGE("failed to get callback context for SyncCallback");
                return;
            }
        SyncCallback* helper = static_cast<SyncCallback*>(callbackContext);
        LOG_ALWAYS_FATAL_IF(sem_post(&helper->mSemaphore), "sem_post failed");
            LOG_ALWAYS_FATAL_IF(sem_post(&callbackContext->mSemaphore), "sem_post failed");
        };
    }
    ~SyncCallback() {
        if (mInitialized) {
@@ -1024,10 +1026,11 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay
        return mStatus;
    }

    SyncCallback syncCallback;
    std::shared_ptr<SyncCallback> syncCallback = std::make_shared<SyncCallback>();
    if (synchronous) {
        syncCallback.init();
        addTransactionCommittedCallback(syncCallback.function, syncCallback.getContext());
        syncCallback->init();
        addTransactionCommittedCallback(SyncCallback::getCallback(syncCallback),
                                        /*callbackContext=*/nullptr);
    }

    bool hasListenerCallbacks = !mListenerCallbacks.empty();
@@ -1103,7 +1106,7 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay
    clear();

    if (synchronous) {
        syncCallback.wait();
        syncCallback->wait();
    }

    mStatus = NO_ERROR;
@@ -2155,6 +2158,12 @@ void SurfaceComposerClient::dispose() {
    mStatus = NO_INIT;
}

status_t SurfaceComposerClient::bootFinished() {
    sp<gui::ISurfaceComposer> sf(ComposerServiceAIDL::getComposerService());
    binder::Status status = sf->bootFinished();
    return statusTFromBinderStatus(status);
}

sp<SurfaceControl> SurfaceComposerClient::createSurface(const String8& name, uint32_t w, uint32_t h,
                                                        PixelFormat format, int32_t flags,
                                                        const sp<IBinder>& parentHandle,
+0 −2
Original line number Diff line number Diff line
@@ -62,8 +62,6 @@ interface ISurfaceComposer {
     * Signal that we're done booting.
     * Requires ACCESS_SURFACE_FLINGER permission
     */
    // Note this must be the 1st method, so IBinder::FIRST_CALL_TRANSACTION
    // is assigned, as it is called from Java by ActivityManagerService.
    void bootFinished();

    /**
+3 −0
Original line number Diff line number Diff line
@@ -158,6 +158,9 @@ public:
    status_t linkToComposerDeath(const sp<IBinder::DeathRecipient>& recipient,
            void* cookie = nullptr, uint32_t flags = 0);

    // Notify the SurfaceComposerClient that the boot procedure has completed
    static status_t bootFinished();

    // Get transactional state of given display.
    static status_t getDisplayState(const sp<IBinder>& display, ui::DisplayState*);

Loading