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 upGlyph key scratch store #3325
Glyph key scratch store #3325
Conversation
|
Will post Gecko try run once I get gecko compiling with the new webrender. |
webrender/src/storage.rs, line 8 at r1 (raw file):
I would implement this differently: struct Index<T>(u32, PhantomData<T>);
struct Storage<T> { ... }
impl<T> Storage<T> {
pub fn push(&mut self, t: T) -> Index<T> {
...
}
...
}I think it would be better, because:
webrender/src/storage.rs, line 33 at r1 (raw file):
can we use webrender/src/storage.rs, line 38 at r1 (raw file):
where is this used? webrender/src/storage.rs, line 47 at r1 (raw file):
webrender/src/storage.rs, line 58 at r1 (raw file):
webrender/src/storage.rs, line 77 at r1 (raw file):
here and below we don't need |
In preparation for the next commit, move prepare_interned_prim_for_render from PrimitiveInstance to PrimitiveStore to aid borrowck of PrimStore members.
webrender/src/storage.rs, line 8 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Having webrender/src/storage.rs, line 33 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
It is possible but it's a bit less ergonomic. I wanted to use webrender/src/storage.rs, line 38 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
This is used in the next patch when creating PrimitiveKeyKind::TextRun. let run_index = prim_store.text_runs.push(TextRunPrimitive {
used_font: font.clone(),
glyph_keys_range: Range::default(),
shadow,
});webrender/src/storage.rs, line 47 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. webrender/src/storage.rs, line 58 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. webrender/src/storage.rs, line 77 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. |
|
Try run result for first version: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2a1353c60b3cedfea396330beab65b825170b821&selectedJob=212544428 |
|
It'd be interesting to get some separate profiles of the change to use a scratch buffer vs. using the chunked storage. It may well be that a normal Running |
webrender/src/storage.rs, line 33 at r1 (raw file): Previously, djg (Dan Glastonbury) wrote…
where is |
webrender/src/storage.rs, line 33 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
|
Reduce the size of TextRunPrimitive by placing the temporary storage of GlyphKeys into PrimitiveStore and have TextRunPrimitive hold range.
|
@bors-servo r+ |
|
|
Glyph key scratch store Implement scratch storage of GlyphKeys for #3324 <!-- 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/3325) <!-- Reviewable:end -->
|
(Discussed on IRC - I was initially misreading how the storage type works. This should be a simple win, and we'll extend it with recycle functionality as a follow up). |
|
|
djg commentedNov 19, 2018
•
edited by larsbergstrom
Implement scratch storage of GlyphKeys for #3324
This change is