aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas_traits/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/canvas_traits/lib.rs')
-rw-r--r--components/canvas_traits/lib.rs25
1 files changed, 15 insertions, 10 deletions
diff --git a/components/canvas_traits/lib.rs b/components/canvas_traits/lib.rs
index 51c9a1dafb2..01925408b5e 100644
--- a/components/canvas_traits/lib.rs
+++ b/components/canvas_traits/lib.rs
@@ -38,6 +38,14 @@ pub enum CanvasMsg {
}
#[derive(Clone)]
+pub enum CanvasCommonMsg {
+ Close,
+ Recreate(Size2D<i32>),
+ SendPixelContents(Sender<Vec<u8>>),
+ SendNativeSurface(Sender<NativeSurface>),
+}
+
+#[derive(Clone)]
pub enum Canvas2dMsg {
Arc(Point2D<f32>, f32, f32, f32, bool),
ArcTo(Point2D<f32>, Point2D<f32>, f32),
@@ -102,7 +110,7 @@ pub enum CanvasWebGLMsg {
DeleteProgram(u32),
DeleteShader(u32),
BindBuffer(u32, u32),
- BindFramebuffer(u32, u32),
+ BindFramebuffer(u32, WebGLFramebufferBindingRequest),
BindRenderbuffer(u32, u32),
BindTexture(u32, u32),
DrawArrays(u32, i32, i32),
@@ -133,6 +141,12 @@ pub enum WebGLError {
pub type WebGLResult<T> = Result<T, WebGLError>;
#[derive(Clone)]
+pub enum WebGLFramebufferBindingRequest {
+ Explicit(u32),
+ Default,
+}
+
+#[derive(Clone)]
pub enum WebGLShaderParameter {
Int(i32),
Bool(bool),
@@ -140,15 +154,6 @@ pub enum WebGLShaderParameter {
}
#[derive(Clone)]
-pub enum CanvasCommonMsg {
- Close,
- Recreate(Size2D<i32>),
- SendPixelContents(Sender<Vec<u8>>),
- SendNativeSurface(Sender<NativeSurface>),
-}
-
-
-#[derive(Clone)]
pub struct CanvasGradientStop {
pub offset: f64,
pub color: RGBA,