mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
fmt
This commit is contained in:
parent
61d7775673
commit
5f91ab07da
2 changed files with 2 additions and 6 deletions
BIN
canvas.png
Normal file
BIN
canvas.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
|
@ -114,12 +114,8 @@ impl ImageData {
|
||||||
let len = width * height * 4;
|
let len = width * height * 4;
|
||||||
let cx = global.get_cx();
|
let cx = global.get_cx();
|
||||||
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
|
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
|
||||||
Uint8ClampedArray::create(
|
Uint8ClampedArray::create(*cx, CreateWith::Length(len as usize), array.handle_mut())
|
||||||
*cx,
|
.unwrap();
|
||||||
CreateWith::Length(len as usize),
|
|
||||||
array.handle_mut(),
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
(*imagedata).data.set(array.get());
|
(*imagedata).data.set(array.get());
|
||||||
|
|
||||||
Ok(reflect_dom_object(imagedata, global))
|
Ok(reflect_dom_object(imagedata, global))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue