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

Commit d1b48539 authored by Ady Abraham's avatar Ady Abraham
Browse files

SurfaceFlinger: run refresh directly after invalidate

Run the refresh immediately after invalidate as there is no point going
thru the message queue again, and to ensure that we actually refresh
the screen instead of handling other messages that were queued us already
n the MessageQueue.

Bug: 182214053
Test: SF unit tests
Test: Launch an app and observe syatraces
Change-Id: Iff647415d46c4b155b20b60b9e7cc07253339100
parent 9e494517
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -1879,7 +1879,12 @@ void SurfaceFlinger::onMessageInvalidate(int64_t vsyncId, nsecs_t expectedVSyncT
            // underestimated.
            // underestimated.
            mFrameStartTime = frameStart;
            mFrameStartTime = frameStart;
        }
        }
        signalRefresh();

        // Run the refresh immediately after invalidate as there is no point going thru the message
        // queue again, and to ensure that we actually refresh the screen instead of handling
        // other messages that were queued us already in the MessageQueue.
        mRefreshPending = true;
        onMessageRefresh();
    }
    }
}
}