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

Commit d08f4467 authored by Giulio Cervera's avatar Giulio Cervera Committed by Gerrit Code Review
Browse files

Merge "fix a possible deadlock when removing a layer and destroying a client" into cm-10.2

parents e59600ae 68980410
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1066,6 +1066,12 @@ void SurfaceFlinger::handleTransaction(uint32_t transactionFlags)
{
    ATRACE_CALL();

    // here we keep a copy of the drawing state (that is the state that's
    // going to be overwritten by handleTransactionLocked()) outside of
    // mStateLock so that the side-effects of the State assignment
    // don't happen with mStateLock held (which can cause deadlocks).
    State drawingState(mDrawingState);

    Mutex::Autolock _l(mStateLock);
    const nsecs_t now = systemTime();
    mDebugInTransaction = now;