diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-03-23 18:41:32 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-03-26 20:48:02 +0200 |
commit | ce81420befd0fd0e8335cb676487479e2cc0f985 (patch) | |
tree | 4d883ab322c58496073f43d29c737e35ca23871a /components/script/dom/webglbuffer.rs | |
parent | 3ce3f39383c8217a30b15d27f3121f96bbe0014d (diff) | |
download | servo-ce81420befd0fd0e8335cb676487479e2cc0f985.tar.gz servo-ce81420befd0fd0e8335cb676487479e2cc0f985.zip |
Use ByteBuf for the canvas messages
The type Vec<u8> is super unefficient to work with in Serde if all you want
to represent is a simple blob.
Diffstat (limited to 'components/script/dom/webglbuffer.rs')
-rw-r--r-- | components/script/dom/webglbuffer.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script/dom/webglbuffer.rs b/components/script/dom/webglbuffer.rs index 68cae62429b..4bb7959f8dd 100644 --- a/components/script/dom/webglbuffer.rs +++ b/components/script/dom/webglbuffer.rs @@ -93,7 +93,11 @@ impl WebGLBuffer { } } self.capacity.set(data.len()); - self.renderer.send(WebGLCommand::BufferData(target, data.to_vec(), usage)).unwrap(); + self.renderer.send(WebGLCommand::BufferData( + target, + data.to_vec().into(), + usage, + )).unwrap(); Ok(()) } |