diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2015-12-22 01:28:47 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2015-12-22 04:33:03 +0100 |
commit | 992a36234cde2b9b8d9ac77268f9aa9edd8264e1 (patch) | |
tree | 26a61f846407d4b011e7c220bccb92793cd95ebe | |
parent | df087cc6cf4d97c5cc93befec922b38b56e6def7 (diff) | |
download | servo-992a36234cde2b9b8d9ac77268f9aa9edd8264e1.tar.gz servo-992a36234cde2b9b8d9ac77268f9aa9edd8264e1.zip |
Update offscreen_gl_context
-rw-r--r-- | components/canvas/Cargo.toml | 1 | ||||
-rw-r--r-- | components/canvas/webgl_paint_task.rs | 8 | ||||
-rw-r--r-- | components/compositing/Cargo.toml | 1 | ||||
-rw-r--r-- | components/script_traits/Cargo.toml | 1 | ||||
-rw-r--r-- | components/servo/Cargo.lock | 4 | ||||
-rw-r--r-- | components/servo/main.rs | 6 | ||||
-rw-r--r-- | ports/cef/Cargo.lock | 4 | ||||
-rw-r--r-- | ports/gonk/Cargo.lock | 4 |
8 files changed, 9 insertions, 20 deletions
diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index c1bc9a88435..6e930730df8 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -29,7 +29,6 @@ path = "../gfx_traits" [dependencies.offscreen_gl_context] git = "https://github.com/ecoal95/rust-offscreen-rendering-context" -features = ["texture_surface"] [dependencies.ipc-channel] git = "https://github.com/servo/ipc-channel" diff --git a/components/canvas/webgl_paint_task.rs b/components/canvas/webgl_paint_task.rs index 2073c0ccf81..a765f93a109 100644 --- a/components/canvas/webgl_paint_task.rs +++ b/components/canvas/webgl_paint_task.rs @@ -11,7 +11,7 @@ use gleam::gl::types::{GLsizei}; use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory}; use ipc_channel::router::ROUTER; use layers::platform::surface::NativeSurface; -use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes}; +use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes, NativeGLContext}; use std::borrow::ToOwned; use std::sync::mpsc::{Sender, channel}; use util::task::spawn_named; @@ -20,7 +20,7 @@ use util::vec::byte_swap; pub struct WebGLPaintTask { size: Size2D<i32>, original_context_size: Size2D<i32>, - gl_context: GLContext, + gl_context: GLContext<NativeGLContext>, } // This allows trying to create the PaintTask @@ -29,9 +29,7 @@ unsafe impl Send for WebGLPaintTask {} impl WebGLPaintTask { fn new(size: Size2D<i32>, attrs: GLContextAttributes) -> Result<WebGLPaintTask, &'static str> { - let context = try!( - GLContext::create_offscreen_with_color_attachment( - size, attrs, ColorAttachmentType::TextureWithSurface)); + let context = try!(GLContext::new(size, attrs, ColorAttachmentType::Texture, None)); // NOTE: As of right now this is always equal to the size parameter, // but this doesn't have to be true. Firefox after failing with diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index f49d15ba2c3..3dad2b63110 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -62,7 +62,6 @@ git = "https://github.com/servo/ipc-channel" [dependencies.offscreen_gl_context] git = "https://github.com/ecoal95/rust-offscreen-rendering-context" -features = ["texture_surface"] [dependencies.gaol] git = "https://github.com/pcwalton/gaol" diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml index 36ea9b5d274..74ceee7607a 100644 --- a/components/script_traits/Cargo.toml +++ b/components/script_traits/Cargo.toml @@ -18,7 +18,6 @@ path = "../net_traits" [dependencies.offscreen_gl_context] git = "https://github.com/ecoal95/rust-offscreen-rendering-context" -features = ["texture_surface"] [dependencies.plugins] path = "../plugins" diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 08fcc44cf5e..1c3cadc526d 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -1263,7 +1263,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#348364d8869d5e673b49c60f40803dfa903c70f2" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#0677179502384f07fced16744dbe5882d9a71dfa" dependencies = [ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1271,11 +1271,9 @@ dependencies = [ "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "servo-glutin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/components/servo/main.rs b/components/servo/main.rs index 7b3f6ead2c2..47d275727a2 100644 --- a/components/servo/main.rs +++ b/components/servo/main.rs @@ -34,7 +34,7 @@ extern crate servo; extern crate time; use gleam::gl; -use offscreen_gl_context::GLContext; +use offscreen_gl_context::{GLContext, NativeGLContext}; use servo::Browser; use servo::compositing::windowing::WindowEvent; use servo::net_traits::hosts; @@ -43,7 +43,7 @@ use std::rc::Rc; #[cfg(not(target_os = "android"))] fn load_gl_when_headless() { - gl::load_with(|addr| GLContext::get_proc_address(addr) as *const _); + gl::load_with(|addr| GLContext::<NativeGLContext>::get_proc_address(addr) as *const _); } #[cfg(target_os = "android")] @@ -76,7 +76,7 @@ fn main() { let window = if opts::get().headless { // Load gl functions even when in headless mode, - // to avoid crashing with webgl + // to avoid crashing with WebGL load_gl_when_headless(); None } else { diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index e10d54059d2..3c2136e327e 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -1198,7 +1198,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#348364d8869d5e673b49c60f40803dfa903c70f2" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#0677179502384f07fced16744dbe5882d9a71dfa" dependencies = [ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1206,11 +1206,9 @@ dependencies = [ "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "servo-glutin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 8207fb8d522..799afce3899 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -1166,7 +1166,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#348364d8869d5e673b49c60f40803dfa903c70f2" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#0677179502384f07fced16744dbe5882d9a71dfa" dependencies = [ "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1174,11 +1174,9 @@ dependencies = [ "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "servo-glutin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] |