From 57ba1646bce7ecd49526657c86db30f5391e8dd7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 Jan 2017 13:29:47 -0800 Subject: webgl: Convert non-raw TexImage sources to the requested format. The code was returning RGBA8 data from the non-raw sources (HTML canvas elements, JS ImageData, etc.), but we then validated and passed that rgba8 data as if it was whatever format/datatype was specified in TexImage2D/TexSubImage2D, so the pixels would come out as garbage. It would seem like we could just rewrite the passed in format/datatype for the TexImage call to be RGBA/UNSIGNED_BYTE, but that would leave incorrect levels of precision if the internalformat didn't match the format/datatype (and older desktop implementations often ignore the internalformat in choosing their internal format, anyway). --- components/script/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'components/script/lib.rs') diff --git a/components/script/lib.rs b/components/script/lib.rs index 15d1d2d322b..8c85efb489f 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -32,6 +32,7 @@ extern crate audio_video_metadata; #[macro_use] extern crate bitflags; extern crate bluetooth_traits; +extern crate byteorder; extern crate canvas_traits; extern crate caseless; extern crate cookie as cookie_rs; -- cgit v1.2.3