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 #3848

Merged
merged 6 commits into from Feb 4, 2020
Merged

Conversation

@moz-gfx
Copy link

moz-gfx commented Feb 4, 2020

No description provided.

Jim Blandy and others added 6 commits Feb 4, 2020
…ented LayoutSize. r=kvark

Without this change, get_line_decoration_sizes returns an (inline_size,
block_size) pair, where inline_size is parallel to the line being decorated, and
block_size perpendicular. However, these values are generally used as the
dimensions of an axis-aligned bounding box for the line, not as specific
parameters to the rendering process, so it makes sense to arrange them into a
LayoutSize value in this function, since it is already taking the orientation
into account anyway.

The caller, SceneBuilder::add_line, then doesn't need to swap the components,
and the adjustment of the clipping rectangle to avoid partial dots looks a bit
more natural: widths with widths, heights with heights.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/3549dd471446c291864822736f4587c81741cd56
…. r=kvark

We want to use the same line decoration (dashed, dotted, wavy) shader code for
both horizontal and vertical lines, so it makes sense for them to use a
coordinate system that has been rotated (transposed, actually) so that .x always
runs parallel to the line being decorated, and .y is always perpendicular.

Before this patch, we passed the orientation enum as a vertex attribute, used a
switch to swap coordinates in the vertex shader, and then swapped them again in
the fragment shader.

This patch trades the orientation for a f32 'axis select' vertex attribute, and
uses `mix` to swap them in the vertex shader. Then no consideration is necessary
in the fragment shader: the vLocalPos varying is already in the appropriate form.

Since get_line_decoration_sizes is already thinking in terms of line-parallel
coordinates, it might seem like a good idea for decoration jobs to simply use
line-parallel coordinates throughout. However, this actually results in more
swapping and opportunities for confusion: much of the CPU work is concerned with
the rectangle the decoration's mask occupies in the texture cache, which is
axis-aligned.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/dfb21632ea198c1acdc6a34ee08113d516f666d5
…rma bc failures. on a CLOSED TREE

Backed out changeset dfb21632ea19 (bug 1571974)
Backed out changeset 3549dd471446 (bug 1571974)

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/801277ae423f6f5183d62c45cda342ea28ee6040
…ented LayoutSize. r=kvark

Without this change, get_line_decoration_sizes returns an (inline_size,
block_size) pair, where inline_size is parallel to the line being decorated, and
block_size perpendicular. However, these values are generally used as the
dimensions of an axis-aligned bounding box for the line, not as specific
parameters to the rendering process, so it makes sense to arrange them into a
LayoutSize value in this function, since it is already taking the orientation
into account anyway.

The caller, SceneBuilder::add_line, then doesn't need to swap the components,
and the adjustment of the clipping rectangle to avoid partial dots looks a bit
more natural: widths with widths, heights with heights.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/9f54a1daf2f205d25f8d1b12ec09ed29176f9f2d
…. r=kvark

We want to use the same line decoration (dashed, dotted, wavy) shader code for
both horizontal and vertical lines, so it makes sense for them to use a
coordinate system that has been rotated (transposed, actually) so that .x always
runs parallel to the line being decorated, and .y is always perpendicular.

Before this patch, we passed the orientation enum as a vertex attribute, used a
switch to swap coordinates in the vertex shader, and then swapped them again in
the fragment shader.

This patch trades the orientation for a f32 'axis select' vertex attribute, and
uses `mix` to swap them in the vertex shader. Then no consideration is necessary
in the fragment shader: the vLocalPos varying is already in the appropriate form.

Since get_line_decoration_sizes is already thinking in terms of line-parallel
coordinates, it might seem like a good idea for decoration jobs to simply use
line-parallel coordinates throughout. However, this actually results in more
swapping and opportunities for confusion: much of the CPU work is concerned with
the rectangle the decoration's mask occupies in the texture cache, which is
axis-aligned.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/71ce2bbd81881f19f797cfc8aec7e7ea2ea8347f
…e tiles. r=mstange

This patch introduces a per-tile valid rect. In the initial implementation,
this only uses the bounds of the overall picture cache bounding rect. The
next part of this patch will make use of true per-tile valid regions, to
improve performance where there are holes in a single cache slice.

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

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

moz-gfx commented Feb 4, 2020

@bors-servo r=auto

@bors-servo
Copy link
Contributor

bors-servo commented Feb 4, 2020

📌 Commit 74380b6 has been approved by auto

@bors-servo
Copy link
Contributor

bors-servo commented Feb 4, 2020

Testing commit 74380b6 with merge 007c340...

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

bors-servo commented Feb 4, 2020

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

@bors-servo bors-servo merged commit 74380b6 into servo:master Feb 4, 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.