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 upPort image primitives to use interning. #3350
Conversation
|
This is a large patch - it's mostly shuffling code around to make it work with interning. It also includes #3349, and may be simpler to review after that lands. This is quite untidy in places - we're taking on a bit of technical debt here to get stuff ported to interned primitives and enable picture caching. Once that is in place, it will definitely be worth a tidy up pass over these new structures, to tidy up the interfaces and pack the structures better. |
|
Try run is here: There is 1/255 pixel difference in a couple of tests on Windows. These same tests are marked fuzzy on other renderers, so we can do the same here. There is a perma-crash in 'C' - that is unrelated to this patch (see https://bugzilla.mozilla.org/show_bug.cgi?id=1509635#c11 for details). The other couple of failures look to be unrelated intermittents. |
webrender/src/batch.rs, line 1419 at r2 (raw file):
why are we always using premultiplied here? webrender/src/batch.rs, line 1763 at r2 (raw file):
it would be nice to not re-define the variable. I find it confusing (and one of the most arguable Rust language features). Let's either have webrender/src/batch.rs, line 1768 at r2 (raw file):
is |
|
|
webrender/src/batch.rs, line 1419 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Because the only remaining primitives in this legacy path are the gradients, which have a specified blend mode of premultiplied alpha (previously was coming from the get_blend_mode method). The specified blend mode is kind of like CSS specified properties - it can still get overridden below to be opaque based on various other properties. webrender/src/batch.rs, line 1763 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
I don't think this does re-define the variable? Each of the definitions of specified_blend_mode is in a separate branch of the match {} webrender/src/batch.rs, line 1768 at r2 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Yea, it's implicit. I removed the ref on source for consistency. |
|
@bors-servo r+ |
|
|
Port image primitives to use interning. <!-- 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/3350) <!-- Reviewable:end -->
|
|
…257a85bea047 (WR PR #3350). r=kats servo/webrender#3350 Differential Revision: https://phabricator.services.mozilla.com/D13031 --HG-- extra : moz-landing-system : lando
…257a85bea047 (WR PR #3350). r=kats servo/webrender#3350 Differential Revision: https://phabricator.services.mozilla.com/D13031
gw3583 commentedNov 26, 2018
•
edited by larsbergstrom
This change is