Remove offscreen_gl_context dependency from canvas_traits and script.

This commit is contained in:
Josh Matthews 2018-11-14 18:06:35 -05:00
parent 0f3108ce79
commit 3121f42d52
11 changed files with 85 additions and 29 deletions

View file

@ -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"

View file

@ -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,
}