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

Fix AA on ellipse clip code under some edge cases. #2604

Merged
merged 1 commit into from Apr 4, 2018

Conversation

@glennw
Copy link
Member

glennw commented Apr 4, 2018

If the AA range is > 1.0, due to a specific transform, the inner
pixels of a primitive that are not affected by the elliptical
radii in a clip mask may end up with a signed distance of 1.0,
which causes blending artifacts.

Instead, initialize the default value for signed distance to
the calculated AA range, which ensures we get a blend factor
of 1.0 in such cases.

Fixes #2576.


This change is Reviewable

If the AA range is > 1.0, due to a specific transform, the inner
pixels of a primitive that are not affected by the elliptical
radii in a clip mask may end up with a signed distance of 1.0,
which causes blending artifacts.

Instead, initialize the default value for signed distance to
the calculated AA range, which ensures we get a blend factor
of 1.0 in such cases.

Fixes #2576.
@glennw
Copy link
Member Author

glennw commented Apr 4, 2018

r? @kvark or anyone.

I'll kick off a gecko try shortly.

@glennw
Copy link
Member Author

glennw commented Apr 4, 2018

Try run looks good.

@kvark
kvark approved these changes Apr 4, 2018
Copy link
Member

kvark left a comment

truly a one-liner :)

@kvark
Copy link
Member

kvark commented Apr 4, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2018

📌 Commit 36f27bc has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2018

Testing commit 36f27bc with merge 941bf5a...

bors-servo added a commit that referenced this pull request Apr 4, 2018
Fix AA on ellipse clip code under some edge cases.

If the AA range is > 1.0, due to a specific transform, the inner
pixels of a primitive that are not affected by the elliptical
radii in a clip mask may end up with a signed distance of 1.0,
which causes blending artifacts.

Instead, initialize the default value for signed distance to
the calculated AA range, which ensures we get a blend factor
of 1.0 in such cases.

Fixes #2576.

<!-- 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/2604)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2018

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: kvark
Pushing 941bf5a to master...

@bors-servo bors-servo merged commit 36f27bc into servo:master Apr 4, 2018
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
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.