Centralize definitions of window sizes and DPI in compositor/constellation during startup.

This commit is contained in:
Josh Matthews 2019-11-06 16:10:36 -05:00
parent fd260f78c8
commit 7c365b0324
6 changed files with 34 additions and 76 deletions

View file

@ -70,7 +70,7 @@ impl App {
// Handle browser state.
let browser = Browser::new(window.clone());
let mut servo = Servo::new(embedder, window.clone(), device_pixels_per_px);
let mut servo = Servo::new(embedder, window.clone());
let browser_id = BrowserId::new();
servo.handle_events(vec![WindowEvent::NewBrowser(get_default_url(), browser_id)]);
servo.setup_logging();

View file

@ -211,7 +211,7 @@ pub fn init(
gl: gl.clone(),
});
let servo = Servo::new(embedder_callbacks, window_callbacks.clone(), None);
let servo = Servo::new(embedder_callbacks, window_callbacks.clone());
SERVO.with(|s| {
let mut servo_glue = ServoGlue {