Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Servo DPI aware on Windows #11314

Merged
merged 1 commit into from May 21, 2016
Merged

Conversation

metajack
Copy link
Contributor

@metajack metajack commented May 21, 2016

Thank you for contributing to Servo! Please replace each [ ] by [X] when the step is complete, and replace __ with appropriate data:

  • ./mach build -d does not report any errors
  • ./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
  • 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.

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

@highfive
Copy link

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 21, 2016
@metajack
Copy link
Contributor Author

r? @mbrubeck

I think it's worth pushing the differences down into glutin if we can, but it will take some time to figure out how to get there. This at least pushes the differences down into WindowMethods.

@highfive
Copy link

New code was committed to pull request.

@highfive
Copy link

New code was committed to pull request.

@highfive
Copy link

New code was committed to pull request.

@mbrubeck
Copy link
Contributor

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit e016499 has been approved by mbrubeck

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 21, 2016
@metajack
Copy link
Contributor Author

Hey, it only took four tries!

@bors-servo
Copy link
Contributor

⌛ Testing commit e016499 with merge 3c26907...

bors-servo pushed a commit that referenced this pull request May 21, 2016
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 -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-dev-unit

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels May 21, 2016
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.
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label May 21, 2016
@highfive
Copy link

New code was committed to pull request.

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 21, 2016
@metajack
Copy link
Contributor Author

@bors-servo r=mbrubeck

@bors-servo
Copy link
Contributor

📌 Commit 568d454 has been approved by mbrubeck

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 21, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit 568d454 with merge 63bbc13...

bors-servo pushed a commit that referenced this pull request May 21, 2016
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 -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo bors-servo merged commit 568d454 into servo:master May 21, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 21, 2016
@metajack metajack deleted the window-hi-dpi branch May 21, 2016 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants