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 subpixel positioning match that of Gecko. #1715

Merged
merged 1 commit into from Sep 19, 2017
Merged

Conversation

@glennw
Copy link
Member

glennw commented Sep 18, 2017

Simplify the quantization function, and add unit tests.

Modify the shader to correctly add the glyph subpixel offset
before truncating the value.

With these changes, the glyph rendering is pixel-perfect with
Gecko in all the test cases I checked.

Fixes #1270.


This change is Reviewable

Simplify the quantization function, and add unit tests.

Modify the shader to correctly add the glyph subpixel offset
before truncating the value.

With these changes, the glyph rendering is pixel-perfect with
Gecko in all the test cases I checked.

Fixes #1270.
@kvark
kvark approved these changes Sep 18, 2017
assert_eq!(rm.subpixel_quantize_offset(0.0), SubpixelOffset::Zero);
assert_eq!(rm.subpixel_quantize_offset(-0.0), SubpixelOffset::Zero);

assert_eq!(rm.subpixel_quantize_offset(0.1), SubpixelOffset::Zero);

This comment has been minimized.

@kvark

kvark Sep 18, 2017

Member

nit: could be nicer if those subpixel_quantize_offset calls are batched per expected SubpixelOffset

@kvark
Copy link
Member

kvark commented Sep 18, 2017

Tests are green, merging.
@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Sep 18, 2017

📌 Commit ec26fb9 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Sep 18, 2017

Testing commit ec26fb9 with merge c941796...

bors-servo added a commit that referenced this pull request Sep 18, 2017
Make subpixel positioning match that of Gecko.

Simplify the quantization function, and add unit tests.

Modify the shader to correctly add the glyph subpixel offset
before truncating the value.

With these changes, the glyph rendering is pixel-perfect with
Gecko in all the test cases I checked.

Fixes #1270.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1715)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 19, 2017

☀️ Test successful - status-travis
Approved by: kvark
Pushing c941796 to master...

@bors-servo bors-servo merged commit ec26fb9 into servo:master Sep 19, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@glennw glennw deleted the glennw:fix-subpx branch Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.