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

Commit 7c863f53 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SurfaceFlinger: Avoid calling to SystemServer with lock held"

parents c258eab3 ce5d0cc3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3873,7 +3873,7 @@ uint32_t SurfaceFlinger::setClientStateLocked(const ComposerState& composerState
        if (layer->setSidebandStream(s.sidebandStream)) flags |= eTraversalNeeded;
    }
    if (what & layer_state_t::eInputInfoChanged) {
        if (callingThreadHasUnscopedSurfaceFlingerAccess()) {
        if (privileged) {
            layer->setInputInfo(s.inputInfo);
            flags |= eTraversalNeeded;
        } else {
+3 −2
Original line number Diff line number Diff line
@@ -584,8 +584,9 @@ private:
    bool containsAnyInvalidClientState(const Vector<ComposerState>& states);
    bool transactionIsReadyToBeApplied(int64_t desiredPresentTime,
                                       const Vector<ComposerState>& states);
    uint32_t setClientStateLocked(const ComposerState& composerState, bool privileged);
    uint32_t setDisplayStateLocked(const DisplayState& s);
    uint32_t setClientStateLocked(const ComposerState& composerState, bool privileged)
            REQUIRES(mStateLock);
    uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock);
    uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands)
            REQUIRES(mStateLock);

+4 −1
Original line number Diff line number Diff line
@@ -257,7 +257,10 @@ public:
        return mFlinger->onHotplugReceived(sequenceId, display, connection);
    }

    auto setDisplayStateLocked(const DisplayState& s) { return mFlinger->setDisplayStateLocked(s); }
    auto setDisplayStateLocked(const DisplayState& s) {
        Mutex::Autolock _l(mFlinger->mStateLock);
        return mFlinger->setDisplayStateLocked(s);
    }

    // Allow reading display state without locking, as if called on the SF main thread.
    auto onInitializeDisplays() NO_THREAD_SAFETY_ANALYSIS {