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

Paint worklets: scaling artefacts with zoom #17454

Closed
asajeffrey opened this issue Jun 21, 2017 · 2 comments
Closed

Paint worklets: scaling artefacts with zoom #17454

asajeffrey opened this issue Jun 21, 2017 · 2 comments

Comments

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 21, 2017

If you zoom in on a paint worklet, you get scaling artefacts. Chrome doesn't display these.

screenshot from 2017-06-21 11-07-48

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 22, 2017

IRC chat with @glennw: http://logs.glob.uno/?c=mozilla%23servo&s=22+Jun+2017&e=22+Jun+2017#c704238

TL;DR: In the short run, we can just scale by the global zoom and hidpi, which will at least fix the simple cases. In the long run, we should use the WR blob API, which allows us to call a callback from within WR once the scaling factors are all known. This will be a complete rewrite of the canvas code, to match the current SVG code. Hooray.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 23, 2017

Split off #17497 for the long-term plan of using the WR blob API.

bors-servo added a commit that referenced this issue Jul 20, 2017
Fixed scaling artefacts in paint worklets caused by zoom and hidpi

<!-- Please describe your changes on the following line: -->

This PR renders paint worklet canvases at the device pixel resolution, rather than the CSS pixel resolution.

It's a dependent PR, building on #17239, #17326 and #17364.

---
<!-- 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` does not report any errors
- [X] These changes fix #17454
- [X] These changes do not require tests because we don't run reftests with zoom enabled

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17499)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jul 21, 2017
Fixed scaling artefacts in paint worklets caused by zoom and hidpi

<!-- Please describe your changes on the following line: -->

This PR renders paint worklet canvases at the device pixel resolution, rather than the CSS pixel resolution.

It's a dependent PR, building on #17239, #17326 and #17364.

---
<!-- 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` does not report any errors
- [X] These changes fix #17454
- [X] These changes do not require tests because we don't run reftests with zoom enabled

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17499)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.