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 dual-source blending path for subpixel text when supported. #2244
Conversation
This makes it possible to share batches when the text color is different between runs. This can result in significantly better draw call batching. Add option to wrench to disable dual source blending path. Add reftest option to control if dual-source blending is used.
|
r? @kvark The dual-source integration itself is reasonably simple. The code to weave all the options through wrench etc is a bit ugly - if you have suggestions for another way to achieve that, let me know :) (Will start a gecko try shortly) |
|
Anecdotally this does seem to give a significant performance win on several sites I tested (not all sites - there are a couple of other known causes of bad batch break behaviour we need to fix too). |
|
Try looks good, I think. One fail that's expected from current master, a couple of unrelated intermittents. https://treeherder.mozilla.org/#/jobs?repo=try&revision=f410cd46b756acd94e0ab1ed5d20f7eb5b306485 |
Yes, this is exactly what I meant in #2111 by saying:
Reviewed 14 of 14 files at r1. webrender/src/frame_builder.rs, line 77 at r1 (raw file):
this seems a bit out of place, shouldn't it be inside webrender/src/render_backend.rs, line 595 at r1 (raw file):
should this check for webrender_api/src/api.rs, line 779 at r1 (raw file):
jeez, it's almost 2018 and the diff programs are not yet smart enough to detect the new code along the less indented boundary :( wrench/reftests/text/reftest.list, line 33 at r1 (raw file):
argh Comments from Reviewable |
|
I only got minor concerns about this, feel free to r=me please. |
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. webrender/src/frame_builder.rs, line 77 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
This is where it's a bit weird how it threads the information through. The main issue is that the render backend needs to know this, since it affects batching (whether the color of the text is relevant to the batch key). Since the backend doesn't have access to the Device, we need to provide it here. webrender/src/render_backend.rs, line 595 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
The enabled flag is really more like "enabled if available" - it's ANDed with the is available flag when passing the details to the batching code on whether to use dual-source blending. Comments from Reviewable |
|
@kvark Thanks for the review. Added a couple of explanations for your questions. Let me know if there's changes needed based on that, otherwise I think this is ready to go :) |
|
Thanks! |
|
|
Add dual-source blending path for subpixel text when supported. This makes it possible to share batches when the text color is different between runs. This can result in significantly better draw call batching. Add option to wrench to disable dual source blending path. Add reftest option to control if dual-source blending is used. <!-- 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/2244) <!-- Reviewable:end -->
|
|
glennw commentedDec 20, 2017
•
edited by larsbergstrom
This makes it possible to share batches when the text color is
different between runs. This can result in significantly better
draw call batching.
Add option to wrench to disable dual source blending path.
Add reftest option to control if dual-source blending is used.
This change is