mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Avoid copying pixels in ctx.putImageData sometimes
This commit is contained in:
parent
19f40cdf0b
commit
75e6f5dfaa
6 changed files with 53 additions and 41 deletions
|
@ -520,7 +520,7 @@ impl WebGLRenderingContext {
|
|||
) -> Fallible<Option<(Vec<u8>, Size2D<u32>, bool)>> {
|
||||
Ok(Some(match source {
|
||||
TexImageSource::ImageData(image_data) => {
|
||||
(image_data.get_data_array(), image_data.get_size(), false)
|
||||
(image_data.to_vec(), image_data.get_size(), false)
|
||||
},
|
||||
TexImageSource::HTMLImageElement(image) => {
|
||||
let document = document_from_node(&*self.canvas);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue