Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and cleanup of the drawing dispatch system
Previously, drawing was handled with custom DRAW and DRAW_ALL events which individual event handlers managed. DRAW was used for only-as-needed draws, and DRAW_ALL for drawing everything. As we've switched to accelerated rendering, we've switched to the latter model all the time; everything is always drawn. Both DRAW and DRAW_ALL events aren't needed anymore and have been removed. Instead, we simply call each handler's draw() function directly from events::pump. The two main cases that handled draw events - the display class and GUI2 - just forwarded the event handler calls to their respective draw() functions anyway. Awhile back to unconditionally send draw events to the event queue constantly every 20 ms. However, to prevent draw calls from becoming backed up, the queue already had code to remove all but 1 draw event from the queue anyway, so the actual rate of drawing was still reliant on the rate at which events::pump was called. Therefor this commit should result in no change at the rate the screen is drawn.
- Loading branch information
Showing
8 changed files
with
30 additions
and
160 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
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
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