aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/compositing/compositor.rs12
-rw-r--r--components/compositing/windowing.rs2
-rw-r--r--components/servo/Cargo.lock16
3 files changed, 17 insertions, 13 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index f618077f5ea..346666ac31b 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -1288,8 +1288,13 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.composite_specific_target(target);
}
- fn composite_specific_target(&mut self, target: CompositeTarget) -> Option<png::Image> {
- if !self.window.prepare_for_composite() {
+ pub fn composite_specific_target(&mut self, target: CompositeTarget) -> Option<png::Image> {
+ if !self.context.is_some() {
+ return None
+ }
+ let (width, height) =
+ (self.window_size.width.get() as usize, self.window_size.height.get() as usize);
+ if !self.window.prepare_for_composite(width, height) {
return None
}
@@ -1302,9 +1307,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
_ => {}
}
- let (width, height) =
- (self.window_size.width.get() as usize, self.window_size.height.get() as usize);
-
let (framebuffer_ids, texture_ids) = match target {
CompositeTarget::Window => (vec!(), vec!()),
_ => initialize_png(width, height)
diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs
index 51b13bfdf81..196e1e2653f 100644
--- a/components/compositing/windowing.rs
+++ b/components/compositing/windowing.rs
@@ -123,7 +123,7 @@ pub trait WindowMethods {
/// Requests that the window system prepare a composite. Typically this will involve making
/// some type of platform-specific graphics context current. Returns true if the composite may
/// proceed and false if it should not.
- fn prepare_for_composite(&self) -> bool;
+ fn prepare_for_composite(&self, width: usize, height: usize) -> bool;
/// Sets the cursor to be used in the window.
fn set_cursor(&self, cursor: Cursor);
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index 26b0fe8f2c5..5928aa440b5 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -443,7 +443,7 @@ dependencies = [
[[package]]
name = "glutin"
version = "0.0.26"
-source = "git+https://github.com/servo/glutin?branch=servo#ec7a5e40c1cc7b8176eb1e1f7bf70c8a19559400"
+source = "git+https://github.com/servo/glutin?branch=servo#e888dc79471f062ae0b5fae0ba9e0f01ac96048e"
dependencies = [
"android_glue 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gdi32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -460,7 +460,7 @@ dependencies = [
"osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"user32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "x11 0.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x11 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -481,6 +481,7 @@ dependencies = [
"time 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
+ "x11 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -616,7 +617,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "layers"
version = "0.1.0"
-source = "git+https://github.com/servo/rust-layers#ff65707d621498949ed428077da7e42a9f9d2745"
+source = "git+https://github.com/servo/rust-layers#cfc29e48a11f0c1e5390a049850c3ba10f23e0ad"
dependencies = [
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
@@ -630,7 +631,7 @@ dependencies = [
"log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"skia 0.0.20130412 (git+https://github.com/servo/skia)",
- "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)",
+ "x11 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -843,7 +844,7 @@ dependencies = [
[[package]]
name = "offscreen_gl_context"
version = "0.0.1"
-source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#97eacf34b72f69b10130a0de016529e98ee32f04"
+source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#99cee719a811f28e70fe33fa71137663ac210487"
dependencies = [
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
@@ -853,7 +854,7 @@ dependencies = [
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
"libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)",
+ "x11 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1329,10 +1330,11 @@ dependencies = [
[[package]]
name = "x11"
-version = "0.0.33"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]