diff options
author | ecoal95 <ecoal95@gmail.com> | 2015-06-15 00:22:15 +0200 |
---|---|---|
committer | ecoal95 <ecoal95@gmail.com> | 2015-07-06 19:54:06 +0200 |
commit | 42bd43a696939c3259284a01b8ef64aa13a9939c (patch) | |
tree | 254952a1f89c690b12667f2a101f970c3a29551c /components/canvas_traits/lib.rs | |
parent | b1765c68821d12a21cd304f7dffaa3bdc8f101e4 (diff) | |
download | servo-42bd43a696939c3259284a01b8ef64aa13a9939c.tar.gz servo-42bd43a696939c3259284a01b8ef64aa13a9939c.zip |
webgl: Make bind* calls more spec-compliant
Diffstat (limited to 'components/canvas_traits/lib.rs')
-rw-r--r-- | components/canvas_traits/lib.rs | 25 |
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, |