mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Use a bytes channel in BufferData
This means we don't need to copy the input ArrayBuffer at all on the DOM side.
This commit is contained in:
parent
e37856a855
commit
9f924013bc
4 changed files with 37 additions and 22 deletions
|
@ -659,10 +659,12 @@ impl WebGLImpl {
|
|||
ctx.gl().blend_func(src, dest),
|
||||
WebGLCommand::BlendFuncSeparate(src_rgb, dest_rgb, src_alpha, dest_alpha) =>
|
||||
ctx.gl().blend_func_separate(src_rgb, dest_rgb, src_alpha, dest_alpha),
|
||||
WebGLCommand::BufferData(buffer_type, ref data, usage) =>
|
||||
gl::buffer_data(ctx.gl(), buffer_type, data, usage),
|
||||
WebGLCommand::BufferSubData(buffer_type, offset, ref data) =>
|
||||
gl::buffer_sub_data(ctx.gl(), buffer_type, offset, data),
|
||||
WebGLCommand::BufferData(buffer_type, ref receiver, usage) => {
|
||||
gl::buffer_data(ctx.gl(), buffer_type, &receiver.recv().unwrap(), usage)
|
||||
},
|
||||
WebGLCommand::BufferSubData(buffer_type, offset, ref receiver) => {
|
||||
gl::buffer_sub_data(ctx.gl(), buffer_type, offset, &receiver.recv().unwrap())
|
||||
},
|
||||
WebGLCommand::Clear(mask) =>
|
||||
ctx.gl().clear(mask),
|
||||
WebGLCommand::ClearColor(r, g, b, a) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue