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 upUse get_relative_transform for clip <-> prim space conversions. #2977
Conversation
|
r? @kvark Try run here (looks good I think, just a few unrelated intermittents): I changed the expected result for one of the wrench tests - it is an incorrect test that came from Servo, and the item should actually be clipped in this case. |
webrender/src/clip_scroll_tree.rs, line 146 at r1 (raw file):
I wonder if we can do it the other way, so that we don't have to collect/reverse nodes and everything is a simple pass? I.e. currently we collect nodes by ascending from child to parent, then reverse them, then accumulate the transforms on the way from parent to child. Can we instead accumulate it from child to parent in the first place? webrender/src/clip_scroll_tree.rs, line 495 at r1 (raw file):
nit: can we use the webrender/src/clip_scroll_tree.rs, line 595 at r1 (raw file):
wow nice set of tests! webrender/src/clip_scroll_tree.rs, line 625 at r1 (raw file):
what about those commented out ones? wrench/reftests/transforms/reftest.list, line 13 at r1 (raw file):
oh, shouldn't we just update the png instead to make it match? Equality test is more useful than the non-equality one |
This expands the functionality in get_relative_transform to work for both primitive and clip space conversions. This code path is not super efficient (it could be improved), but on the majority of sites it never runs, and even on cases where it does run, the coordinate system tree is typically very shallow. We can optimize this function if it ever shows up in a profile.
webrender/src/clip_scroll_tree.rs, line 146 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
We definitely can, at least in some cases. I was planning to do this as a later follow up, if that's ok (once I've got more of the patches done that will rely on this code). But, I can do this optimization now, if you'd prefer? webrender/src/clip_scroll_tree.rs, line 495 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done webrender/src/clip_scroll_tree.rs, line 595 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. webrender/src/clip_scroll_tree.rs, line 625 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Re-enabled those. wrench/reftests/transforms/reftest.list, line 13 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Add blank.yaml and made it an equality check to ensure the primitive is culled. |
|
@kvark Thanks for the review - comments addressed, I think. |
|
Thank you! |
|
|
Use get_relative_transform for clip <-> prim space conversions. This expands the functionality in get_relative_transform to work for both primitive and clip space conversions. This code path is not super efficient (it could be improved), but on the majority of sites it never runs, and even on cases where it does run, the coordinate system tree is typically very shallow. We can optimize this function if it ever shows up in a profile. <!-- 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/2977) <!-- Reviewable:end -->
|
|
gw3583 commentedAug 20, 2018
•
edited by larsbergstrom
This expands the functionality in get_relative_transform to work
for both primitive and clip space conversions.
This code path is not super efficient (it could be improved), but
on the majority of sites it never runs, and even on cases where it
does run, the coordinate system tree is typically very shallow. We
can optimize this function if it ever shows up in a profile.
This change is