aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgl_extensions
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2018-07-24 13:27:33 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2018-07-24 13:27:33 +0200
commit661e258b28fd7dcc92ab233f66bf49c061542865 (patch)
tree602fefb45a030dabfafc4d648cf7b214be657eac /components/script/dom/webgl_extensions
parent8933a06eb8cf0815927c7491dd572c5c776f6d14 (diff)
downloadservo-661e258b28fd7dcc92ab233f66bf49c061542865.tar.gz
servo-661e258b28fd7dcc92ab233f66bf49c061542865.zip
Store a reference to the WebGLRenderingContext in WebGLObject
Diffstat (limited to 'components/script/dom/webgl_extensions')
-rw-r--r--components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
index 9ec3065af49..6ae83c401ba 100644
--- a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
+++ b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
@@ -48,15 +48,7 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
fn CreateVertexArrayOES(&self) -> Option<DomRoot<WebGLVertexArrayObjectOES>> {
let (sender, receiver) = webgl_channel().unwrap();
self.ctx.send_command(WebGLCommand::CreateVertexArray(sender));
-
- let result = receiver.recv().unwrap();
- result.map(|vao_id| {
- WebGLVertexArrayObjectOES::new(
- &self.global(),
- vao_id,
- self.ctx.limits().max_vertex_attribs,
- )
- })
+ receiver.recv().unwrap().map(|id| WebGLVertexArrayObjectOES::new(&self.ctx, id))
}
// https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/