mirror of
https://github.com/servo/servo.git
synced 2025-07-03 21:43:41 +01:00
Reindent the WebGL 2 case of canvas.toDataURL
This commit is contained in:
parent
cfd446218b
commit
5efbeea61c
1 changed files with 5 additions and 6 deletions
|
@ -383,12 +383,11 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
|
||||||
None => return Ok(USVString("data:,".into())),
|
None => return Ok(USVString("data:,".into())),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Some(CanvasContext::WebGL2(ref context)) => match context
|
Some(CanvasContext::WebGL2(ref context)) => {
|
||||||
.base_context()
|
match context.base_context().get_image_data(self.Width(), self.Height()) {
|
||||||
.get_image_data(self.Width(), self.Height())
|
Some(data) => data,
|
||||||
{
|
None => return Ok(USVString("data:,".into())),
|
||||||
Some(data) => data,
|
}
|
||||||
None => return Ok(USVString("data:,".into())),
|
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
// Each pixel is fully-transparent black.
|
// Each pixel is fully-transparent black.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue