mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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.
This commit is contained in:
parent
3ce3f39383
commit
ce81420bef
19 changed files with 170 additions and 62 deletions
|
@ -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(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue