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 upSeparate interning text run #3369
Conversation
|
Looks like there is a reftest failure on CI:
Any chance you could do a talos run before review, just to give an idea what effect it has on dl_mutate (even just to make sure it doesn't regress, for now, since we probably won't get big wins from this initial work)? |
|
Here is the try run with talos results. I see some small improvement and regression which is curious. https://treeherder.mozilla.org/#/jobs?repo=try&revision=752295ab260070f973c22dcb167cd2bef18e48bd |
webrender/src/clip.rs, line 101 at r1 (raw file):
This would become simpler if we use a global uid type (mentioned below). webrender/src/intern.rs, line 76 at r1 (raw file):
Having the item uids require this trait and phantom marker feels a bit overengineered to me. How about we just share one uid concrete type among all interners, and don't make them generic. That might aid in debugging too, since a uid is globally unique and would never overlap with a uid from a different interner type. |
|
(partial review only so far, will work through this today). |
|
|
Thanks @gw3583 |
webrender/src/clip.rs, line 101 at r1 (raw file): Previously, gw3583 (Glenn Watson) wrote…
Done. webrender/src/intern.rs, line 76 at r1 (raw file): Previously, gw3583 (Glenn Watson) wrote…
Done. |
|
webrender/src/display_list_flattener.rs, line 1233 at r2 (raw file):
Why is this change needed? webrender/src/display_list_flattener.rs, line 1264 at r2 (raw file):
same webrender/src/display_list_flattener.rs, line 1302 at r2 (raw file):
same webrender/src/picture.rs, line 573 at r2 (raw file):
This is not quite right for Pictures (their rect is built dynamically), but this wasn't handled correctly previously anyway - I've got a fix for it in my local branch. webrender/src/picture.rs, line 1253 at r2 (raw file):
Maybe make this a helper method on FrameResources? Seems like it'll be used in a few places. webrender/src/scene_builder.rs, line 173 at r2 (raw file):
What is this trait needed for? |
webrender/src/display_list_flattener.rs, line 2236 at r2 (raw file):
Is there a reason to have these as separate traits rather than a "Primitive" trait or similar? webrender/src/prim_store/text_run.rs, line 29 at r2 (raw file):
It's probably worth having a set of "common" structs that are embedded within each key / template etc for the data that is shared between all the different types? webrender/src/prim_store/text_run.rs, line 80 at r2 (raw file):
Same here for common data. |
webrender/src/display_list_flattener.rs, line 1233 at r2 (raw file): Previously, gw3583 (Glenn Watson) wrote…
Because PrimitiveInstanceKind:Picture now contains a data_handle. data_handle is |
webrender/src/display_list_flattener.rs, line 2236 at r2 (raw file): Previously, gw3583 (Glenn Watson) wrote…
Because there implemented on different types. I can move webrender/src/picture.rs, line 573 at r2 (raw file): Previously, gw3583 (Glenn Watson) wrote…
Do you need to post me the fix to incorporate? webrender/src/picture.rs, line 1253 at r2 (raw file): Previously, gw3583 (Glenn Watson) wrote…
Done. webrender/src/scene_builder.rs, line 173 at r2 (raw file): Previously, gw3583 (Glenn Watson) wrote…
It's used by the generic version of let interner = self.resources.interner_mut(); // Uses type deduction to work out the which store +
let prim_data_handle = // |
interner // |
.intern(&prim_key, || { ... }); // << From the types required here ----------------+webrender/src/prim_store/text_run.rs, line 29 at r2 (raw file): Previously, gw3583 (Glenn Watson) wrote…
OK, I had that in a version but on IRC you advised against it. I think having common structs can help clean up some pattern matching mess. webrender/src/prim_store/text_run.rs, line 80 at r2 (raw file): Previously, gw3583 (Glenn Watson) wrote…
Done. |
webrender/src/display_list_flattener.rs, line 2236 at r2 (raw file): Previously, djg (Dan Glastonbury) wrote…
One thing I found that is having impl CreateShadow for LinearGradient {
fn create_shadow(&self, shadow: &Shadow) -> Self {
PrimitiveKeyKind::LinearGradient { .. } |
panic!("bug: this prim is not supported in shadow contexts");
}
}We don't need the |
|
|
|
@gw3583 Ping |
|
Sorry, all-hands jetlag and that - I was going to take a more detailed look in the morning, but I think it probably looks good in general now, or the remaining bits could be done as follow ups. Did we work out what effect this has on talos? |
|
Probably worth getting @kvark to take a quick look too, if he has time. |
|
I'm currently working through removing the conflict with servo/master. Update shortly. @gw3583 It had a slight improvement on talos, but I wasn't expecting much of a change yet. |
|
@djg Yea, I wouldn't expect a large improvement until we separate solid rects. As long as it doesn't regress, we're good for now |
|
|
|
Sorry, this got conflicts again - I think it should be good to go once those conflicts are resolved? |
|
@gw3583 Apparently there is one comment to resolve? |
|
I think it's fine to get this merged now, to avoid any more rebase issues. We should be able to fix up any remaining changes as follow ups. |
|
@bors-servo r+ |
|
|
Separate interning text run First part of separating Primitives into separate interned data. <!-- 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/3369) <!-- Reviewable:end -->
|
|
…449ec591527a (WR PR #3369). r=kats servo/webrender#3369 Differential Revision: https://phabricator.services.mozilla.com/D13936 --HG-- extra : moz-landing-system : lando
…449ec591527a (WR PR #3369). r=kats servo/webrender#3369 Differential Revision: https://phabricator.services.mozilla.com/D13936
…449ec591527a (WR PR #3369). r=kats servo/webrender#3369 Differential Revision: https://phabricator.services.mozilla.com/D13936 UltraBlame original commit: 690bea1cb27f8288c479bcea354474a17268ad96
…449ec591527a (WR PR #3369). r=kats servo/webrender#3369 Differential Revision: https://phabricator.services.mozilla.com/D13936 UltraBlame original commit: 690bea1cb27f8288c479bcea354474a17268ad96
…449ec591527a (WR PR #3369). r=kats servo/webrender#3369 Differential Revision: https://phabricator.services.mozilla.com/D13936 UltraBlame original commit: 690bea1cb27f8288c479bcea354474a17268ad96
djg commentedNov 29, 2018
•
edited by larsbergstrom
First part of separating Primitives into separate interned data.
This change is