mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
commit
177127e597
7 changed files with 38 additions and 9 deletions
|
@ -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.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue