Use opts as a global, to avoid cloning and passing the struct all over the code.

This commit is contained in:
Glenn Watson 2014-10-20 10:43:49 +10:00
parent a983debaf1
commit 076495db94
20 changed files with 108 additions and 132 deletions

View file

@ -19,7 +19,6 @@ use servo_msg::compositor_msg::{Epoch, LayerId, LayerMetadata, ReadyState};
use servo_msg::compositor_msg::{RenderListener, RenderState, ScriptListener, ScrollPolicy};
use servo_msg::constellation_msg::{ConstellationChan, PipelineId};
use servo_util::memory::MemoryProfilerChan;
use servo_util::opts::Opts;
use servo_util::time::TimeProfilerChan;
use std::comm::{channel, Sender, Receiver};
use std::rc::Rc;
@ -200,7 +199,6 @@ impl CompositorTask {
pub fn create<Window: WindowMethods>(
window: Option<Rc<Window>>,
opts: Opts,
port: Receiver<Msg>,
constellation_chan: ConstellationChan,
time_profiler_chan: TimeProfilerChan,
@ -209,7 +207,6 @@ impl CompositorTask {
match window {
Some(window) => {
compositor::IOCompositor::create(window,
opts,
port,
constellation_chan.clone(),
time_profiler_chan,