Conversation
28f6998 to
9bbdece
Compare
|
FWIW: I gave this PR a spin just to see if it affects #8309, but on my computer this PR makes no difference. |
|
@cwfitzgerald This probably warrants a copilot gh review. |
There was a problem hiding this comment.
Pull request overview
This PR updates the repo to use winit 0.30 (and related ecosystem updates like glutin), and refactors examples/tools to the ApplicationHandler + resumed() window creation model required by winit 0.30.
Changes:
- Bump
winitto0.30.xand updateglutin/glutin-winit, removing temporaryraw-window-handle 0.5compatibility. - Refactor native + wasm examples to
ApplicationHandler/run_app(andspawn_appon web), moving window creation intoresumed(). - Update dependency-policy configuration (
.deny.toml) to reflect the new dependency graph.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Bumps winit to 0.30.8 and updates glutin/glutin-winit versions. |
Cargo.lock |
Locks updated dependency graph for the new winit/glutin versions. |
.deny.toml |
Adjusts cargo-deny skip rules for new transitive versions. |
wgpu-hal/Cargo.toml |
Removes rwh_05 compatibility deps and adjusts platform cfgs for the raw-gles example. |
wgpu-hal/examples/raw-gles.rs |
Migrates raw GLES example to ApplicationHandler and rwh 0.6 handle APIs. |
wgpu-hal/examples/halmark/main.rs |
Migrates example to ApplicationHandler and creates window in resumed(). |
wgpu-hal/examples/ray-traced-triangle/main.rs |
Migrates example to ApplicationHandler and creates window in resumed(). |
player/src/bin/play.rs |
Updates winit integration and window/surface creation flow for 0.30. |
examples/features/src/framework.rs |
Refactors shared example framework to ApplicationHandler + async init via user events. |
examples/features/src/hello_triangle/mod.rs |
Refactors hello-triangle to ApplicationHandler + async init via user events. |
examples/features/src/hello_windows/mod.rs |
Refactors hello-windows multi-window example to ApplicationHandler. |
examples/features/src/uniform_values/mod.rs |
Refactors uniform-values example to ApplicationHandler + async init via user events. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Unfortunately still pretty useless |
|
Sea levels rose 0.1m so copilot could read this and leave no comments. |
inner-daemons
left a comment
There was a problem hiding this comment.
Logic is duplicated a lot, so I didn't leave the same comments in 5 places. But many of my comments on hello_triangle or other files also apply to hello_windows, uniform_values, and the other examples.
| let display_handle = event_loop.owned_display_handle(); | ||
| let proxy = self.proxy.clone(); | ||
|
|
||
| spawn(async move { |
There was a problem hiding this comment.
Maybe add a comment saying that this doesn't spawn anything on native
|
|
||
| impl ApplicationHandler<TriangleAction> for App { | ||
| fn resumed(&mut self, event_loop: &ActiveEventLoop) { | ||
| if !matches!(self.state, AppState::Uninitialized) { |
There was a problem hiding this comment.
framework.rs uses surface.resume(context, window.clone(), E::SRGB); here which is a fix for android I think. This skips that?
|
winit 0.31.0-beta.2 is the current version on main. Some notable changes - there are likely more:
Given that this PR is a large change, and the move to 0.31 is likely going to be another large change in a different direction, would it be wise to skip 0.30 and go straight to supporting 0.31? |
|
I'd rather land this incrementally - from your list the diff won't be too bad from 0.30 -> 0.31 and this had to completely restructure the examples. |
|
@Wumpf would be nice to get the examples working with winit 0.30 before the next release, if you have time. |
aa6cda3 to
507a3e1
Compare
Wumpf
left a comment
There was a problem hiding this comment.
reviewed it in person on a call
507a3e1 to
cbc5a1f
Compare
Connections
Closes #5214
Closes #5722
Closes #8155
Description
This moves us entirely over to winit 0.30. This is not amazingly reviewable due to a lot of code needing to move around, but it is mainly just moving things around. If you want to review it, I would look at the new files directly.
Testing
Manual testing across platforms and on the web.
Squash or Rebase?
I think this needs to be squashed, unfortunately.