mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +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())),
|
||||
}
|
||||
},
|
||||
Some(CanvasContext::WebGL2(ref context)) => match context
|
||||
.base_context()
|
||||
.get_image_data(self.Width(), self.Height())
|
||||
{
|
||||
Some(CanvasContext::WebGL2(ref context)) => {
|
||||
match context.base_context().get_image_data(self.Width(), self.Height()) {
|
||||
Some(data) => data,
|
||||
None => return Ok(USVString("data:,".into())),
|
||||
}
|
||||
},
|
||||
None => {
|
||||
// Each pixel is fully-transparent black.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue