webgpu: implement get image for webgpu canvas (#35237)

* Implement `get_image_data` for WebGPU canvas

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Add docs

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2025-01-31 16:24:33 +01:00 committed by GitHub
parent 42b581a6f6
commit 35835af857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 50 additions and 40 deletions

View file

@ -531,6 +531,9 @@ impl WGPU {
log::error!("Error occured in SwapChainPresent: {e:?}");
}
},
WebGPURequest::GetImage { context_id, sender } => {
sender.send(self.get_image(context_id)).unwrap()
},
WebGPURequest::ValidateTextureDescriptor {
device_id,
texture_id,