This implements system level DPI awareness for Windows. It has three
parts:
1. Add a application manifest which is copied alongside servo.exe during
build that declares our DPI awareness level. This is needed otherwise
DPI queries will return 96dpi and our application will be upscaled on
high DPI displays.
2. Rename hidpi_factor to avoid confusion with Glutin's hidpi_factor
which does something else.
3. Correctly convert windows sizes on window creation for
Windows. Unlike OS X, Windows uses device pixels for window creation.
This changes headless operation to strictly be a runtime option, rather
than a compile-time one. Note that the old headless version still relied
on a display server to support WebGL, while it now requires one all the
time.
Fixes#8573
has loaded.
This avoids a flash of unstyled content, which looks especially bad in
browser.html since unstyled content is white and browser.html has a
transparent background.
Closes#9996.
Update to latest rust-layers
The compositing context, painting context and display metadata have all
been collapsed into a single NativeDisplay class.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6525)
<!-- Reviewable:end -->
it was somewhat impossible to make this work with allocated string_lists
due to constant leakage from box allocations going out of scope, so this should
simplify it ane be more manageable in the future
This is important for the SERVO_HEADLESS configuration, because
creating a clipboard on linux creates an X context which then causes
reftest instability.
regular CEF requires the user to either run the cef main loop or
poll on a function to drain events. now the engine will trigger a callback
in some application thread which will notify it that there is work
to be done by the browser
this changes the way that applications will use servo. whereas previously
it was only necessary to call initialize() -> makecurrent, it's now necessary
to explicitly call the composite() method in order to trigger the gl rendering.
any other composite attempts (by servo) will trigger the on_paint() method,
informing the app that a frame is ready. it's then up to the app to schedule
the composite() such that the frame is rendered in a timely manner
platforms other than macos will not need/use a get_backing_rect() method since
there is no virtual pixel scaling, and this method will need to be usable
even before browsers are finished setting up, so ensure we can at least pass
initial window size back
also check method pointer availability before calling into a null function