Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #11314 - metajack:window-hi-dpi, r=mbrubeck
Make Servo DPI aware on Windows Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy --faster` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). Either: - [ ] There are tests for these changes OR - [x] These changes do not require tests because testing would be overly difficult Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. 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. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11314) <!-- Reviewable:end -->
- Loading branch information
Showing
11 changed files
with
110 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" | ||
manifestVersion="1.0" | ||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> | ||
<assemblyIdentity type="win32" | ||
name="servo.Servo" | ||
version="0.1.0.0"/> | ||
|
||
<compatibility> | ||
<application> | ||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- Windows 7 --> | ||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!-- Windows 8 --> | ||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows 8.1 --> | ||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> <!-- Windows 10 --> | ||
</application> | ||
</compatibility> | ||
|
||
<asmv3:application> | ||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> | ||
<dpiAware>true</dpiAware> | ||
</asmv3:windowsSettings> | ||
</asmv3:application> | ||
</assembly> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.