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 brush segment descriptors from clip mask instances. #3289
Conversation
|
This also seems to give a small but noticeable performance win on some of the talos tests. Try run is not complete but looks good so far: |
|
Mentioned in the comments but repeating here too - the work here to maintain per-instance data between |
|
Try run looks good. |
|
Looks good, I have a few non-blocking concerns.
where is this done?
webrender/src/batch.rs, line 1419 at r1 (raw file):
nit: just return early if it's webrender/src/batch.rs, line 2209 at r1 (raw file):
does this have to be in batch module as opposed to the prim_store as all the rest of webrender/src/frame_builder.rs, line 197 at r1 (raw file):
nit: rename to something more specific, e.g. webrender/src/prim_store.rs, line 887 at r1 (raw file):
does this function always end up just pushing one webrender/src/render_task.rs, line 57 at r1 (raw file):
does it need to be |
|
|
As part of interning primitives, we can move the segmenting process to occur when a primitive is newly interned (which is a significant optimization opportunity). We can do this since segmentation only occurs on clip nodes with the same spatial node as the primitive, thus the segmentation cannot be changed due to scrolling or transform animation. However, the presence of a clip mask per segment may still change each frame, due to clips from other positioning nodes. To handle this, we need to split the per-frame clip mask instance information from the brush segment descriptors. This is also a necessary step to allow borders to be interned, which rely on pre-generated segment descriptors. At the same time, make the size of a RenderTaskId smaller in release builds, and tidy up FrameId::invalid().
webrender/src/batch.rs, line 1419 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done webrender/src/batch.rs, line 2209 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
It references a few symbols that are related to batching only, so I didn't think it made sense to be in prim_store. Instead, I've changed it to be a free helper function. webrender/src/frame_builder.rs, line 197 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done webrender/src/prim_store.rs, line 887 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Indeed, that's much tidier. webrender/src/render_task.rs, line 57 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Nope, fixed. |
|
@kvark Those comments all made sense and have been fixed. Also rebased. |
|
@bors-servo r=kvark |
|
|
Separate brush segment descriptors from clip mask instances. As part of interning primitives, we can move the segmenting process to occur when a primitive is newly interned (which is a significant optimization opportunity). We can do this since segmentation only occurs on clip nodes with the same spatial node as the primitive, thus the segmentation cannot be changed due to scrolling or transform animation. However, the presence of a clip mask per segment may still change each frame, due to clips from other positioning nodes. To handle this, we need to split the per-frame clip mask instance information from the brush segment descriptors. This is also a necessary step to allow borders to be interned, which rely on pre-generated segment descriptors. At the same time, make the size of a RenderTaskId smaller in release builds, and tidy up FrameId::invalid(). <!-- 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/3289) <!-- Reviewable:end -->
|
|
Add default deserializer for frame_id Since frame ID is debug-only, it's not serialized when capturing from a release-built Firefox, making us unable to replay it with debug Wrench. This PR fixes this (broken recently by #3289). r? anyone <!-- 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/3339) <!-- Reviewable:end -->
Add default deserializer for frame_id Since frame ID is debug-only, it's not serialized when capturing from a release-built Firefox, making us unable to replay it with debug Wrench. This PR fixes this (broken recently by #3289). r? anyone <!-- 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/3339) <!-- Reviewable:end -->
gw3583 commentedNov 9, 2018
•
edited by larsbergstrom
As part of interning primitives, we can move the segmenting
process to occur when a primitive is newly interned (which is
a significant optimization opportunity). We can do this since
segmentation only occurs on clip nodes with the same spatial
node as the primitive, thus the segmentation cannot be changed
due to scrolling or transform animation.
However, the presence of a clip mask per segment may still
change each frame, due to clips from other positioning nodes.
To handle this, we need to split the per-frame clip mask instance
information from the brush segment descriptors.
This is also a necessary step to allow borders to be interned,
which rely on pre-generated segment descriptors.
At the same time, make the size of a RenderTaskId smaller in
release builds, and tidy up FrameId::invalid().
This change is