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

Add HTMLImageElement/ImageData as external source for copying images #5668

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

valaphee
Copy link
Contributor

@valaphee valaphee commented May 5, 2024

Connections
Closes #4236
Depends on grovesNL/glow#291

Description
This adds the missing external sources for HTMLImageElement and ImageData which are useful for removing the need to ship an image decoder with an wasm application.

Testing
TODO: We should add a texture example, which on wasm loads the texture via external image source.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@valaphee
Copy link
Contributor Author

valaphee commented May 5, 2024

Now just VideoFrame is missing, but this also seems to be experimental

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

lgtm!
@grovesNL any chance you can check on the glow pr and the possibility of releasing it some point before the next wgpu release?

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

This seems to be unblocked, can you just rebase against the latest release and we should be good to land.

@cwfitzgerald
Copy link
Member

Thanks!

@cwfitzgerald cwfitzgerald merged commit b4db97f into gfx-rs:trunk Aug 20, 2024
25 checks passed
@valaphee
Copy link
Contributor Author

Ah forgot to write that it closes #4236

@cwfitzgerald
Copy link
Member

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExternalImageSource should support HTMLImageElement and ImageData
3 participants