Call rgba8_byte_swap_colors_inplace on the WebGL thread

This commit is contained in:
Anthony Ramine 2018-11-19 11:17:00 +01:00
parent 2c0acf6b9b
commit cfca906ee2
8 changed files with 57 additions and 70 deletions

View file

@ -444,9 +444,7 @@ impl CanvasRenderingContext2D {
let image_size = Size2D::new(img.width, img.height);
let image_data = match img.format {
PixelFormat::BGRA8 => img.bytes.to_vec(),
PixelFormat::K8 => panic!("K8 color type not supported"),
PixelFormat::RGB8 => panic!("RGB8 color type not supported"),
PixelFormat::KA8 => panic!("KA8 color type not supported"),
pixel_format => unimplemented!("unsupported pixel format ({:?})", pixel_format),
};
Some((image_data, image_size))