render: Fix swapped 'width' and 'height' in wgpu `register_bitmap_raw`

These arguments were being passed in the wrong order, leading to a crash
when the width and height are not equal.
This commit is contained in:
Aaron Hill 2022-05-25 14:07:24 -04:00 committed by relrelb
parent 15cb9a9ce6
commit 811af340c3
1 changed files with 1 additions and 1 deletions

View File

@ -1448,7 +1448,7 @@ impl<T: RenderTarget + 'static> RenderBackend for WgpuRenderBackend<T> {
rgba: Vec<u8>,
) -> Result<BitmapHandle, Error> {
Ok(self
.register_bitmap(Bitmap::new(height, width, BitmapFormat::Rgba, rgba), "RAW")
.register_bitmap(Bitmap::new(width, height, BitmapFormat::Rgba, rgba), "RAW")
.handle)
}