-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit removes Platform::Window::Redraw function, and rewrites its uses to run on timer events. Most UI toolkits have obscure issues with recursive event handling loops, and Emscripten is purely event- driven and cannot handle imperative redraws at all. As a part of this change, the Platform::Timer::WindUp function is split into three to make the interpretation of its argument less magical. The new functions are RunAfter (a regular timeout, setTimeout in browser terms), RunAfterNextFrame (an animation request, requestAnimationFrame in browser terms), and RunAfterProcessingEvents (a request to run something after all events for the current frame are processed, used for coalescing expensive operations in face of input event queues). This commit changes two uses of Redraw(): the AnimateOnto() and ScreenStepDimGo() functions. The latter was actually broken in that on small sketches, it would run very quickly and not animate the dimension change at all; this has been fixed. While we're at it, get rid of unused Platform::Window::NativePtr function as well.
- Loading branch information
1 parent
738ac02
commit a738e3f
Showing
11 changed files
with
109 additions
and
106 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
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
Oops, something went wrong.