diff options
author | Josh Matthews <josh@joshmatthews.net> | 2018-11-14 18:06:35 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2019-03-07 09:27:36 -0500 |
commit | 3121f42d52feeb17f911e29d8ef5dd31f9f2769c (patch) | |
tree | fc98b3d78fdd86d0894cfe5b2268c17faaa3a14c /components/canvas_traits | |
parent | 0f3108ce79a1eaefe99559a1910fcbc52effa93e (diff) | |
download | servo-3121f42d52feeb17f911e29d8ef5dd31f9f2769c.tar.gz servo-3121f42d52feeb17f911e29d8ef5dd31f9f2769c.zip |
Remove offscreen_gl_context dependency from canvas_traits and script.
Diffstat (limited to 'components/canvas_traits')
-rw-r--r-- | components/canvas_traits/Cargo.toml | 1 | ||||
-rw-r--r-- | components/canvas_traits/webgl.rs | 25 |
2 files changed, 24 insertions, 2 deletions
diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml index 298e1d4740a..6334f4f53ca 100644 --- a/components/canvas_traits/Cargo.toml +++ b/components/canvas_traits/Cargo.toml @@ -21,7 +21,6 @@ gleam = "0.6.7" lazy_static = "1" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = "0.1" -offscreen_gl_context = {version = "0.22", features = ["serde"]} pixels = {path = "../pixels"} serde = "1.0" serde_bytes = "0.10" diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs index d3b16f59c78..474ae4b603b 100644 --- a/components/canvas_traits/webgl.rs +++ b/components/canvas_traits/webgl.rs @@ -6,7 +6,6 @@ use euclid::{Rect, Size2D}; use gleam::gl; use gleam::gl::Gl; use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSharedMemory}; -use offscreen_gl_context::{GLContextAttributes, GLLimits}; use pixels::PixelFormat; use std::borrow::Cow; use std::fmt; @@ -811,3 +810,27 @@ pub enum YAxisTreatment { AsIs, Flipped, } + +#[derive(Clone, Copy, Debug, Deserialize, Serialize)] +pub struct GLContextAttributes { + pub alpha: bool, + pub depth: bool, + pub stencil: bool, + pub antialias: bool, + pub premultiplied_alpha: bool, + pub preserve_drawing_buffer: bool, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct GLLimits { + pub max_vertex_attribs: u32, + pub max_tex_size: u32, + pub max_cube_map_tex_size: u32, + pub max_combined_texture_image_units: u32, + pub max_fragment_uniform_vectors: u32, + pub max_renderbuffer_size: u32, + pub max_texture_image_units: u32, + pub max_varying_vectors: u32, + pub max_vertex_texture_image_units: u32, + pub max_vertex_uniform_vectors: u32, +} |