Merge pull request #3398 from glennw/config-res

Allow resolution to be configured on command line. Default to 1280x1024.

Reviewed-by: SimonSapin
This commit is contained in:
bors-servo 2014-09-25 18:27:38 -06:00
commit 177127e597
7 changed files with 38 additions and 9 deletions

View file

@ -143,7 +143,15 @@ impl IOCompositor {
constellation_chan: ConstellationChan,
time_profiler_chan: TimeProfilerChan,
memory_profiler_chan: MemoryProfilerChan) -> IOCompositor {
let window: Rc<Window> = WindowMethods::new(app, opts.output_file.is_none());
let scale_factor = match opts.device_pixels_per_px {
Some(device_pixels_per_px) => device_pixels_per_px,
None => ScaleFactor(1.0),
};
let framebuffer_size = opts.initial_window_size.as_f32() * scale_factor;
let window: Rc<Window> = WindowMethods::new(app, opts.output_file.is_none(),
framebuffer_size.as_uint());
// Create an initial layer tree.
//