Skip to content

Fix web redraw requested#1181

Merged
ryanisaacg merged 3 commits intorust-windowing:webfrom
ryanisaacg:fix-web-redraw-requested
Sep 23, 2019
Merged

Fix web redraw requested#1181
ryanisaacg merged 3 commits intorust-windowing:webfrom
ryanisaacg:fix-web-redraw-requested

Conversation

@ryanisaacg
Copy link
Copy Markdown
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