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

Commit 08194acf authored by Dennis Kiilerich's avatar Dennis Kiilerich Committed by Android (Google) Code Review
Browse files

Merge "Lock all of SurfaceFlinger::processDisplayAdded for kMainThreadContext...

Merge "Lock all of SurfaceFlinger::processDisplayAdded for kMainThreadContext instead of just a portion of it." into main
parents 12c5cc40 e2390e8c
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -3974,9 +3974,6 @@ void SurfaceFlinger::processDisplayAdded(const wp<IBinder>& displayToken,
                                                 displaySurface, producer);

    if (mScheduler && !display->isVirtual()) {
        // TODO(b/241285876): Annotate `processDisplayAdded` instead.
        ftl::FakeGuard guard(kMainThreadContext);

        // For hotplug reconnect, renew the registration since display modes have been reloaded.
        mScheduler->registerDisplay(display->getPhysicalId(), display->holdRefreshRateSelector(),
                                    mActiveDisplayId);
+2 −3
Original line number Diff line number Diff line
@@ -350,9 +350,6 @@ protected:
    // We're reference counted, never destroy SurfaceFlinger directly
    virtual ~SurfaceFlinger();

    virtual void processDisplayAdded(const wp<IBinder>& displayToken, const DisplayDeviceState&)
            REQUIRES(mStateLock);

    virtual std::shared_ptr<renderengine::ExternalTexture> getExternalTextureFromBufferData(
            BufferData& bufferData, const char* layerName, uint64_t transactionId);

@@ -1042,6 +1039,8 @@ private:
            const sp<compositionengine::DisplaySurface>& displaySurface,
            const sp<IGraphicBufferProducer>& producer) REQUIRES(mStateLock);
    void processDisplayChangesLocked() REQUIRES(mStateLock, kMainThreadContext);
    void processDisplayAdded(const wp<IBinder>& displayToken, const DisplayDeviceState&)
            REQUIRES(mStateLock, kMainThreadContext);
    void processDisplayRemoved(const wp<IBinder>& displayToken)
            REQUIRES(mStateLock, kMainThreadContext);
    void processDisplayChanged(const wp<IBinder>& displayToken,