Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix web redraw requested #1181

Merged
merged 3 commits into from
Sep 23, 2019

Conversation

ryanisaacg
Copy link
Contributor

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

request_redraw on web would just dispatch unbounded amounts of requestAnimationFrame, which would lead to slowdowns over time. It also wasn't dispatched in the right point of the event loop.

Instead of using request_animation_frame and sending redraw request
events, just keep track of all windows that have asked for a redraw.
This doesn't handle dispatching the events
@ryanisaacg ryanisaacg mentioned this pull request Sep 22, 2019
10 tasks
@ryanisaacg ryanisaacg merged commit 28a5081 into rust-windowing:web Sep 23, 2019
@ryanisaacg ryanisaacg deleted the fix-web-redraw-requested branch September 23, 2019 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant