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 upAdd support for API-defined ClipChains #2300
Conversation
|
cc @staktrace |
6172148
to
ce16fef
|
Here is the Gecko try run for this PR: https://treeherder.mozilla.org/#/jobs?repo=try&revision=192ed24cbbacbd7fd2807f3fc06e797377dee5f3 |
|
Reviewed 11 of 11 files at r1. wrench/reftests/clip/custom-clip-chains.yaml, line 1 at r1 (raw file):
Could we add a comment here describing what this is testing for? Comments from Reviewable |
|
Just one minor comment in reviewable, otherwise looks good to me! |
|
@staktrace Do you want to take a look at the API here before it gets merged? |
ce16fef
to
d29fefb
|
Review status: 10 of 11 files reviewed at latest revision, 1 unresolved discussion. wrench/reftests/clip/custom-clip-chains.yaml, line 1 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
Done. Comments from Reviewable |
d29fefb
to
000d7a9
|
I think this should provide sufficient expressiveness to deal with all the scenarios that we need. Thanks! |
|
@bors-servo r+ |
|
|
|
|
|
|
|
Needs a rebase. |
API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes #840. Fixes #1964.
000d7a9
to
f43028a
|
@bors-servo r=glennw |
|
|
Add support for API-defined ClipChains API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes #1964. <!-- 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/2300) <!-- Reviewable:end -->
|
|
|
Reviewed 5 of 11 files at r1, 6 of 6 files at r2. webrender/src/clip_scroll_tree.rs, line 470 at r2 (raw file):
nit: can do a within a parent pattern match webrender/src/clip_scroll_tree.rs, line 476 at r2 (raw file):
I don't clearly understand what is going on here. We take Ah, I guess it's actually simple: Current clip chain = Parent clip chain + all the current clip nodes. Makes sense now :) Perhaps, we could have a comment on that function? Could we re-use the allocations within webrender/src/clip_scroll_tree.rs, line 663 at r2 (raw file):
do webrender_api/src/display_item.rs, line 435 at r2 (raw file):
we can use webrender_api/src/display_list.rs, line 1350 at r2 (raw file):
nit: could probably not subtracting 1 here Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 6 unresolved discussions. webrender/src/clip_scroll_tree.rs, line 470 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
I'm not sure how to do this without running past the end of the line... webrender/src/clip_scroll_tree.rs, line 476 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
I'm not sure exactly how to reuse the allocation here, but I will add a comment explaining what is going on. We do need to clone the parent node, but we are just cloning an Rc of the node. webrender/src/clip_scroll_tree.rs, line 663 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Eventually, it might make sense to have all ClipChains represented by ClipChainDescriptors, but for the moment it is hard to unify the two code paths. webrender_api/src/display_item.rs, line 435 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Hrm. Does it make sense to change all of the webrender_api/src/display_list.rs, line 1350 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Is there a good way to do this without keeping an extra variable to record the previous number or the new clip id? Comments from Reviewable |
|
Sorry for taking so long to reply to these comments. I have replied above. I have a patch ready with the new comments which I'll post soon. |
This was requested by @kvark in servo#2300.
Add a comment clarifying clip chain construction This was requested by @kvark in #2300. <!-- 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/2354) <!-- Reviewable:end -->
|
There is no ability to continue the review here, since the PR is merged and branch is deleted.
Yep. |
mrobinson commentedJan 14, 2018
•
edited by larsbergstrom
API-defined clip chains allow constructing combinations of clips that
select any combination of clips from the ClipScrollTree without regard
to parents of clips. A ClipChain is defined by an optional ClipChain
parent and a vector of clips to use for that chain. A chain's clips are
combined with its parents clips to provide all the clips for display
items that set their clipping ClipId as the clip chain via
ClipId::ClipChain.
Fixes #1964.
This change is