aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-03-29 12:42:01 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-03-29 12:42:01 +0530
commitaac2da75f40f4c55a4b450b6d9d134429fcf741e (patch)
tree46b3d933d44726121af4f4079a80282b7b73018e /components/servo/lib.rs
parentddc57fe641c3940ecdad98297ac5b2ff95c3340c (diff)
parenta5a299ea881cc589511f8a03f63d53f4b39cdf66 (diff)
downloadservo-aac2da75f40f4c55a4b450b6d9d134429fcf741e.tar.gz
servo-aac2da75f40f4c55a4b450b6d9d134429fcf741e.zip
Auto merge of #8641 - notriddle:no_headless, r=glennw
No more headless compositor. Just the normal one. Fixes #8573 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8641) <!-- Reviewable:end -->
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r--components/servo/lib.rs17
1 files changed, 4 insertions, 13 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 6a18419d581..6ddcd58222a 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -79,7 +79,6 @@ use profile::mem as profile_mem;
use profile::time as profile_time;
use profile_traits::mem;
use profile_traits::time;
-use std::borrow::Borrow;
use std::rc::Rc;
use std::sync::mpsc::Sender;
use util::opts;
@@ -103,7 +102,7 @@ pub struct Browser {
}
impl Browser {
- pub fn new<Window>(window: Option<Rc<Window>>) -> Browser
+ pub fn new<Window>(window: Rc<Window>) -> Browser
where Window: WindowMethods + 'static {
// Global configuration options, parsed from the command line.
let opts = opts::get();
@@ -115,14 +114,8 @@ impl Browser {
// messages to client may need to pump a platform-specific event loop
// to deliver the message.
let (compositor_proxy, compositor_receiver) =
- WindowMethods::create_compositor_channel(&window);
- let supports_clipboard = match window {
- Some(ref win_rc) => {
- let win: &Window = win_rc.borrow();
- win.supports_clipboard()
- }
- None => false
- };
+ window.create_compositor_channel();
+ let supports_clipboard = window.supports_clipboard();
let time_profiler_chan = profile_time::Profiler::create(opts.time_profiler_period);
let mem_profiler_chan = profile_mem::Profiler::create(opts.mem_profiler_period);
let devtools_chan = opts.devtools_port.map(|port| {
@@ -134,9 +127,7 @@ impl Browser {
resource_path.push("shaders");
// TODO(gw): Duplicates device_pixels_per_screen_px from compositor. Tidy up!
- let hidpi_factor = window.as_ref()
- .map(|window| window.hidpi_factor().get())
- .unwrap_or(1.0);
+ let hidpi_factor = window.hidpi_factor().get();
let device_pixel_ratio = match opts.device_pixels_per_px {
Some(device_pixels_per_px) => device_pixels_per_px,
None => match opts.output_file {