mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #7805 - mbrubeck:headless-dpr, r=mrobinson
Use same default window size in headless and non-headless compositor Attempts to fix #7730. r? @mrobinson <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7805) <!-- Reviewable:end -->
This commit is contained in:
commit
7be4fdb577
1 changed files with 5 additions and 3 deletions
|
@ -11,6 +11,7 @@ use msg::constellation_msg::Msg as ConstellationMsg;
|
||||||
use msg::constellation_msg::{ConstellationChan, WindowSizeData};
|
use msg::constellation_msg::{ConstellationChan, WindowSizeData};
|
||||||
use profile_traits::mem;
|
use profile_traits::mem;
|
||||||
use profile_traits::time;
|
use profile_traits::time;
|
||||||
|
use util::opts;
|
||||||
use windowing::WindowEvent;
|
use windowing::WindowEvent;
|
||||||
|
|
||||||
/// Starts the compositor, which listens for messages on the specified port.
|
/// Starts the compositor, which listens for messages on the specified port.
|
||||||
|
@ -45,9 +46,10 @@ impl NullCompositor {
|
||||||
{
|
{
|
||||||
let ConstellationChan(ref chan) = compositor.constellation_chan;
|
let ConstellationChan(ref chan) = compositor.constellation_chan;
|
||||||
chan.send(ConstellationMsg::ResizedWindow(WindowSizeData {
|
chan.send(ConstellationMsg::ResizedWindow(WindowSizeData {
|
||||||
initial_viewport: Size2D::typed(640_f32, 480_f32),
|
initial_viewport: Size2D::typed(800_f32, 600_f32),
|
||||||
visible_viewport: Size2D::typed(640_f32, 480_f32),
|
visible_viewport: Size2D::typed(800_f32, 600_f32),
|
||||||
device_pixel_ratio: ScaleFactor::new(1.0),
|
device_pixel_ratio:
|
||||||
|
ScaleFactor::new(opts::get().device_pixels_per_px.unwrap_or(1.0)),
|
||||||
})).unwrap();
|
})).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue