mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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 cx = global.get_cx();
|
||||
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
|
||||
Uint8ClampedArray::create(
|
||||
*cx,
|
||||
CreateWith::Length(len as usize),
|
||||
array.handle_mut(),
|
||||
)
|
||||
.unwrap();
|
||||
Uint8ClampedArray::create(*cx, CreateWith::Length(len as usize), array.handle_mut())
|
||||
.unwrap();
|
||||
(*imagedata).data.set(array.get());
|
||||
|
||||
Ok(reflect_dom_object(imagedata, global))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue