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

Sync changes from mozilla-central gfx/wr #3841

Merged
merged 7 commits into from Jan 23, 2020
Merged

Conversation

@moz-gfx
Copy link

moz-gfx commented Jan 23, 2020

No description provided.

sotaro and others added 7 commits Jan 23, 2020
…muizel,kvark

border-image-repeat: Round is equivalent to Repeat with the pattern size adjusted to fill the area with a whole number of repetitions. This is done by adjusting the segment's stretch_size in the shader so that it fits a whole number of times in the segment's size.

Differential Revision: https://phabricator.services.mozilla.com/D59370

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/6b61867f80b123f11aa3e9252f0ac005a12787c0
Unlike the border areas that only nead their own dimensions, the middle area of a border-image determines its repetition parameter based on the size of the borders. A new flag is provided for the brush_image shader to know whether to use the segment's own rect or look at the borders when computing the pattern's size.

Differential Revision: https://phabricator.services.mozilla.com/D59675

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/834d49acd3c02a7e5ae75d0a4d01a55e69c8fdba
The computation of the repetition depends on the aspect ratio of the segment's uv rectangle, which was previously represented by the dx/dy variables in the shader. These were mistakenly computing the ratio of the normalized uvs within the primitive's total uv rect, which was incorrect since the normalization introduces a non-uniform scale.
This patch fixes it by taking the uv size in device pixels instead of the the normalized textel rect. dx and dy are also renamed into segment_uv_size which is a more informative name.

Differential Revision: https://phabricator.services.mozilla.com/D60768

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/b77165c764503ccf3b0f52b60fff265d4048ba6e
@moz-gfx
Copy link
Author

moz-gfx commented Jan 23, 2020

@bors-servo r=auto

@bors-servo
Copy link
Contributor

bors-servo commented Jan 23, 2020

📌 Commit ec3e2d4 has been approved by auto

@bors-servo
Copy link
Contributor

bors-servo commented Jan 23, 2020

Testing commit ec3e2d4 with merge 5a181a4...

bors-servo added a commit that referenced this pull request Jan 23, 2020
Sync changes from mozilla-central gfx/wr
@bors-servo
Copy link
Contributor

bors-servo commented Jan 23, 2020

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: auto
Pushing 5a181a4 to master...

@bors-servo bors-servo merged commit ec3e2d4 into servo:master Jan 23, 2020
3 checks passed
3 checks passed
Community-TC (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

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