Skip to content

Commit

Permalink
Reindent the WebGL 2 case of canvas.toDataURL
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Oct 3, 2018
1 parent cfd4462 commit 5efbeea
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions components/script/dom/htmlcanvaselement.rs
Expand Up @@ -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(data) => data,
None => return Ok(USVString("data:,".into())),
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.
Expand Down

0 comments on commit 5efbeea

Please sign in to comment.