-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Currently, SessionConnection which talks with Scenic is running on the raster thread. This is therefore the thread where we receive presentation information, including OnVsync() events. It is possible today to move VsyncWaiter to the raster thread, by creating a weak factory there instead of on the UI thread where it currently exists. However, when testing this change out I noticed a significant decrease in performance because the raster thread is overutilized, especially by GPURasterizer::Draw events. This means that Flutter has a delay in starting frames, leading to noticeably less FPS.
There are two ways to unblock this problem:
- Fix the overutilization of the raster thread.
- Switch both SessionConnection and VsyncWaiter to the platform thread, which is necessary for Flatland integration anyway. @arbreng is working on this.
When this change happens and SessionConnection and VsyncWaiter are on the same thread, then we can also remove VsyncRecorder, as it'd have no purpose. Its logic could be encapsulated by SessionConnection.