mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Don't bother with the global in ImageData::get_image_data
This commit is contained in:
parent
854a3dff68
commit
2400b91d05
4 changed files with 6 additions and 8 deletions
|
@ -273,11 +273,10 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
|
|||
// Step 3.
|
||||
let raw_data = match *self.context.borrow() {
|
||||
Some(CanvasContext::Context2d(ref context)) => {
|
||||
let window = window_from_node(self);
|
||||
let image_data = try!(context.GetImageData(Finite::wrap(0f64), Finite::wrap(0f64),
|
||||
Finite::wrap(self.Width() as f64),
|
||||
Finite::wrap(self.Height() as f64)));
|
||||
image_data.get_data_array(&GlobalRef::Window(window.r()))
|
||||
image_data.get_data_array()
|
||||
}
|
||||
None => {
|
||||
// Each pixel is fully-transparent black.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue