diff options
author | glowe <graham@spinlag.com> | 2019-10-26 11:37:09 -0400 |
---|---|---|
committer | glowe <graham@spinlag.com> | 2019-10-26 12:00:14 -0400 |
commit | 0ee300479ec22e18ea00d9d1c7c60bdd35808983 (patch) | |
tree | c890e2ec71ef232abcdc5e2697c0676663aa0e73 /components/servo/lib.rs | |
parent | 74f1e2ec322b22ef9a1370d56d7cf3b1d38479ef (diff) | |
download | servo-0ee300479ec22e18ea00d9d1c7c60bdd35808983.tar.gz servo-0ee300479ec22e18ea00d9d1c7c60bdd35808983.zip |
Extract device_pixels_per_px from global opts
This is also an embedder specific option, so removing it from the
global options makes sense.
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r-- | components/servo/lib.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 7e8a6c1a438..86920bbe361 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -306,7 +306,11 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static + ?Sized, { - pub fn new(mut embedder: Box<dyn EmbedderMethods>, window: Rc<Window>) -> Servo<Window> { + pub fn new( + mut embedder: Box<dyn EmbedderMethods>, + window: Rc<Window>, + device_pixels_per_px: Option<f32>, + ) -> Servo<Window> { // Global configuration options, parsed from the command line. let opts = opts::get(); @@ -551,6 +555,7 @@ where webvr_constellation_sender, glplayer_threads, event_loop_waker, + device_pixels_per_px, ); // Send the constellation's swmanager sender to service worker manager thread @@ -582,7 +587,7 @@ where opts.is_running_problem_test, opts.exit_after_load, opts.convert_mouse_to_touch, - opts.device_pixels_per_px, + device_pixels_per_px, ); Servo { @@ -870,6 +875,7 @@ fn create_constellation( webvr_constellation_sender: Option<Sender<Sender<ConstellationMsg>>>, glplayer_threads: Option<GLPlayerThreads>, event_loop_waker: Option<Box<dyn EventLoopWaker>>, + device_pixels_per_px: Option<f32>, ) -> (Sender<ConstellationMsg>, SWManagerSenders) { // Global configuration options, parsed from the command line. let opts = opts::get(); @@ -912,6 +918,7 @@ fn create_constellation( glplayer_threads, player_context, event_loop_waker, + device_pixels_per_px, }; let (constellation_chan, from_swmanager_sender) = Constellation::< script_layout_interface::message::Msg, @@ -920,7 +927,7 @@ fn create_constellation( >::start( initial_state, opts.initial_window_size, - opts.device_pixels_per_px, + device_pixels_per_px, opts.random_pipeline_closure_probability, opts.random_pipeline_closure_seed, opts.is_running_problem_test, |