mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #9044 - ecoal95:offscreen-gl-up, r=jdm
Update offscreen_gl_context cc: https://github.com/ecoal95/rust-offscreen-rendering-context/pull/46 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9044) <!-- Reviewable:end -->
This commit is contained in:
commit
da8952b702
10 changed files with 13 additions and 22 deletions
4
components/servo/Cargo.lock
generated
4
components/servo/Cargo.lock
generated
|
@ -1266,7 +1266,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)",
|
||||
|
@ -1274,11 +1274,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)",
|
||||
]
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue