mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #8357 - mbrubeck:glutinup, r=metajack
Upgrade to latest glutin Includes servo/glutin#52 and servo/glutin#53. r? @glennw cc @vvuk <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8357) <!-- Reviewable:end -->
This commit is contained in:
commit
65a0bb4aef
7 changed files with 55 additions and 18 deletions
8
components/servo/Cargo.lock
generated
8
components/servo/Cargo.lock
generated
|
@ -722,8 +722,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "glutin"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#6525e224e3b5b3ad4f0af8d87460512eb64e8c59"
|
||||
version = "0.4.1"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#d4ab289f0eee3a168746ab10521edbff244e4b99"
|
||||
dependencies = [
|
||||
"android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -761,7 +761,7 @@ dependencies = [
|
|||
"egl 0.1.0 (git+https://github.com/servo/rust-egl)",
|
||||
"euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
|
@ -1285,7 +1285,7 @@ dependencies = [
|
|||
"euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -67,7 +67,7 @@ fn main() {
|
|||
load_gl_when_headless();
|
||||
None
|
||||
} else {
|
||||
Some(app::create_window(std::ptr::null_mut()))
|
||||
Some(app::create_window(None))
|
||||
};
|
||||
|
||||
// Our wrapper around `Browser` that also implements some
|
||||
|
|
26
ports/cef/Cargo.lock
generated
26
ports/cef/Cargo.lock
generated
|
@ -675,8 +675,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "glutin"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#6525e224e3b5b3ad4f0af8d87460512eb64e8c59"
|
||||
version = "0.4.1"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#d4ab289f0eee3a168746ab10521edbff244e4b99"
|
||||
dependencies = [
|
||||
"android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -714,7 +714,7 @@ dependencies = [
|
|||
"egl 0.1.0 (git+https://github.com/servo/rust-egl)",
|
||||
"euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
|
@ -1220,7 +1220,7 @@ dependencies = [
|
|||
"euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1469,6 +1469,7 @@ dependencies = [
|
|||
"util 0.0.1",
|
||||
"uuid 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"websocket 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xml5ever 0.1.0 (git+https://github.com/Ygg01/xml5ever)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1988,3 +1989,20 @@ dependencies = [
|
|||
"bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xml5ever"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/Ygg01/xml5ever#0c36f2d93532b2d7b1ccfbd6019a6d53a1fcac69"
|
||||
dependencies = [
|
||||
"log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_plugin 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
|
@ -129,10 +129,11 @@ impl ServoCefBrowser {
|
|||
let mut glutin_window: Option<Rc<glutin_app::window::Window>> = None;
|
||||
|
||||
let servo_browser = if window_info.windowless_rendering_enabled == 0 {
|
||||
glutin_window = Some(glutin_app::create_window(window_info.parent_window as glutin_app::WindowID));
|
||||
let parent_window = glutin_app::WindowID::new(window_info.parent_window as *mut _);
|
||||
glutin_window = Some(glutin_app::create_window(Some(parent_window)));
|
||||
let servo_browser = Browser::new(glutin_window.clone());
|
||||
window_handle = match glutin_window {
|
||||
Some(ref win) => win.platform_window() as cef_window_handle_t,
|
||||
Some(ref win) => win.platform_window().window as cef_window_handle_t,
|
||||
None => get_null_window_handle()
|
||||
};
|
||||
ServoBrowser::OnScreen(servo_browser)
|
||||
|
|
|
@ -37,7 +37,7 @@ pub trait NestedEventLoopListener {
|
|||
fn handle_event_from_nested_event_loop(&mut self, event: WindowEvent) -> bool;
|
||||
}
|
||||
|
||||
pub fn create_window(parent: WindowID) -> Rc<Window> {
|
||||
pub fn create_window(parent: Option<WindowID>) -> Rc<Window> {
|
||||
// Read command-line options.
|
||||
let opts = opts::get();
|
||||
let foreground = opts.output_file.is_none();
|
||||
|
|
|
@ -84,7 +84,7 @@ pub struct Window {
|
|||
impl Window {
|
||||
pub fn new(is_foreground: bool,
|
||||
window_size: TypedSize2D<DevicePixel, u32>,
|
||||
parent: glutin::WindowID) -> Rc<Window> {
|
||||
parent: Option<glutin::WindowID>) -> Rc<Window> {
|
||||
let mut glutin_window = glutin::WindowBuilder::new()
|
||||
.with_title("Servo".to_string())
|
||||
.with_decorations(!opts::get().no_native_titlebar)
|
||||
|
@ -122,7 +122,7 @@ impl Window {
|
|||
}
|
||||
|
||||
pub fn platform_window(&self) -> glutin::WindowID {
|
||||
unsafe { self.window.platform_window() }
|
||||
unsafe { glutin::WindowID::new(self.window.platform_window()) }
|
||||
}
|
||||
|
||||
fn nested_window_resize(width: u32, height: u32) {
|
||||
|
@ -721,7 +721,7 @@ pub struct Window {
|
|||
impl Window {
|
||||
pub fn new(_is_foreground: bool,
|
||||
window_size: TypedSize2D<DevicePixel, u32>,
|
||||
_parent: glutin::WindowID) -> Rc<Window> {
|
||||
_parent: Option<glutin::WindowID>) -> Rc<Window> {
|
||||
let window_size = window_size.to_untyped();
|
||||
let headless_builder = glutin::HeadlessRendererBuilder::new(window_size.width,
|
||||
window_size.height);
|
||||
|
|
24
ports/gonk/Cargo.lock
generated
24
ports/gonk/Cargo.lock
generated
|
@ -677,8 +677,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "glutin"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#6525e224e3b5b3ad4f0af8d87460512eb64e8c59"
|
||||
version = "0.4.1"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#d4ab289f0eee3a168746ab10521edbff244e4b99"
|
||||
dependencies = [
|
||||
"android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1200,7 +1200,7 @@ dependencies = [
|
|||
"euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"glutin 0.4.1 (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1449,6 +1449,7 @@ dependencies = [
|
|||
"util 0.0.1",
|
||||
"uuid 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"websocket 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xml5ever 0.1.0 (git+https://github.com/Ygg01/xml5ever)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1936,3 +1937,20 @@ dependencies = [
|
|||
"bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xml5ever"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/Ygg01/xml5ever#0c36f2d93532b2d7b1ccfbd6019a6d53a1fcac69"
|
||||
dependencies = [
|
||||
"log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_plugin 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue