Add WebGLContextAttributes support

This commit also:
* Allows to return non-rootable dictionaries from
Codegen.
* Merges the two context types in an enum type.
This commit is contained in:
ecoal95 2015-05-25 14:47:23 +02:00
parent b1a773a15b
commit b3ac346749
16 changed files with 255 additions and 80 deletions

View file

@ -19,5 +19,8 @@ git = "https://github.com/servo/rust-azure"
[dependencies.layers]
git = "https://github.com/servo/rust-layers"
[dependencies.offscreen_gl_context]
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
[dependencies]
cssparser = "0.3.1"

View file

@ -9,6 +9,7 @@ extern crate geom;
extern crate cssparser;
extern crate gfx_traits;
extern crate layers;
extern crate offscreen_gl_context;
use azure::azure::AzFloat;
use azure::azure_hl::{DrawTarget, Pattern, ColorPattern};
@ -22,6 +23,7 @@ use geom::size::Size2D;
use gfx_traits::color;
use std::sync::mpsc::{Sender};
use layers::platform::surface::NativeSurface;
use offscreen_gl_context::GLContextAttributes;
#[derive(Clone)]
pub enum CanvasMsg {
@ -66,6 +68,7 @@ pub enum Canvas2dMsg {
#[derive(Clone)]
pub enum CanvasWebGLMsg {
GetContextAttributes(Sender<GLContextAttributes>),
AttachShader(u32, u32),
BindBuffer(u32, u32),
BufferData(u32, Vec<f32>, u32),