mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Remove offscreen_gl_context dependency from canvas_traits and script.
This commit is contained in:
parent
0f3108ce79
commit
3121f42d52
11 changed files with 85 additions and 29 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue