-
-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: make sure we don't sleep on events, again
Once again we found ourselves going into sleep while there are X events in libxcb's buffer. This time it's because both vblank_handle_x_events and x_poll_for_events can read from the X connection. This is introduced as part of commit d617d0b. Before that, we were only calling xcb_poll_for_queued_events after vblank_handle_x_events. By changing that to a xcb_poll_for_events (and later to x_poll_for_events, which calls xcb_poll_for_events), we could read additional vblank events into the buffer. These events will not be handled because vblank_handle_x_events has already be called, so we will be going into sleep with these events in the buffer. Since vblank events driver the frame render loop, this causes indefinitely long delay between frames. Related-to: #1345 #1330 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
- Loading branch information
Showing
3 changed files
with
57 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters