aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas_traits/webgl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/canvas_traits/webgl.rs')
-rw-r--r--components/canvas_traits/webgl.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs
index bdffd586287..57647204910 100644
--- a/components/canvas_traits/webgl.rs
+++ b/components/canvas_traits/webgl.rs
@@ -4,6 +4,7 @@
use euclid::Size2D;
use gleam::gl;
+use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender};
use offscreen_gl_context::{GLContextAttributes, GLLimits};
use serde_bytes::ByteBuf;
use std::borrow::Cow;
@@ -24,7 +25,7 @@ pub use ::webgl_channel::WebGLPipeline;
pub use ::webgl_channel::WebGLChan;
/// WebGL Message API
-#[derive(Clone, Deserialize, Serialize)]
+#[derive(Deserialize, Serialize)]
pub enum WebGLMsg {
/// Creates a new WebGLContext.
CreateContext(WebGLVersion, Size2D<i32>, GLContextAttributes,
@@ -155,7 +156,7 @@ impl WebGLMsgSender {
}
/// WebGL Commands for a specific WebGLContext
-#[derive(Clone, Debug, Deserialize, Serialize)]
+#[derive(Debug, Deserialize, Serialize)]
pub enum WebGLCommand {
GetContextAttributes(WebGLSender<GLContextAttributes>),
ActiveTexture(u32),
@@ -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),
@@ -213,7 +214,7 @@ pub enum WebGLCommand {
GetRenderbufferParameter(u32, u32, WebGLSender<i32>),
PolygonOffset(f32, f32),
RenderbufferStorage(u32, u32, i32, i32),
- ReadPixels(i32, i32, i32, i32, u32, u32, WebGLSender<ByteBuf>),
+ ReadPixels(i32, i32, i32, i32, u32, u32, IpcBytesSender),
SampleCoverage(f32, bool),
Scissor(i32, i32, i32, i32),
StencilFunc(u32, i32, u32),
@@ -251,8 +252,8 @@ pub enum WebGLCommand {
VertexAttribPointer(u32, i32, u32, bool, i32, u32),
VertexAttribPointer2f(u32, i32, bool, i32, u32),
SetViewport(i32, i32, i32, i32),
- TexImage2D(u32, i32, i32, i32, i32, u32, u32, ByteBuf),
- TexSubImage2D(u32, i32, i32, i32, i32, i32, u32, u32, ByteBuf),
+ TexImage2D(u32, i32, i32, i32, i32, u32, u32, IpcBytesReceiver),
+ TexSubImage2D(u32, i32, i32, i32, i32, i32, u32, u32, IpcBytesReceiver),
DrawingBufferWidth(WebGLSender<i32>),
DrawingBufferHeight(WebGLSender<i32>),
Finish(WebGLSender<()>),