-
Notifications
You must be signed in to change notification settings - Fork 949
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
Change get_preferred_format to get_supported_formats #2783
Change get_preferred_format to get_supported_formats #2783
Conversation
Trying to understand this error, when error[E0599]: no method named `get_supported_formats` found for struct `GpuCanvasContext` in the current scope
--> wgpu\src\backend\web.rs:1198:14
|
1198 | .get_supported_formats(&adapter.0)
| ^^^^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `get_preferred_format`
For more information about this error, try `rustc --explain E0599`. |
All that stuff is behind the web_sys_unstable_apis cfg, so doesn't show up on docs.rs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for tackling this, some comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more change then we're good
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Connections
Closes #2718
Description
Converted everything related to
get_preferred_format -> Option<TextureFormat>
toget_supported_formats -> Option<Vec<TextureFormat>>
Converted the web version to return the set of texture formats defined by https://gpuweb.github.io/gpuweb/#supported-context-formats
Testing
I ran
cargo nextest run --no-fail-fast