mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -4,6 +4,7 @@
|
|||
|
||||
use euclid::Size2D;
|
||||
use gleam::gl;
|
||||
use ipc_channel::ipc::IpcBytesReceiver;
|
||||
use offscreen_gl_context::{GLContextAttributes, GLLimits};
|
||||
use serde_bytes::ByteBuf;
|
||||
use std::borrow::Cow;
|
||||
|
@ -167,8 +168,8 @@ pub enum WebGLCommand {
|
|||
AttachShader(WebGLProgramId, WebGLShaderId),
|
||||
DetachShader(WebGLProgramId, WebGLShaderId),
|
||||
BindAttribLocation(WebGLProgramId, u32, String),
|
||||
BufferData(u32, ByteBuf, u32),
|
||||
BufferSubData(u32, isize, ByteBuf),
|
||||
BufferData(u32, IpcBytesReceiver, u32),
|
||||
BufferSubData(u32, isize, IpcBytesReceiver),
|
||||
Clear(u32),
|
||||
ClearColor(f32, f32, f32, f32),
|
||||
ClearDepth(f32),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue