mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
webgl: Use early return in DrawArrays
This commit is contained in:
parent
240ac7cfe2
commit
466c8881de
1 changed files with 6 additions and 6 deletions
|
@ -743,13 +743,13 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
if first < 0 || count < 0 {
|
if first < 0 || count < 0 {
|
||||||
self.webgl_error(InvalidValue);
|
return self.webgl_error(InvalidValue);
|
||||||
} else {
|
|
||||||
self.ipc_renderer
|
|
||||||
.send(CanvasMsg::WebGL(WebGLCommand::DrawArrays(mode, first, count)))
|
|
||||||
.unwrap();
|
|
||||||
self.mark_as_dirty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.ipc_renderer
|
||||||
|
.send(CanvasMsg::WebGL(WebGLCommand::DrawArrays(mode, first, count)))
|
||||||
|
.unwrap();
|
||||||
|
self.mark_as_dirty();
|
||||||
},
|
},
|
||||||
_ => self.webgl_error(InvalidEnum),
|
_ => self.webgl_error(InvalidEnum),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue