Skip to content

Implement revamped RedrawRequested on Web#1301

Merged
ryanisaacg merged 2 commits intorust-windowing:redraw-requested-2.0from
hecrj:web-redraw-requested-2.0
Dec 3, 2019
Merged

Implement revamped RedrawRequested on Web#1301
ryanisaacg merged 2 commits intorust-windowing:redraw-requested-2.0from
hecrj:web-redraw-requested-2.0

Conversation

@hecrj
Copy link
Copy Markdown
Contributor

@hecrj hecrj commented Dec 2, 2019

Related to #1082.

I figured I would give this a shot and it was easier than I expected. Once this and #1299 are merged, I think #1082 will be ready to go!

I have also added a web example to test things out. It seems to work fine.

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • cargo doc builds successfully
  • 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

@hecrj hecrj changed the title Web redraw requested 2.0 Implement revamped RedrawRequested on Web Dec 2, 2019
@hecrj hecrj force-pushed the web-redraw-requested-2.0 branch from 2a87caa to 59691b0 Compare December 2, 2019 01:39
Comment thread Cargo.toml Outdated
[dev-dependencies]
image = "0.21"
env_logger = "0.5"
console_log = "0.1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be good to do to target.'cfg(target_arch = "wasm32")'.dev-dependencies] and maybe even with the sys-web feature flag but I don't feel too strongly about it.

Copy link
Copy Markdown
Contributor Author

@hecrj hecrj Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, it's not possible to check enabled features in the Cargo manifest.

In any case, I have changed it to only enable console_log when targetting wasm32. Thanks for the catch.

@hecrj hecrj force-pushed the web-redraw-requested-2.0 branch from 59691b0 to 1d082db Compare December 2, 2019 03:36
Copy link
Copy Markdown
Contributor

@Osspial Osspial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this out, and it seems to work swimmingly. Unless anyone else sees any outstanding issues, this should be good to merge!

@ryanisaacg ryanisaacg mentioned this pull request Dec 3, 2019
5 tasks
@ryanisaacg ryanisaacg merged commit 23c1081 into rust-windowing:redraw-requested-2.0 Dec 3, 2019
Osspial pushed a commit that referenced this pull request Dec 22, 2019
* Implement revamped `RedrawRequested` on Web

* Add `web` example
Osspial pushed a commit that referenced this pull request Dec 22, 2019
* Implement revamped `RedrawRequested` on Web

* Add `web` example
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.

4 participants