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

Text + perspective clipping fix. #3187

Merged
merged 1 commit into from Oct 12, 2018
Merged

Conversation

@emilio
Copy link
Member

emilio commented Oct 11, 2018

Much in the spirit of #3145.


This change is Reviewable

@emilio emilio requested a review from kvark Oct 11, 2018
@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

r? @kvark

@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

@mstange
Copy link
Contributor

mstange commented Oct 11, 2018

Does this also fix the bug reported in #3087 (comment) ?

@kvark
kvark approved these changes Oct 11, 2018
Copy link
Member

kvark left a comment

looks great, thank you!

@kvark
Copy link
Member

kvark commented Oct 11, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Oct 11, 2018

📌 Commit 3b2104a has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Oct 11, 2018

Testing commit 3b2104a with merge 478c289...

bors-servo added a commit that referenced this pull request Oct 11, 2018
Text + perspective clipping fix.

Much in the spirit of #2991.

Working on a test now, but it's taking annoyingly hard because all the capture stuff is broken for fonts here :(

<!-- 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/3187)
<!-- Reviewable:end -->
@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

@bors-servo r-

  • want to wait to add a test-case.
@kvark
Copy link
Member

kvark commented Oct 11, 2018

@bors-servo r-
let's wait for the try to finish, then r=me

@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

@mstange it does.

@bors-servo
Copy link
Contributor

bors-servo commented Oct 11, 2018

💔 Test failed - status-appveyor

@emilio emilio force-pushed the emilio:perspective-text branch from 3b2104a to f8d7c3a Oct 11, 2018
@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

Hmm, needs some work, I think I just need to account for the snap_offset, but will double-check.

@emilio emilio force-pushed the emilio:perspective-text branch from f8d7c3a to af0ffeb Oct 11, 2018
@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Oct 11, 2018

Trying commit af0ffeb with merge 790ddd7...

bors-servo added a commit that referenced this pull request Oct 11, 2018
Text + perspective clipping fix.

Much in the spirit of #3145.

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

bors-servo commented Oct 11, 2018

💔 Test failed - status-taskcluster

@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

There are some tests failing on automation, but the text tests on my machine are way more unreliable, so it's going to be fun...

(C'mon, even my own test is failing on automation, and I just took the screenshot myself :/)

	reftests/text/synthetic-bold-transparent.yaml == reftests/text/synthetic-bold-transparent-ref.yaml
	reftests/text/white-opacity.yaml == reftests/text/white-opacity.png
	reftests/text/snap-text-offset.yaml == reftests/text/snap-text-offset-ref.yaml
	reftests/text/snap-clip.yaml == reftests/text/snap-clip-ref.yaml
	reftests/text/perspective-clip.yaml == reftests/text/perspective-clip.png
@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

Ah, the snap offset can be in local space for untransformed glyphs... That's somewhat messy :(

@emilio emilio force-pushed the emilio:perspective-text branch from af0ffeb to 700ac9f Oct 11, 2018
@emilio
Copy link
Member Author

emilio commented Oct 11, 2018

Ok, I understood what this code is trying to do. This should be the right thing :)

@emilio emilio force-pushed the emilio:perspective-text branch from 700ac9f to a3addc1 Oct 12, 2018
@emilio
Copy link
Member Author

emilio commented Oct 12, 2018

Try looks good, and reftest failed in OSX / Win, so I marked it linux-only as many in the same directory.

@kvark
Copy link
Member

kvark commented Oct 12, 2018

So you ended up not fixing any more snapping offsets?

@kvark
kvark approved these changes Oct 12, 2018
@emilio
Copy link
Member Author

emilio commented Oct 12, 2018

Nope, the snapping offset bit was wrong, because glyphs are snapped before getting clamped (#3048), plus the offset may not be in the coordinate space we want (it may be transformed to local space if transforms are disabled).

So this is the right thing to do. I have a patch that moves normal brush shaders to snapping before clamping to see what effect it has on the reftests that WR fails right now due to snapping / rounding differences.

@bors-servo r=kvark

@bors-servo
Copy link
Contributor

bors-servo commented Oct 12, 2018

📌 Commit a3addc1 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Oct 12, 2018

Testing commit a3addc1 with merge 0e6f6e8...

bors-servo added a commit that referenced this pull request Oct 12, 2018
Text + perspective clipping fix.

Much in the spirit of #3145.

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

bors-servo commented Oct 12, 2018

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

@bors-servo bors-servo merged commit a3addc1 into servo:master Oct 12, 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
@emilio emilio deleted the emilio:perspective-text branch Nov 9, 2018
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.