Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove the per-item complex clipping and masking from the API #1412
Conversation
|
Sorry for the large patch, but most of the changes are due to the API change as well as switching two of the examples to use the example boilerplate. |
e6bea06
to
f5cfc51
|
Why did Also, perhaps you forgot to remove |
| @@ -412,6 +411,38 @@ impl ClipScrollNode { | |||
| _ => false, | |||
| } | |||
| } | |||
|
|
|||
| pub fn find_unclipped_rectangle(&self, | |||
This comment has been minimized.
This comment has been minimized.
kvark
Jun 21, 2017
Member
It appears to be similar to the MashBounds::inner. Perhaps, you could just use clip_info.mask_cache_info.bounds.inner instead of having a separate method?
This comment has been minimized.
This comment has been minimized.
mrobinson
Jun 22, 2017
•
Author
Member
It looks like MaskBounds::inner is using inner_rect_safe() while your optimization is using inner_rect_full(). I confirmed locally that these two methods are producing different rectangles. I'm not sure what is correct here, so would it make sense to try to combine these calculations in a later patch?
|
|
f5cfc51
to
e6228a7
|
@bors-servo r+ |
|
|
Remove the per-item complex clipping and masking from the API
This is the first step to getting all masking operations into the
ClipScrollTree. We don't completely this feature, as it's still sued
for the extra clips. These will be moved into the ClipScrollTree in a
later change. This change allows us to fully eliminate the
`DisplayListBuilder::push_clip_region` API and push its functionality
into the `define_clip` API.
Most of the changes here are:
1. Changes to the examples, wrench, and reftests to match the new API.
2. Adapting the "split rectangle clipped by rounded rect"
optimization to use the ClipScrollTree. This is unfortunately a
bit more complicated now, but now includes any rounded rect clip
instead of per-item ones.
<!-- 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/1412)
<!-- Reviewable:end -->
|
|
|
Something scary is going on:
|
This is the first step to getting all masking operations into the
ClipScrollTree. We don't completely this feature, as it's still sued
for the extra clips. These will be moved into the ClipScrollTree in a
later change. This change allows us to fully eliminate the
DisplayListBuilder::push_clip_region API and push its functionality
into the define_clip API.
Most of the changes here are:
1. Changes to the examples, wrench, and reftests to match the new API.
2. Adapting the "split rectangle clipped by rounded rect"
optimization to use the ClipScrollTree. This is unfortunately a
bit more complicated now, but now includes any rounded rect clip
instead of per-item ones.
e6228a7
to
0bf6655
|
@kvark This was an issue with the rebase on top of the rust upgrade. It should be fixed now. Sorry for the churn! |
|
@mrobinson thanks! |
|
|
Remove the per-item complex clipping and masking from the API
This is the first step to getting all masking operations into the
ClipScrollTree. We don't completely this feature, as it's still sued
for the extra clips. These will be moved into the ClipScrollTree in a
later change. This change allows us to fully eliminate the
`DisplayListBuilder::push_clip_region` API and push its functionality
into the `define_clip` API.
Most of the changes here are:
1. Changes to the examples, wrench, and reftests to match the new API.
2. Adapting the "split rectangle clipped by rounded rect"
optimization to use the ClipScrollTree. This is unfortunately a
bit more complicated now, but now includes any rounded rect clip
instead of per-item ones.
<!-- 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/1412)
<!-- Reviewable:end -->
|
|
|
@mrobinson FYI the change to only treat non-zero-origin or clip-smaller-than-content clips as scroll frames resulted in a bunch of async-scrolling reftest regressions in gecko (link). Presumably once the API allows us to more explicitly create scroll frames vs non-scrolling clips and we start using that this will not be a problem any more. The patch I applied to verify this can be found here. |
|
@mrobinson We should discuss the per-item clip stuff in SF - I have a few questions / concerns about possible performance impacts of not supporting |
PR servo#1412 introduced a small semantic change mixed in with the removal of per-item complex clipping and masking. The semantic change resulted in numerous Gecko reftest failures as many scroll frames ended up being treated as clips. Eventually WR will have an explicit API to allow callers to distinguish scroll frames from clips, but until that is in place we should maintain the old behaviour of just treating all clips as potential scroll frames.
This is happening in #1428. |
Make image mask path optional in YAML reader Otherwise we crash during "show" command on some frames. Appears to be broken as of #1412 <!-- 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/2225) <!-- Reviewable:end -->
mrobinson commentedJun 21, 2017
•
edited by larsbergstrom
This is the first step to getting all masking operations into the
ClipScrollTree. We don't completely this feature, as it's still sued
for the extra clips. These will be moved into the ClipScrollTree in a
later change. This change allows us to fully eliminate the
DisplayListBuilder::push_clip_regionAPI and push its functionalityinto the
define_clipAPI.Most of the changes here are:
optimization to use the ClipScrollTree. This is unfortunately a
bit more complicated now, but now includes any rounded rect clip
instead of per-item ones.
This change is