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.rs25
1 files changed, 24 insertions, 1 deletions
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,
+}