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

Handle box-shadow stretch mode per-axis. #2563

Merged
merged 1 commit into from Mar 27, 2018
Merged

Handle box-shadow stretch mode per-axis. #2563

merged 1 commit into from Mar 27, 2018

Conversation

@glennw
Copy link
Member

glennw commented Mar 23, 2018

This is a crash fix for box shadows that have one axis which is
very long, and one axis that is small.

It's also an optimization for box-shadows that have one long and
one short axis, since it allows drawing a minimal shadow rect in
these cases. This is handled by having a stretch mode per-axis
rather than one for the entire shadow primitive.

Fixes #2561.


This change is Reviewable

This is a crash fix for box shadows that have one axis which is
very long, and one axis that is small.

It's also an optimization for box-shadows that have one long and
one short axis, since it allows drawing a minimal shadow rect in
these cases. This is handled by having a stretch mode per-axis
rather than one for the entire shadow primitive.

Fixes #2561.
@glennw
Copy link
Member Author

glennw commented Mar 23, 2018

@glennw
Copy link
Member Author

glennw commented Mar 23, 2018

Try run looks good. There are a couple of seemingly unrelated intermittents, but all the box-shadow reftests appear the same.

@glennw
Copy link
Member Author

glennw commented Mar 26, 2018

r? @kvark

@kvark
Copy link
Member

kvark commented Mar 27, 2018

:lgtm:


Reviewed 9 of 9 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


webrender/res/cs_clip_box_shadow.glsl, line 23 at r1 (raw file):

    vec2 src_rect_size;
    float clip_mode;
    int stretch_mode_x;

nit: could be ivec2 stretch_mode;


webrender/res/cs_clip_box_shadow.glsl, line 77 at r1 (raw file):

    }

    switch (bs_data.stretch_mode_y) {

somewhat unfortunate code duplication, can be addressed later


Comments from Reviewable

@kvark
Copy link
Member

kvark commented Mar 27, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Mar 27, 2018

📌 Commit b0f31e8 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Mar 27, 2018

Testing commit b0f31e8 with merge 53750b8...

bors-servo added a commit that referenced this pull request Mar 27, 2018
Handle box-shadow stretch mode per-axis.

This is a crash fix for box shadows that have one axis which is
very long, and one axis that is small.

It's also an optimization for box-shadows that have one long and
one short axis, since it allows drawing a minimal shadow rect in
these cases. This is handled by having a stretch mode per-axis
rather than one for the entire shadow primitive.

Fixes #2561.

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

bors-servo commented Mar 27, 2018

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

@bors-servo bors-servo merged commit b0f31e8 into servo:master Mar 27, 2018
2 of 3 checks passed
2 of 3 checks passed
code-review/reviewable 2 discussions left (glennw, kvark)
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.

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