Commit Graph

906 Commits

Author SHA1 Message Date
Kartikaya Gupta
c6cc78e85f Bug 1523321 - Run the wrupdater on m-c pushes that touch gfx/wr. r=tomprince,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D33548

--HG--
extra : moz-landing-system : lando
2019-07-16 13:49:54 +00:00
Kartikaya Gupta
4be1661f49 Bug 1523321 - Add the wrupdater code to sync m-c's copy of WR to github. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D33547

--HG--
extra : moz-landing-system : lando
2019-07-15 21:31:46 +00:00
Emilio Cobos Álvarez
6e0169a2cf Bug 1566150 - Simplify the border may_need_repetition code. r=nical
Just spotted this while going through the regressing patch in bug 1565910.

Differential Revision: https://phabricator.services.mozilla.com/D38106

--HG--
extra : moz-landing-system : lando
2019-07-15 22:41:39 +00:00
Nicolas Silva
1e2404a275 Bug 1565910 - Preserve batch features when merging batches. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D38080

--HG--
extra : moz-landing-system : lando
2019-07-15 21:46:22 +00:00
sotaro
6112475e13 Bug 1565463 - Add ImageBorder image key to Tile r=gw
Differential Revision: https://phabricator.services.mozilla.com/D37834

--HG--
extra : moz-landing-system : lando
2019-07-14 21:54:54 +00:00
Jeff Muizelaar
81aac9064d Bug 1563770. Always include a visible rect with blob images. r=nical
I suspect we may change things more in the future as we blob's size
just be the visible rect but this is an incremental step in the right
direction.

It also includes some changes to make sure that we always update our
tiles appropriately.

Differential Revision: https://phabricator.services.mozilla.com/D37079

--HG--
extra : moz-landing-system : lando
2019-07-13 19:07:05 +00:00
Jeff Muizelaar
65dccbec8c Bug 1565620. Preserve initial batching debug state across debug state changes. r=kvark
This lets us run wrench with -no-batch and turn on the profiler.

Differential Revision: https://phabricator.services.mozilla.com/D37893

--HG--
extra : moz-landing-system : lando
2019-07-12 18:04:45 +00:00
Nicolas Silva
db54fa27c5 Bug 1559688 - Clip tile dirty rects to the tile's total rect. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D37841

--HG--
extra : moz-landing-system : lando
2019-07-12 12:04:57 +00:00
Dan Glastonbury
be87d8ce17 Bug 1550640 - P4: Remove bincode. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D32783

--HG--
extra : moz-landing-system : lando
2019-07-12 06:12:33 +00:00
Dan Glastonbury
866dcdad61 Bug 1550640 - P3: Replace bincode with peek-poke. r=Gankro
Replace `serde`-derived `bincode` with custom binary
serialization/deserialization that generates more efficient code at rustc
`opt-level = 2`.

Differential Revision: https://phabricator.services.mozilla.com/D32782

--HG--
extra : moz-landing-system : lando
2019-07-12 06:12:31 +00:00
Bogdan Tara
4b7c4bf220 Backed out 2 changesets (bug 1550640) for webrender bustages CLOSED TREE
Backed out changeset 00e5a40ee249 (bug 1550640)
Backed out changeset 46c850f36c6f (bug 1550640)
2019-07-12 06:26:05 +03:00
Dan Glastonbury
be054e6278 Bug 1550640 - P4: Remove bincode. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D32783

--HG--
extra : moz-landing-system : lando
2019-07-12 02:47:25 +00:00
Dan Glastonbury
c7d8e015b8 Bug 1550640 - P3: Replace bincode with peek-poke. r=Gankro
Replace `serde`-derived `bincode` with custom binary
serialization/deserialization that generates more efficient code at rustc
`opt-level = 2`.

Differential Revision: https://phabricator.services.mozilla.com/D32782

--HG--
extra : moz-landing-system : lando
2019-07-12 02:47:23 +00:00
Gurzau Raul
3697df8022 Backed out 2 changesets (bug 1550640) for webrenderer bustages on a CLOSED TREE.
Backed out changeset 2dcbe1372a05 (bug 1550640)
Backed out changeset 84db3a9838a5 (bug 1550640)
2019-07-12 04:56:07 +03:00
Dan Glastonbury
3401662ae8 Bug 1550640 - P4: Remove bincode. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D32783

--HG--
extra : moz-landing-system : lando
2019-07-12 01:28:29 +00:00
Dan Glastonbury
f020cdec9b Bug 1550640 - P3: Replace bincode with peek-poke. r=Gankro
Replace `serde`-derived `bincode` with custom binary
serialization/deserialization that generates more efficient code at rustc
`opt-level = 2`.

Differential Revision: https://phabricator.services.mozilla.com/D32782

--HG--
extra : moz-landing-system : lando
2019-07-12 01:28:22 +00:00
Csoregi Natalia
d7d499fe52 Merge inbound to mozilla-central. a=merge 2019-07-12 02:00:51 +03:00
Csoregi Natalia
20e91a0890 Backed out changeset 5c88b35cc6f5 (bug 1563770) for causing bug 1565231. a=backout 2019-07-11 23:14:01 +03:00
Jeff Muizelaar
3e4eb446aa Bug 1563770. Always include a visible rect with blob images. r=nical
I suspect we may change things more in the future as we blob's size
just be the visible rect but this is an incremental step in the right
direction.

It also includes some changes to make sure that we always update our
tiles appropriately.

Differential Revision: https://phabricator.services.mozilla.com/D37079

--HG--
extra : moz-landing-system : lando
2019-07-11 02:32:35 +00:00
Connor Brewster
3f078809f7 Bug 1555483 - Part 5: Add wrench reftests for SVG filters and update test expectations r=gw
Differential Revision: https://phabricator.services.mozilla.com/D35742

--HG--
rename : gfx/wr/wrench/reftests/filters/filter-flood-ref.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml
rename : gfx/wr/wrench/reftests/filters/filter-flood.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml
extra : moz-landing-system : lando
2019-07-10 22:37:48 +00:00
Connor Brewster
65b65c54ba Bug 1555483 - Part 4: Sanitize filter primitives r=gw
Differential Revision: https://phabricator.services.mozilla.com/D35741

--HG--
extra : moz-landing-system : lando
2019-07-10 22:37:44 +00:00
Connor Brewster
76b9b0a883 Bug 1555483 - Part 3: Add SVG render task and shader r=gw
The SVG task supports the pre-existing SVG filters along with Blend.

Differential Revision: https://phabricator.services.mozilla.com/D34091

--HG--
extra : moz-landing-system : lando
2019-07-10 22:37:30 +00:00
Connor Brewster
532a3f2aa6 Bug 1555483 - Part 2: Add SVG filter picture composite mode r=gw
Differential Revision: https://phabricator.services.mozilla.com/D34088

--HG--
extra : moz-landing-system : lando
2019-07-10 22:36:32 +00:00
Connor Brewster
3efce98819 Bug 1555483 - Part 1: Add SVG filter primitive display item. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D34087

--HG--
extra : moz-landing-system : lando
2019-07-10 22:36:25 +00:00
Noemi Erli
7ac279ac4a Backed out 5 changesets (bug 1555483) for causing wrench bustages CLOSED TREE
Backed out changeset 8149efc1f813 (bug 1555483)
Backed out changeset 917f800e4e43 (bug 1555483)
Backed out changeset 418839320ab5 (bug 1555483)
Backed out changeset 134a51a0e034 (bug 1555483)
Backed out changeset 7c43dc769da7 (bug 1555483)

--HG--
rename : gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml => gfx/wr/wrench/reftests/filters/filter-flood-ref.yaml
rename : gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml => gfx/wr/wrench/reftests/filters/filter-flood.yaml
2019-07-10 23:27:36 +03:00
Connor Brewster
2b84406608 Bug 1555483 - Part 5: Add wrench reftests for SVG filters and update test expectations r=gw
Differential Revision: https://phabricator.services.mozilla.com/D35742

--HG--
rename : gfx/wr/wrench/reftests/filters/filter-flood-ref.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml
rename : gfx/wr/wrench/reftests/filters/filter-flood.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml
extra : moz-landing-system : lando
2019-07-10 02:17:17 +00:00
Connor Brewster
8e86f00687 Bug 1555483 - Part 4: Sanitize filter primitives r=gw
Differential Revision: https://phabricator.services.mozilla.com/D35741

--HG--
extra : moz-landing-system : lando
2019-07-10 02:17:19 +00:00
Connor Brewster
31021a43ce Bug 1555483 - Part 3: Add SVG render task and shader r=gw
The SVG task supports the pre-existing SVG filters along with Blend.

Differential Revision: https://phabricator.services.mozilla.com/D34091

--HG--
extra : moz-landing-system : lando
2019-07-10 02:17:21 +00:00
Connor Brewster
2a21b2e853 Bug 1555483 - Part 2: Add SVG filter picture composite mode r=gw
Differential Revision: https://phabricator.services.mozilla.com/D34088

--HG--
extra : moz-landing-system : lando
2019-07-10 02:17:23 +00:00
Connor Brewster
4f98a810a8 Bug 1555483 - Part 1: Add SVG filter primitive display item. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D34087

--HG--
extra : moz-landing-system : lando
2019-07-10 02:17:25 +00:00
Josh Matthews
c95bb0f221 Bug 1564448 - Workaround bugs in old ANGLE versions. r=jrmuizel
[import_pr] From https://github.com/servo/webrender/pull/3696

Differential Revision: https://phabricator.services.mozilla.com/D37429

--HG--
extra : moz-landing-system : lando
2019-07-10 14:20:40 +00:00
Andreea Pavel
0f343bbb5a Backed out changeset 29b1742d1d3b (bug 1563770) WR bustages on a CLOSED TREE 2019-07-10 17:17:01 +03:00
Jeff Muizelaar
ea2bfdae47 Bug 1563770. Always include a visible rect with blob images. r=nical
I suspect we may change things more in the future as we blob's size
just be the visible rect but this is an incremental step in the right
direction.

It also includes some changes to make sure that we always update our
tiles appropriately.

Differential Revision: https://phabricator.services.mozilla.com/D37079

--HG--
extra : moz-landing-system : lando
2019-07-10 13:55:09 +00:00
Jonas Platte
c26d1cfea9 Bug 1563588 - Update glutin to 0.19, winit to 0.18 r=nical
From https://github.com/servo/webrender/pull/3690

Differential Revision: https://phabricator.services.mozilla.com/D36978

--HG--
extra : moz-landing-system : lando
2019-07-10 11:12:08 +00:00
Jamie Nicol
191dd4f438 Bug 1535146 - Attempt to load non-startup shaders from disk cache when required. r=bholley
On startup some program binaries are loaded from disk into an
in-memory cache. When we call create_program() we check if the
required program is present in this cache, and if so we call
glProgramBinary(). This is done early on so that the driver can
perform any necessary work in the background.

There may however be binaries in the disk cache that have not yet been
loaded in to memory, in order not to slow down startup. This change
makes it so that we attempt to load missing binaries from disk during
link_program(). The reason we do not do this in create_program() is
because that would result in loading all shaders from disk during
startup, which we want to avoid. Loading these shaders may therefore
take slightly longer than if they'd been loaded at startup, but will
still be much faster than recompiling them from scratch, and startup
will remain quick.

If loading the shaders on startup had previously timed out, then we do
not attempt to load shaders on demand as the disk is probably too slow
for that to be useful.

Depends on D33954

Differential Revision: https://phabricator.services.mozilla.com/D33955

--HG--
extra : moz-landing-system : lando
2019-07-09 16:09:15 +00:00
Connor Brewster
205d3b8e05 Bug 1564677 - Disable border/no-aa.yaml on Android emulator
Differential Revision: https://phabricator.services.mozilla.com/D37518

--HG--
extra : moz-landing-system : lando
2019-07-10 03:49:30 +00:00
Dorel Luca
9dcd722ccc Backed out 5 changesets (bug 1555483) for Wrench failure in sdcard/wrench/reftests/border/no-aa.yaml
Backed out changeset 244b23c635c5 (bug 1555483)
Backed out changeset 4d4f45f7f1d1 (bug 1555483)
Backed out changeset 5618213e2196 (bug 1555483)
Backed out changeset d6169482c913 (bug 1555483)
Backed out changeset 3a1e5a56759b (bug 1555483)

--HG--
rename : gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml => gfx/wr/wrench/reftests/filters/filter-flood-ref.yaml
rename : gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml => gfx/wr/wrench/reftests/filters/filter-flood.yaml
2019-07-10 05:12:26 +03:00
Connor Brewster
24bb8d2a5c Bug 1555483 - Part 5: Add wrench reftests for SVG filters and update test expectations r=gw
Differential Revision: https://phabricator.services.mozilla.com/D35742

--HG--
rename : gfx/wr/wrench/reftests/filters/filter-flood-ref.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml
rename : gfx/wr/wrench/reftests/filters/filter-flood.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml
extra : moz-landing-system : lando
2019-07-08 23:46:39 +00:00
Connor Brewster
cc92cb66fa Bug 1555483 - Part 4: Sanitize filter primitives r=gw
Differential Revision: https://phabricator.services.mozilla.com/D35741

--HG--
extra : moz-landing-system : lando
2019-07-08 22:33:25 +00:00
Connor Brewster
94b32299f8 Bug 1555483 - Part 3: Add SVG render task and shader r=gw
The SVG task supports the pre-existing SVG filters along with Blend.

Differential Revision: https://phabricator.services.mozilla.com/D34091

--HG--
extra : moz-landing-system : lando
2019-07-08 22:33:18 +00:00
Connor Brewster
cc5163e0bb Bug 1555483 - Part 2: Add SVG filter picture composite mode r=gw
Differential Revision: https://phabricator.services.mozilla.com/D34088

--HG--
extra : moz-landing-system : lando
2019-07-08 22:32:59 +00:00
Connor Brewster
f48188d4e6 Bug 1555483 - Part 1: Add SVG filter primitive display item. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D34087

--HG--
extra : moz-landing-system : lando
2019-07-08 22:32:52 +00:00
Oana Pop Rus
1a5e831b42 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-07-11 13:00:34 +03:00
Nicolas Silva
e3c0e8bbd0 Bug 1557208 - Eagerly clear remaining documents during shutdown. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D36576

--HG--
extra : rebase_source : 96d80421358242d86d6194389de32b927b6234fe
extra : source : d4421f90b64b1398e4a095d7476d03283c44ec97
2019-07-01 20:31:59 +02:00
Nicolas Silva
a8b0d6f029 Bug 1557208 - Block the caller during RenderBackend shutdown. r=sotaro
--HG--
extra : rebase_source : 4f7177b6732c0ba7192a70896b7e0f8bf4586474
extra : source : 0a8860887ee53b1ef6d9f0ea8f03f246f913395d
2019-07-11 09:50:50 +02:00
sotaro
45350055b1 Bug 1531898 - Don't trigger composites on out-of-viewport native texture image updates r=gw
Differential Revision: https://phabricator.services.mozilla.com/D34314

--HG--
extra : moz-landing-system : lando
2019-07-09 02:34:37 +00:00
Dzmitry Malyshau
e7e86f1bd8 Bug 1563993 - WR chase into clips r=jrmuizel
it's very helpful to see the list of clips and the way they affect a chased primitive
Example:
```
    building clip chain instance with local rect TypedRect(1561.0×1968.0 at (-300.0,-300.0))
        clip Rectangle(3840.0×1874.0, Clip) at (0.0,0.0) in space SpatialNodeIndex(1)
        flags (empty), resulted in Partial
        clip Rectangle(3840.0×1874.0, Clip) at (0.0,0.0) in space SpatialNodeIndex(2)
        flags (empty), resulted in Partial
```

Differential Revision: https://phabricator.services.mozilla.com/D37137

--HG--
extra : moz-landing-system : lando
2019-07-08 13:09:38 +00:00
Andreea Pavel
a0eedef06a Backed out changeset f1b593ede263 (bug 1563993) for wrench bustages on a CLOSED TREE 2019-07-08 05:11:23 +03:00
Dzmitry Malyshau
ffc66bad70 Bug 1563993 - WR chase into clips r=jrmuizel
it's very helpful to see the list of clips and the way they affect a chased primitive
Example:
```
    building clip chain instance with local rect TypedRect(1561.0×1968.0 at (-300.0,-300.0))
        clip Rectangle(3840.0×1874.0, Clip) at (0.0,0.0) in space SpatialNodeIndex(1)
        flags (empty), resulted in Partial
        clip Rectangle(3840.0×1874.0, Clip) at (0.0,0.0) in space SpatialNodeIndex(2)
        flags (empty), resulted in Partial
```

Differential Revision: https://phabricator.services.mozilla.com/D37137

--HG--
extra : moz-landing-system : lando
2019-07-08 01:48:54 +00:00
Dzmitry Malyshau
6104350440 Bug 1548339 - WR: Remove the color/alpha feature in cs_scale shader r=jrmuizel
this makes the shader simpler at no cost

Differential Revision: https://phabricator.services.mozilla.com/D37114

--HG--
extra : moz-landing-system : lando
2019-07-05 21:11:44 +00:00
Chris AtLee
a0d3d64841 Bug 1559975: Fix python2/3 compat in gfx/ r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35337

--HG--
extra : moz-landing-system : lando
2019-07-05 14:28:55 +00:00
Kartikaya Gupta
e997669828 Bug 1525314 - Disable tile markers on Android as they seem to crash a lot. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D36794

--HG--
extra : moz-landing-system : lando
2019-07-04 21:35:06 +00:00
Coroiu Cristina
3983fddf6d Backed out 6 changesets (bug 1525314) for reftest failures at reftests/svg/filters/css-filters/saturate-zero.html om a CLOSED TREE
Backed out changeset 0ed2509b7191 (bug 1525314)
Backed out changeset af72d1c4c107 (bug 1525314)
Backed out changeset ab21a3ff4ae4 (bug 1525314)
Backed out changeset 02399933ac4b (bug 1525314)
Backed out changeset 95790a07a93c (bug 1525314)
Backed out changeset 28f52fd3934e (bug 1525314)
2019-07-05 00:29:12 +03:00
Kartikaya Gupta
4b784c8f1a Bug 1525314 - Disable tile markers on Android as they seem to crash a lot. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D36794

--HG--
extra : moz-landing-system : lando
2019-07-03 21:53:59 +00:00
Dzmitry Malyshau
f3630e279f Bug 1546818 - Change WR text transform to be relative to the surface raster node r=gw
a follow-up to D36603 that switches the base space from the surface node to the raster node.

Differential Revision: https://phabricator.services.mozilla.com/D36828

--HG--
extra : moz-landing-system : lando
2019-07-04 14:54:36 +00:00
Dzmitry Malyshau
a29869406b Bug 1546818 - WR text local transform fix r=gw
Change the glyph transform computation to be relative to the surface node.

Differential Revision: https://phabricator.services.mozilla.com/D36603

--HG--
extra : moz-landing-system : lando
2019-07-03 18:59:42 +00:00
Dzmitry Malyshau
8f5b101ef6 Bug 1562989 - Fix WR frameID checks to not trigger on replay r=gw
Differential Revision: https://phabricator.services.mozilla.com/D36650

--HG--
extra : moz-landing-system : lando
2019-07-03 01:35:39 +00:00
Glenn Watson
6b55adc20e Bug 1562788 - Add support for benchmarking llvmpipe and swiftshader in wrench. r=nical
* Add a script for running wrench under various software rasterizers.
* Add support to wrench for non-blocking event loop.
* Add support to wrench for selecting GL/ES rendering API.
* Update x11 bindings for wrench, to fix a release only crash.

Differential Revision: https://phabricator.services.mozilla.com/D36551

--HG--
extra : moz-landing-system : lando
2019-07-02 21:52:16 +00:00
Andreea Pavel
468f91f972 Backed out changeset 9c6775d713e8 (bug 1562788) for webrender lint tidy bustage on a CLOSED TREE 2019-07-03 00:43:26 +03:00
Glenn Watson
861fa49918 Bug 1562788 - Add support for benchmarking llvmpipe and swiftshader in wrench. r=nical
* Add a script for running wrench under various software rasterizers.
* Add support to wrench for non-blocking event loop.
* Add support to wrench for selecting GL/ES rendering API.
* Update x11 bindings for wrench, to fix a release only crash.

Differential Revision: https://phabricator.services.mozilla.com/D36551

--HG--
extra : moz-landing-system : lando
2019-07-02 17:15:18 +00:00
Dzmitry Malyshau
3ad5ab9386 Bug 1562892 - WR capture native fonts as raw r=lsalzman
we save the native fonts by their full path now. On macOS, there is no
such thing as a full filesystem path for a CGFont (or at least we don't track it),
so loading a capture falls back to the old logic of using the dummy font.

Differential Revision: https://phabricator.services.mozilla.com/D36604

--HG--
extra : moz-landing-system : lando
2019-07-02 15:50:28 +00:00
Jeff Muizelaar
3fada47065 Bug 1561305. Eliminate unused viewport_tiles field. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D35807

--HG--
extra : moz-landing-system : lando
2019-07-01 07:28:41 +00:00
Jeff Muizelaar
d14beb98f4 Bug 1561303. Add some asserts for the surface size. r=nical
This is the first piece of the blob-recoord series. Adding
some checks to ensure things stay sane.

Differential Revision: https://phabricator.services.mozilla.com/D35806

--HG--
extra : moz-landing-system : lando
2019-07-01 07:28:03 +00:00
Glenn Watson
632715284a Bug 1560853 - Fix picture cache tiles with fractional origins. r=kvark
Gecko layouts typically produce a picture cache where the origin
of the picture rect is an integer. However, it can occasionally
be a fractional origin.

In these cases, we need to ensure the content origin is floored,
to maintain consistent snapping. When this case occurs, the UV
rect for the tile also needs adjusting, to ensure the exact
1:1 texel:pixel mapping when drawing the tile.

Differential Revision: https://phabricator.services.mozilla.com/D35761

--HG--
extra : moz-landing-system : lando
2019-06-25 20:28:16 +00:00
Dzmitry Malyshau
12edec92c3 Bug 1561021 - Cleanup WR picture caching setup a bit r=gw
Follow-up to D35139 that removes a hundred LOC

Differential Revision: https://phabricator.services.mozilla.com/D35687

--HG--
extra : moz-landing-system : lando
2019-06-25 05:30:06 +00:00
Glenn Watson
0e34c42163 Bug 1560499 - Fix subpixel detection for transparent tile caches. r=kvark
Some pages from Gecko produce a display list for the main content
tile cache that has a transparent background. Detect these cases
and disable subpixel text rendering to ensure correct blending.

Differential Revision: https://phabricator.services.mozilla.com/D35627

--HG--
extra : moz-landing-system : lando
2019-06-24 17:32:36 +00:00
Nicolas Silva
d1d43baacc Bug 1558135 - Use a faster image shader when we don't need repetitions and anti-aliasing. r=gw
--HG--
extra : rebase_source : 5b6a332ba781ef9673fe9866872c3fe2977049f6
2019-06-20 10:14:48 -07:00
Glenn Watson
0689b50e52 Bug 1559295 - Support multiple picture cache tile sizes in WR texture cache. r=kvark
In future, picture cache tiles will support different sizes, depending
on the size of the content slice being cached, and how frequently
parts of the slice are changing.

Although currently unused, this patch adds support for specifying
multiple different tile sizes for the picture cache texture array.

Differential Revision: https://phabricator.services.mozilla.com/D34989

--HG--
extra : moz-landing-system : lando
2019-06-19 15:46:18 +00:00
Csoregi Natalia
9420c9eccf Backed out changeset be881e8aa8d9 (bug 1559295) for webrender bustage on webrender/src/texture_cache.rs. CLOSED TREE
--HG--
extra : histedit_source : 56889f6c35d9135a2c3f9177d344ba55121db2f7
2019-06-19 17:34:44 +03:00
Glenn Watson
ae6e0cf4a3 Bug 1559295 - Support multiple picture cache tile sizes in WR texture cache. r=kvark
In future, picture cache tiles will support different sizes, depending
on the size of the content slice being cached, and how frequently
parts of the slice are changing.

Although currently unused, this patch adds support for specifying
multiple different tile sizes for the picture cache texture array.

Differential Revision: https://phabricator.services.mozilla.com/D34989

--HG--
extra : moz-landing-system : lando
2019-06-14 19:38:34 +00:00
Glenn Watson
77363f0e08 Bug 1559535 - Fix crash related to mismatched clips with picture caching. r=kvark
Fixes an edge case where splitting the top level primitive list
for picture caching may result in a mismatched push/pop clip
pair.

This is not a particularly efficient fix, but it's a rare enough
edge case for now that this fix will be good enough until we work
out the long term solution for the push/pop clip chain instances.

Differential Revision: https://phabricator.services.mozilla.com/D35139

--HG--
extra : moz-landing-system : lando
2019-06-19 08:40:27 +00:00
Glenn Watson
ee02d52111 Bug 1559354 - SVG graphs broken with Webrender enabled. r=nical
This patch fixes two issues with blob images + new picture caching.

1) The logic that determines a conservative set of visible tiles
   for tiled / blob images was no longer correct. It was relying
   on the bounds of a single tile to build the conservative rect.
   Instead, take the overall primitive world bounds and derive a
   conservative set of visible tiles from this.

2) The logic to detect if an image was dirty was incorrect, and
   somewhat error prone. It now maintains a set of dirty images
   that have been requested. The image key dependencies are then
   checked during the tile cache post_update step.

Differential Revision: https://phabricator.services.mozilla.com/D35126

--HG--
extra : moz-landing-system : lando
2019-06-18 16:08:21 +00:00
Jamie Nicol
34dc1a1c4a Bug 1556763 - Enable wrench blend reftests on android devices. r=kats
These now work on actual devices now, but must remain disabled on the
emulator until bug 1555002 is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D34619

--HG--
extra : moz-landing-system : lando
2019-06-15 11:56:33 +00:00
Jamie Nicol
ee505d0bfd Bug 1556763 - Disable blend_equation_advanced on adreno devices. r=gw
There appears to be a driver bug on android 8 and older where it does
not render correctly.

Differential Revision: https://phabricator.services.mozilla.com/D34618

--HG--
extra : moz-landing-system : lando
2019-06-15 11:56:24 +00:00
Jamie Nicol
ce7a78895a Bug 1556763 - Add layout qualifier to fragment shader output for advanced blend. r=kvark
When using an advanced blend equation, fragment shader output must be
marked with a matching layout qualifier. Not doing so was causing
subsequent glDraw* operations to fail.

This patch adds a new shader feature, WR_FEATURE_ADVANCED_BLEND, which
requires the necessary extension and adds the qualifier. Variants of
the brush_image shaders are created with this feature, and are used
whenever a brush_image shader is requested for BlendMode::Advanced.

Differential Revision: https://phabricator.services.mozilla.com/D34617

--HG--
extra : moz-landing-system : lando
2019-06-15 11:56:14 +00:00
Glenn Watson
e22f19cf52 Bug 1558106 - Support picture caching for multiple scroll roots. r=kvark
This patch implements the majority of the planned picture caching
improvements. It supports most of the functionality required to
(as a follow up) support OS compositor integration. It also improves
on the robustness and functionality of the previous picture caching
implementation.

There are some expected temporary performance regressions in
some cases (such as content that is constantly invalidating) and
during initial page render when many render targets must be drawn
to. These performance regressions will be resolved in follow up
commits by supporting multi-resolution tiles.

The scene is split into a number of slices, determined by the scroll
root of each primitive, which can be found by the primitive's
spatial node indices. If a scene contains too many slices, then
picture caching is disabled on the page, to avoid excessive texture
memory usage, and rendering falls back to rasterizing each frame.

The specific changes in this patch are:
    * Support tile caches for multiple scroll roots, allowing the
      entire page (including fixed divs and the main UI bar) to be
      cached in most cases, in addition to the main content.
    * Remove requirement to read tiles back from the framebuffer.
      Instead, they are drawn into the picture cache target tiles,
      and blitted to the screen. This is slightly slower than the
      existing picture caching when content is constantly changing,
      however this cost will disappear / become irrelevant when
      the OS compositor integration work is complete.
    * Switch picture cache render targets to be nearest sampled (they
      are always rendered 1:1) and support depth buffer targets.
    * Make use of the external scroll offset support to allow removal
      of the primitive correlation hacks in the previous picture
      caching implementation. Also allows storing of primitive
      dependencies in picture space rather than world space, which
      reduces floating point inaccuracies.
    * Determine if each tile and picture cache can be considered
      opaque. This is used to determine whether subpixel AA text
      rendering is available on a slice, and for rendering optimizations
      related to disabling blending and/or tile clears.
    * Use the clip chain instance results from the recent visibility pass
      work to determine clip chain dependencies. This results in fewer
      clip item dependencies in tiles, which is faster to check validity
      and reduces redundant invalidations.
    * Remove extra overhead during batching related to batch lists,
      and region iteration, as they are no longer required.
    * Support PrimitiveVisibilityMask during batching. This allows a
      single traversal of a picture (surface) root during batching to
      efficiently construct multiple alpha batcher objects (typically
      one per invalida tile).
    * Picture caching is now handled implicitly by WR, depending on
      the content of the scene. There is no requirement for client
      code to manually select which stacking context should be cached.
    * Simplify how clip chain / transform dependencies are tracked by
      picture cache tiles.
    * Support pushing / popping enclosing clip chain roots without
      the need for a stacking context / picture in some cases. This
      simplifies the logic to split the scene into multiple slices.

The main remaining work in this area is (a) extend the code to
optionally provide each slice as an input to the OS compositor
rather than drawing the tiles in WR, and (b) support multi-resolution
tiles so that we reduce the draw call, batching and render target
overhead in cases where much of the page content is changing.

Differential Revision: https://phabricator.services.mozilla.com/D34319

--HG--
extra : moz-landing-system : lando
2019-06-13 04:43:56 +00:00
Nicolas Silva
250c484e01 Bug 1555655 - Box the TileCache in PicturePrimitive. r=gw
The tile cache is 352 bytes large and in the majority of cases picture primitives don't have one, so this saves a few KB of ram in typical pages reduces the likely hood of hitting OOM crashes while growing the primitives vector.

Differential Revision: https://phabricator.services.mozilla.com/D34346

--HG--
extra : moz-landing-system : lando
2019-06-10 19:54:13 +00:00
Dzmitry Malyshau
f43371a2ff Bug 1474294 - Enable WR perspective box shadow reftest r=Gankro
a follow-up to the actual fix and the reftest

Differential Revision: https://phabricator.services.mozilla.com/D34384

--HG--
extra : moz-landing-system : lando
2019-06-10 20:05:00 +00:00
Kartikaya Gupta
a001de8d97 Bug 1555479 - Update wrench mozharness script to support running on a device as well. r=gbrown
The presence or absence of the DEVICE_SERIAL environment variable
is sufficient to control this.

Differential Revision: https://phabricator.services.mozilla.com/D33407

--HG--
extra : moz-landing-system : lando
2019-06-08 08:59:06 +00:00
Kartikaya Gupta
6d682927cb Bug 1555479 - Rename android_emulator_wrench to android_wrench.py. r=gbrown
This is in preparation for having the same script be used for emulator
and device runs. No functional change in this patch; it just renames
the file and class.

Differential Revision: https://phabricator.services.mozilla.com/D33406

--HG--
rename : testing/mozharness/scripts/android_emulator_wrench.py => testing/mozharness/scripts/android_wrench.py
extra : moz-landing-system : lando
2019-06-08 08:59:02 +00:00
Kartikaya Gupta
3e5be83a11 Bug 1555479 - Update android skip annotations for Pixel2 results. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D33405

--HG--
extra : moz-landing-system : lando
2019-06-08 08:58:48 +00:00
Kartikaya Gupta
f2fe061b71 Bug 1555479 - Allow wrench to know when it is running in the emulator. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D33404

--HG--
extra : moz-landing-system : lando
2019-06-08 08:58:41 +00:00
Dzmitry Malyshau
9c48545798 Bug 1474294 - Perspective clip interpolation fix r=gw
Force perspective interpolation of UV coordinates in clip shaders.
In addition to fixing the interpolation curve, also adds checks for the homogeneous coordinates to be outside of the meaningful hemisphere, forcing the clip shaders to output zeroes in those areas.

Differential Revision: https://phabricator.services.mozilla.com/D34017

--HG--
extra : moz-landing-system : lando
2019-06-08 02:53:37 +00:00
Bruce Mitchener
48c8560298 Bug 1557721 - Use unwrap_or_default where possible. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Depends on D34166

Differential Revision: https://phabricator.services.mozilla.com/D34167

--HG--
extra : moz-landing-system : lando
2019-06-07 16:19:22 +00:00
Bruce Mitchener
a0f2c26bd2 Bug 1557721 - Remove redundant closure. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Depends on D34165

Differential Revision: https://phabricator.services.mozilla.com/D34166

--HG--
extra : moz-landing-system : lando
2019-06-07 16:19:14 +00:00
Bruce Mitchener
bba33e0309 Bug 1557721 - Simplify boolean expression. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Depends on D34164

Differential Revision: https://phabricator.services.mozilla.com/D34165

--HG--
extra : moz-landing-system : lando
2019-06-07 16:18:25 +00:00
Bruce Mitchener
c41980d970 Bug 1557721 - Use or_insert_with where possible. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Depends on D34162

Differential Revision: https://phabricator.services.mozilla.com/D34164

--HG--
extra : moz-landing-system : lando
2019-06-07 16:17:52 +00:00
Bruce Mitchener
8449544a47 Bug 1557721 - Remove redundant field names. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Depends on D34161

Differential Revision: https://phabricator.services.mozilla.com/D34162

--HG--
extra : moz-landing-system : lando
2019-06-07 16:17:29 +00:00
Bruce Mitchener
8e8893bb16 Bug 1557721 - Use unwrap_or_else where possible. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Depends on D34160

Differential Revision: https://phabricator.services.mozilla.com/D34161

--HG--
extra : moz-landing-system : lando
2019-06-07 16:17:07 +00:00
Bruce Mitchener
ef4c1180af Bug 1557721 - Remove identical conversion. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Depends on D34159

Differential Revision: https://phabricator.services.mozilla.com/D34160

--HG--
extra : moz-landing-system : lando
2019-06-07 16:16:12 +00:00
Bruce Mitchener
5083295c77 Bug 1557721 - Remove unneeded return statement. r=kvark
[wrupdater] From https://github.com/servo/webrender/pull/3667

Differential Revision: https://phabricator.services.mozilla.com/D34159

--HG--
extra : moz-landing-system : lando
2019-06-07 16:15:55 +00:00
Alexis Beingessner
a5a5beced5 Bug 1474294 - Add reftest for a box-shadow in perspective transform without preserve-3d. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D30980

--HG--
extra : moz-landing-system : lando
2019-06-07 14:40:30 +00:00
Bruce Mitchener
50752727e1 Bug 1557183 - Fix typos. r=kats
[wrupdater] From https://github.com/servo/webrender/pull/3665
2019-06-05 20:30:20 -04:00
Kartikaya Gupta
8d93d33a0b Bug 1556597 - Run cargo fix on webrender. r=Gankro
This is the result of `cargo +nightly fix --all-features --all-targets`
using a recent rust nightly.

Depends on D33781

Differential Revision: https://phabricator.services.mozilla.com/D33782

--HG--
extra : moz-landing-system : lando
2019-06-05 14:07:48 +00:00
Kartikaya Gupta
d46fd3203f Bug 1556597 - Fix workspace warnings. r=Gankro
These warnings have been around forever; unused things in the workspace
Cargo.toml file that just need removing.

Differential Revision: https://phabricator.services.mozilla.com/D33781

--HG--
extra : moz-landing-system : lando
2019-06-05 14:05:32 +00:00
Connor Brewster
da4ad436ef Bug 1556590 - Display root render task instead of last render task in WebRender debugger r=gw
Differential Revision: https://phabricator.services.mozilla.com/D33582

--HG--
extra : moz-landing-system : lando
2019-06-04 20:52:29 +00:00
Dzmitry Malyshau
5fc1be5b39 Bug 1554502 - Track the reference frame of batched bounding boxes and enforce it in WR r=gw
Differential Revision: https://phabricator.services.mozilla.com/D33343

--HG--
extra : moz-landing-system : lando
2019-06-03 21:12:54 +00:00
Dan Glastonbury
f2af9f0231 Bug 1550640 - P2: Remove dead code resulting from refactoring of ItemRange. r=Gankro
Having `ItemRange` contain a byte slice means that the `display_list` and
`pipeline_id` don't need to be threaded through code that accesses items from
ItemRange.

Differential Revision: https://phabricator.services.mozilla.com/D32781

--HG--
extra : moz-landing-system : lando
2019-06-04 05:53:05 +00:00
Dan Glastonbury
8cde33bc21 Bug 1550640 - P1: Refactor ItemRange to contain u8 slices for byte ranges. r=Gankro
This refactor is in preparation for P3.

When refactoring `next_raw()` to use `peek_from` instead of
`deserialize_in_place`, it became clear that `ItemRange` is holding a slice of
bytes from the incoming serialized display list and `peek_from` could be adapted
work directly on the byte slice.

It was also noticed that the `get()` interface was potentially unsafe; any
`ItemRange` can be passed into `get()` for any display list.

Differential Revision: https://phabricator.services.mozilla.com/D32780

--HG--
extra : moz-landing-system : lando
2019-06-04 05:53:03 +00:00
Barret Rennie
b526a32af7 Bug 1551735 - Expose bindings to the Renderer's composition recorder structures r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D32233

--HG--
extra : moz-landing-system : lando
2019-05-31 00:31:05 +00:00
Barret Rennie
ba01dca1d6 Bug 1551735 - Add a mode to the AsyncScreenshotGrabber to enable composition recording r=kvark
The AsyncScreenshotGrabber now can operate in two modes:

* `ProfilerScreenshots`, which does asynchronous scaling of the captured frames
  for inclusion in profiles by the Gecko Profiler; and
* `CompositionRecorder`, which does not do any scaling and is used for visual
  metrics computations.

The latter mode is exposed by on the `Renderer` via the `record_frame`,
`map_recorded_frame`, and `release_composition_recorder_structures` methods.

A different handle type (`RecordedFrameHandle`) is returned and consumed by
these functions, but they translate between `RecordedFrameHandle` and
`AsyncScreenshotHandle` when communicating with the underlying
`AsyncScreenshotGrabber`.

I considered making the `AsyncScreenshotGrabber` generic over its handle type,
but the extra cost of monomorphization just to change the handle type did not
seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D32232

--HG--
extra : moz-landing-system : lando
2019-05-31 00:30:52 +00:00
Barret Rennie
5c8de993e0 Bug 1551735 - Split out screenshot grabbing infrasturcture into a new module r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D32523

--HG--
extra : moz-landing-system : lando
2019-05-31 00:30:37 +00:00
Coroiu Cristina
0c344192ae Backed out 7 changesets (bug 1551735) for build bustage at src/gfx/layers/wr/WebRenderCompositionRecorder.h on a CLOSED TREE
Backed out changeset 98e75ac2cf4f (bug 1551735)
Backed out changeset 152e3a6e5c10 (bug 1551735)
Backed out changeset 9deb5350e244 (bug 1551735)
Backed out changeset 6154bdfe6fad (bug 1551735)
Backed out changeset 4a0936bda490 (bug 1551735)
Backed out changeset a7868d694fe1 (bug 1551735)
Backed out changeset 06c8e5f7768d (bug 1551735)
2019-05-31 00:05:00 +03:00
Barret Rennie
1bd07ea3f6 Bug 1551735 - Expose bindings to the Renderer's composition recorder structures r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D32233

--HG--
extra : moz-landing-system : lando
2019-05-30 20:18:23 +00:00
Barret Rennie
c40786fc58 Bug 1551735 - Add a mode to the AsyncScreenshotGrabber to enable composition recording r=kvark
The AsyncScreenshotGrabber now can operate in two modes:

* `ProfilerScreenshots`, which does asynchronous scaling of the captured frames
  for inclusion in profiles by the Gecko Profiler; and
* `CompositionRecorder`, which does not do any scaling and is used for visual
  metrics computations.

The latter mode is exposed by on the `Renderer` via the `record_frame`,
`map_recorded_frame`, and `release_composition_recorder_structures` methods.

A different handle type (`RecordedFrameHandle`) is returned and consumed by
these functions, but they translate between `RecordedFrameHandle` and
`AsyncScreenshotHandle` when communicating with the underlying
`AsyncScreenshotGrabber`.

I considered making the `AsyncScreenshotGrabber` generic over its handle type,
but the extra cost of monomorphization just to change the handle type did not
seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D32232

--HG--
extra : moz-landing-system : lando
2019-05-30 20:18:09 +00:00
Barret Rennie
b5f01eed03 Bug 1551735 - Split out screenshot grabbing infrasturcture into a new module r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D32523

--HG--
extra : moz-landing-system : lando
2019-05-30 20:17:52 +00:00
Connor Brewster
e68c4f61a8 Bug 1536240 - Add debug option to wrench to output specified shader source r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D33088

--HG--
extra : moz-landing-system : lando
2019-05-30 19:28:10 +00:00
Noemi Erli
02b7a9faeb Backed out 7 changesets (bug 1551735) for build bustages in RenderThread.cpp CLOSED TREE
Backed out changeset aa165d8c181d (bug 1551735)
Backed out changeset e7b857609786 (bug 1551735)
Backed out changeset f2a2396a0d4a (bug 1551735)
Backed out changeset 5891d00fca85 (bug 1551735)
Backed out changeset 2e6ca6d6c527 (bug 1551735)
Backed out changeset 3b2078f90715 (bug 1551735)
Backed out changeset a516d20303e6 (bug 1551735)
2019-05-30 23:10:21 +03:00
Barret Rennie
49e2a2721c Bug 1551735 - Expose bindings to the Renderer's composition recorder structures r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D32233

--HG--
extra : moz-landing-system : lando
2019-05-29 21:52:57 +00:00
Barret Rennie
b161b2b08f Bug 1551735 - Add a mode to the AsyncScreenshotGrabber to enable composition recording r=kvark
The AsyncScreenshotGrabber now can operate in two modes:

* `ProfilerScreenshots`, which does asynchronous scaling of the captured frames
  for inclusion in profiles by the Gecko Profiler; and
* `CompositionRecorder`, which does not do any scaling and is used for visual
  metrics computations.

The latter mode is exposed by on the `Renderer` via the `record_frame`,
`map_recorded_frame`, and `release_composition_recorder_structures` methods.

A different handle type (`RecordedFrameHandle`) is returned and consumed by
these functions, but they translate between `RecordedFrameHandle` and
`AsyncScreenshotHandle` when communicating with the underlying
`AsyncScreenshotGrabber`.

I considered making the `AsyncScreenshotGrabber` generic over its handle type,
but the extra cost of monomorphization just to change the handle type did not
seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D32232

--HG--
extra : moz-landing-system : lando
2019-05-29 21:52:44 +00:00
Barret Rennie
4ca216e100 Bug 1551735 - Split out screenshot grabbing infrasturcture into a new module r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D32523

--HG--
extra : moz-landing-system : lando
2019-05-29 21:52:25 +00:00
Noemi Erli
1927c42ef1 Backed out changeset cb8c60790fd9 (bug 1536240) for causing build bustages CLOSED TREE 2019-05-30 21:55:29 +03:00
Connor Brewster
6dd4341bb0 Bug 1536240 - Add debug option to wrench to output specified shader source r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D33088

--HG--
extra : moz-landing-system : lando
2019-05-30 16:18:42 +00:00
Connor Brewster
bb54c17ce3 Bug 1555476 - Implement flood filter in WebRender r=gw
Differential Revision: https://phabricator.services.mozilla.com/D33109

--HG--
extra : moz-landing-system : lando
2019-05-30 03:11:53 +00:00
Dzmitry Malyshau
b431e7fe94 Bug 1554502 - Configurable lookback count r=gw
We've had a constant of 10 hard-coded there since early days.
Turning it into a configurable number allows us to easier tune it and
debug related issues.

Differential Revision: https://phabricator.services.mozilla.com/D32761

--HG--
extra : moz-landing-system : lando
2019-05-30 01:29:43 +00:00
sotaro
acbc3518d5 Bug 1554091 - Remove WrExternalImageBufferType r=jrmuizel
If ExternalImageType is just passed from C to rust, it caused crash on non-Windows platform. It was caused by stack corruption. Then &ExternalImageType is used instead of ExternalImageType to bypass the problem.

Differential Revision: https://phabricator.services.mozilla.com/D32436

--HG--
extra : moz-landing-system : lando
2019-05-28 22:03:54 +00:00
Dzmitry Malyshau
d5d646901c Bug 1532174 - WR remove the world transformations from SpatialNode r=gw
This is the last big step towards consistent flattening of transformations.
It includes removing the old "project_to_2d" method from the utils.

Differential Revision: https://phabricator.services.mozilla.com/D32528

--HG--
extra : moz-landing-system : lando
2019-05-27 03:35:24 +00:00
Bastien Orivel
7294fc12b5 Bug 1554426 - Re-introduce Renderer::current_epoch. r=emilio
It was removed in 1441308 but is used by servo

Differential Revision: https://phabricator.services.mozilla.com/D32598

--HG--
extra : moz-landing-system : lando
2019-05-25 23:02:40 +00:00
Bastien Orivel
998c4ce860 Bug 1554401 - Part 1: Update dwrote to 0.9. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D32567

--HG--
extra : moz-landing-system : lando
2019-05-25 17:08:40 +00:00
Lee Salzman
b1e52e6aaf Bug 1553910 - pass DWrite subpixel order into Skia and WebRender. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D32545

--HG--
extra : moz-landing-system : lando
2019-05-25 16:20:59 +00:00
Glenn Watson
8d73dca1e7 Bug 1553701 - Remove the clip chain stack during the prepare_prims pass in WR. r=kvark,nical
During the visibility pass, the main clip chain instance for each
primitive is created. In the prim prepare pass, a clip chain instance
is generated for each segment (of primitives that are segmented).

This previously required maintaining the active clip chain stack
during both passes. However, this is not ideal for a number of
reasons: the code is somewhat complicated / error prone and the
segment clip chain building step does more work than required.

This patch changes the segment clip chain building code to set up
the active clip nodes based on the result of the initial clip
chain built for the overall primitive during the visibility pass.

This means that it's no longer necessary to maintain the active
clip chain stack during the prepare pass. This simplifies some
upcoming picture caching changes related to avoiding redundant
cache invalidations, which is the main motivation for the change.

Differential Revision: https://phabricator.services.mozilla.com/D32250

--HG--
extra : moz-landing-system : lando
2019-05-24 03:09:28 +00:00
Dzmitry Malyshau
bb778aa169 Bug 1551520 - Use WR relative transform instead of the world inverse r=gw
This is a follow-up to https://phabricator.services.mozilla.com/D30600

Previously, I changed changed the space mapper logic to use the world transformations.
This was seemingly needed because we requrested the relation between primitives and
their clip nodes, which could be in unrelated spatial sub-trees.
However, I believe the change was a mistake, since for clips we should not even try
to get the relative mapping, and clipping is done in world space for these cases.
This change reverts that logic back. ~~Fingers crossed for the try to not show any
asserts firing up inside get_relative_transform.~~ Try is green 🎉

Differential Revision: https://phabricator.services.mozilla.com/D32382

--HG--
extra : moz-landing-system : lando
2019-05-24 00:22:17 +00:00
Kartikaya Gupta
5f30b8c664 Bug 1549776 - Add taskcluster jobs for running wrench on Android. r=jrmuizel
Also docs for running the same thing locally.

Differential Revision: https://phabricator.services.mozilla.com/D32015

--HG--
extra : moz-landing-system : lando
2019-05-23 19:31:06 +00:00
Kartikaya Gupta
8cf7462c57 Bug 1549776 - Disable more reftests due to failures on Android. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D32013

--HG--
extra : moz-landing-system : lando
2019-05-23 15:30:22 +00:00
Kartikaya Gupta
d98f966468 Bug 1549776 - Disable some reftests on debug Android. r=gw
These tests cause panics in debug mode because of the extra GL error
checking. Tests that are disabled are annotated with the failing
GL call.

Differential Revision: https://phabricator.services.mozilla.com/D32012

--HG--
extra : moz-landing-system : lando
2019-05-23 15:30:18 +00:00
Kartikaya Gupta
7b3a5c9560 Bug 1549776 - Disable some reftests on Android. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D32011

--HG--
extra : moz-landing-system : lando
2019-05-23 15:30:08 +00:00
Kartikaya Gupta
14af7bef4d Bug 1549776 - Ensure debug wrench aborts on panic. r=gw
This makes it so that when running reftests, wrench actually terminates
after a panic rather than just hanging. Termination is detectable and so
we can clean up properly instead of waiting until some other layer hits
a timeout.

Differential Revision: https://phabricator.services.mozilla.com/D32010

--HG--
extra : moz-landing-system : lando
2019-05-23 15:30:04 +00:00
Dzmitry Malyshau
a176290c0a Bug 1532174 - WR cache world transform on coordinate systems r=gw
Differential Revision: https://phabricator.services.mozilla.com/D32195

--HG--
extra : moz-landing-system : lando
2019-05-22 19:58:39 +00:00
Jamie Nicol
94cf690698 Bug 1531142 - Avoid excessive glyph rasterization when pinch zooming. r=gw,kats
When pinch zooming webrender would re-rasterize glyphs for each tiny
difference in zoom level. This takes time in itself, but also causes
the texture cache to grow incredibly large, to the point where
resizing it to make room for more glyphs takes far too much time.

This patch avoids this by rounding the size at which glyphs are
rasterized whilst pinch zooming. To do this we add a FrameMsg which
APZ uses to tell webrender whether a spatial node is being pinch
zoomed. Then during frame building if a spatial node is being pinch
zoomed we override the raster space of its corresponding picture.

The chosen raster space is the current zoom level rounded up to the
nearest power of two, but not exceeding 8x. This seems to be a good
balance between quality and performance, though at high zoom levels
the cache still does grow very large due to the size of the glyphs.

Differential Revision: https://phabricator.services.mozilla.com/D30213

--HG--
extra : moz-landing-system : lando
2019-05-22 20:13:34 +00:00
Glenn Watson
0f8cee5dd5 Bug 1552984 - Refactor parts of the WR batching and flattening code, to support future picture caching improvements. r=kvark
This patch contains two isolated changes related to upcoming picture
caching improvements. Specifically:

 * Determine the blit reason for stacking contexts with clips
   earlier, during scene building. This simplifies the code and
   allows better detection of redundant stacking contexts.
 * Centralize the code for pushing batch instances into a small
   number of places. This will simplify the switch to adding
   a single primitive to multiple batch lists, in the case of
   dirty regions with different batchers.

Differential Revision: https://phabricator.services.mozilla.com/D31898

--HG--
extra : moz-landing-system : lando
2019-05-22 14:57:10 +00:00
Bastien Orivel
cf92185937 Bug 1550903 - Part 1: Update ws to 0.8. r=emilio
This is part of the effort to get all the other versions of rand out.
Unfortunately the diff is kinda bug because this is the first crate
requiring rand 0.6 which has been split into multiple crates.

Differential Revision: https://phabricator.services.mozilla.com/D30744

--HG--
extra : moz-landing-system : lando
2019-05-18 21:30:23 +00:00
shindli
caf77278c5 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-05-17 19:38:09 +03:00
arthur.iakab
93aedcdbe3 Backed out 2 changesets (bug 1550903) for causing multiple build bustages CLOSED TREE
Backed out changeset d62be51ffad3 (bug 1550903)
Backed out changeset f48939dc27b6 (bug 1550903)

--HG--
rename : third_party/rust/rand-0.4.3/appveyor.yml => third_party/rust/rand/appveyor.yml
rename : third_party/rust/rand-0.4.3/benches/bench.rs => third_party/rust/rand/benches/bench.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/exponential.rs => third_party/rust/rand/benches/distributions/exponential.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/gamma.rs => third_party/rust/rand/benches/distributions/gamma.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/mod.rs => third_party/rust/rand/benches/distributions/mod.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/normal.rs => third_party/rust/rand/benches/distributions/normal.rs
rename : third_party/rust/rand-0.4.3/src/distributions/range.rs => third_party/rust/rand/src/distributions/range.rs
rename : third_party/rust/rand_jitter/src/lib.rs => third_party/rust/rand/src/jitter.rs
rename : third_party/rust/rand-0.4.3/src/os.rs => third_party/rust/rand/src/os.rs
rename : third_party/rust/rand-0.4.3/src/prng/chacha.rs => third_party/rust/rand/src/prng/chacha.rs
rename : third_party/rust/rand-0.4.3/src/prng/isaac.rs => third_party/rust/rand/src/prng/isaac.rs
rename : third_party/rust/rand-0.4.3/src/prng/isaac64.rs => third_party/rust/rand/src/prng/isaac64.rs
rename : third_party/rust/rand-0.4.3/src/prng/xorshift.rs => third_party/rust/rand/src/prng/xorshift.rs
rename : third_party/rust/rand-0.4.3/src/rand_impls.rs => third_party/rust/rand/src/rand_impls.rs
rename : third_party/rust/rand-0.4.3/src/read.rs => third_party/rust/rand/src/read.rs
rename : third_party/rust/rand-0.4.3/src/reseeding.rs => third_party/rust/rand/src/reseeding.rs
rename : third_party/rust/rand-0.4.3/src/seq.rs => third_party/rust/rand/src/seq.rs
rename : third_party/rust/rand-0.4.3/utils/ziggurat_tables.py => third_party/rust/rand/utils/ziggurat_tables.py
rename : third_party/rust/fuchsia-cprng/LICENSE => third_party/rust/sha1/LICENSE
2019-05-17 03:24:33 +03:00
Bastien Orivel
f75d160ef4 Bug 1550903 - Part 1: Update ws to 0.8. r=emilio
This is part of the effort to get all the other versions of rand out.
Unfortunately the diff is kinda bug because this is the first crate
requiring rand 0.6 which has been split into multiple crates.

Differential Revision: https://phabricator.services.mozilla.com/D30744

--HG--
extra : moz-landing-system : lando
2019-05-15 17:38:14 +00:00
Glenn Watson
7690d772ae Bug 1552084 - Remove lifetime requirements on DrawTarget and ReadTarget in WR. r=emilio
This makes DrawTarget and ReadTarget no longer require a borrow
on a texture. This was previously fine, but in the near future
WR will be rendering picture caching surfaces directly into
texture handles. To allow this, we need to remove the borrow check
requirement on DrawTarget for rustc.

Differential Revision: https://phabricator.services.mozilla.com/D31390

--HG--
extra : moz-landing-system : lando
2019-05-16 22:25:35 +00:00
Nicolas Silva
cc8b7cf247 Bug 1551187 - Rename DropShadowStack into DropShadows. r=kvark"
Differential Revision: https://phabricator.services.mozilla.com/D31248

--HG--
extra : source : fec43bfabf433e3df38114cc172c43d3d9e805d6
2019-05-15 15:21:53 +02:00
Daniel Varga
091774e8ae Merge mozilla-central to mozilla-inbound. a=merge 2019-05-16 00:33:52 +03:00
Nicolas Silva
f32fc5556b Bug 1551187 - Box the color matrix in Filter. r=kvark
ColorMatrix is rarely used but takes most space in the Filter enum.
This removes 44 bytes from the enum and all structs that embed it.

Differential Revision: https://phabricator.services.mozilla.com/D30910

--HG--
extra : source : 07bf88839e1c35e678d11790e149dfda7f00cf30
extra : intermediate-source : bf2c0752c25f339a1179377dbb312249426609de
2019-05-13 14:55:57 +02:00
Nicolas Silva
69467ad736 Bug 1551187 - Rename render task tree into render task graph. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D30897

--HG--
extra : source : fd6cd1ec027cbba9318ff95707442720bfab4869
extra : intermediate-source : 4a7bd2c049d36a507fc0ecbfc5507c2738db050e
2019-05-15 15:11:42 +02:00
Nicolas Silva
1605b8d73b Bug 1551187 - Remove the single-shadow picture composite code. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D30896

--HG--
extra : source : 65211647408f5d152868e25dff853ad6692d35a8
extra : intermediate-source : a14155473c5d593ebdfbce7ad5ca3521392ea6ba
2019-05-15 15:57:34 +02:00
Jamie Nicol
49dbdb7f53 Bug 1550582 - Add wrench reftest r=gw
Rename the old overlapping corners testcase and add comments to make
the tests' purposes clearer:
 * The existing one is testing that a corner is clipped correctly when
   it overlaps with an adjacent corner.
 * The new one is testing that corners and segments are clipped
   correctly when opposite edges of the border overlap.

Depends on D30814

Differential Revision: https://phabricator.services.mozilla.com/D30815

--HG--
rename : gfx/wr/wrench/reftests/border/border-overlapping-ref.yaml => gfx/wr/wrench/reftests/border/border-overlapping-corner-ref.yaml
rename : gfx/wr/wrench/reftests/border/border-overlapping.yaml => gfx/wr/wrench/reftests/border/border-overlapping-corner.yaml
extra : moz-landing-system : lando
2019-05-15 10:45:25 +00:00
Jamie Nicol
318728e2ed Bug 1550582 - Ensure the overlap is filled correctly when opposite border edges overlap. r=gw
To fix bug 1496540 it was made so that webrender clips border corner
segments so that they do not overlap with their opposing
edges. However, cases where opposing _edges_ both overlap with
eachother (rather than just a corner overlapping with an edge), the
corners are clipped too far and a gap is left in the middle.

Additionally, no clipping was added to the edge segments. So rather
than there be a gap there is an area that is painted twice, which is
apparent if the colour is semi-transparent.

This fixes these issues by identifying when opposing edges overlap and
calculating the midpoint, then clipping the edges and corners to that
midpoint instead.

Differential Revision: https://phabricator.services.mozilla.com/D30814

--HG--
extra : moz-landing-system : lando
2019-05-15 10:43:25 +00:00
Barret Rennie
1a5e406183 Bug 1551353 - Correctly map PBOs for readback on GLES r=kvark
The implementation of `Device::map_pbo_for_readback` on GLES (e.g., Windows
with ANGLE) was using the incorrect enumeration value when attempting to map
the buffer into memory.

Differential Revision: https://phabricator.services.mozilla.com/D31156

--HG--
extra : moz-landing-system : lando
2019-05-14 22:54:19 +00:00
Kartikaya Gupta
0f392e1c84 Bug 1551611 - Skip subpixel AA tests on macOS 10.14. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D31183

--HG--
extra : moz-landing-system : lando
2019-05-15 15:12:40 +00:00
Kartikaya Gupta
5276a16758 Bug 1551611 - Add macOS version information to the ReftestEnvironment. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D31182

--HG--
extra : moz-landing-system : lando
2019-05-15 15:10:51 +00:00
Kartikaya Gupta
1ba5b82de1 Bug 1551611 - Introduce a ReftestEnvironment. r=Gankro
This moves the existing constants into a ReftestEnvironment which
encapsulates it a bit better. Also this fixes the incorrect "debug" cfg
check to "debug_assertions" which is more correct.

Differential Revision: https://phabricator.services.mozilla.com/D31181

--HG--
extra : moz-landing-system : lando
2019-05-15 15:10:34 +00:00
Bogdan Tara
c818e16da7 Backed out 3 changesets (bug 1551611) for tidy bustage CLOSED TREE
Backed out changeset f60b2e760d1a (bug 1551611)
Backed out changeset 85ac4e68a63e (bug 1551611)
Backed out changeset df4a76b3e6ce (bug 1551611)
2019-05-15 18:00:25 +03:00
Kartikaya Gupta
88574ada2a Bug 1551611 - Skip subpixel AA tests on macOS 10.14. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D31183

--HG--
extra : moz-landing-system : lando
2019-05-15 14:06:52 +00:00
Kartikaya Gupta
a30b01108f Bug 1551611 - Add macOS version information to the ReftestEnvironment. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D31182

--HG--
extra : moz-landing-system : lando
2019-05-15 14:39:39 +00:00
Kartikaya Gupta
b8b7813c1c Bug 1551611 - Introduce a ReftestEnvironment. r=Gankro
This moves the existing constants into a ReftestEnvironment which
encapsulates it a bit better. Also this fixes the incorrect "debug" cfg
check to "debug_assertions" which is more correct.

Differential Revision: https://phabricator.services.mozilla.com/D31181

--HG--
extra : moz-landing-system : lando
2019-05-15 14:06:33 +00:00
Bogdan Tara
9f71a4be73 Backed out 3 changesets (bug 1551187) for webrender bustages CLOSED TREE
Backed out changeset 333943819087 (bug 1551187)
Backed out changeset dc83934fa032 (bug 1551187)
Backed out changeset aa02e32fd5bf (bug 1551187)
2019-05-15 16:54:37 +03:00
Nicolas Silva
3d005bdb41 Bug 1551187 - Box the color matrix in Filter. r=kvark
ColorMatrix is rarely used but takes most space in the Filter enum.
This removes 44 bytes from the enum and all structs that embed it.

Differential Revision: https://phabricator.services.mozilla.com/D30910

--HG--
extra : moz-landing-system : lando
2019-05-15 13:15:55 +00:00
Nicolas Silva
0068db5320 Bug 1551187 - Rename render task tree into render task graph. r=kvark
sed -i 's/RenderTaskTree/RenderTaskGraph/g' gfx/wr/webrender/**/*.rs
sed -i 's/task tree/task graph/g' gfx/wr/webrender/**/*.rs

Differential Revision: https://phabricator.services.mozilla.com/D30897

--HG--
extra : moz-landing-system : lando
2019-05-15 13:16:17 +00:00
Nicolas Silva
caf7e58ba1 Bug 1551187 - Remove the single-shadow picture composite code. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D30896

--HG--
extra : moz-landing-system : lando
2019-05-15 13:16:19 +00:00
Glenn Watson
5108fcd99f Bug 1551131 - Refactor WR batching code in preparation for different batches per dirty region / render task. r=nical
* Store render task address per-instance rather than per-primitive, to allow adding a single primitive to multiple batches / render tasks.
* Store render task id inside alpha batch builder, since multiple batch builders will be passed in future.
* Add primitive visibility mask, storing a bit mask of which dirty regions a visible primitive intersects.
* Store RenderTaskAddress as a u16 in CPU and shader types.
* Add picture caching debug flag to wrench.

Differential Revision: https://phabricator.services.mozilla.com/D30854

--HG--
extra : moz-landing-system : lando
2019-05-14 07:17:24 +00:00
Cosmin Sabou
530b9c7e9c Backed out 2 changesets (bug 1550903) for webrender bustages. a=backout
Backed out changeset fe8d48740511 (bug 1550903)
Backed out changeset cc187a665ccf (bug 1550903)

--HG--
rename : third_party/rust/rand-0.4.3/appveyor.yml => third_party/rust/rand/appveyor.yml
rename : third_party/rust/rand-0.4.3/benches/bench.rs => third_party/rust/rand/benches/bench.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/exponential.rs => third_party/rust/rand/benches/distributions/exponential.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/gamma.rs => third_party/rust/rand/benches/distributions/gamma.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/mod.rs => third_party/rust/rand/benches/distributions/mod.rs
rename : third_party/rust/rand-0.4.3/benches/distributions/normal.rs => third_party/rust/rand/benches/distributions/normal.rs
rename : third_party/rust/rand-0.4.3/src/distributions/range.rs => third_party/rust/rand/src/distributions/range.rs
rename : third_party/rust/rand_jitter/src/lib.rs => third_party/rust/rand/src/jitter.rs
rename : third_party/rust/rand-0.4.3/src/os.rs => third_party/rust/rand/src/os.rs
rename : third_party/rust/rand-0.4.3/src/prng/chacha.rs => third_party/rust/rand/src/prng/chacha.rs
rename : third_party/rust/rand-0.4.3/src/prng/isaac.rs => third_party/rust/rand/src/prng/isaac.rs
rename : third_party/rust/rand-0.4.3/src/prng/isaac64.rs => third_party/rust/rand/src/prng/isaac64.rs
rename : third_party/rust/rand-0.4.3/src/prng/xorshift.rs => third_party/rust/rand/src/prng/xorshift.rs
rename : third_party/rust/rand-0.4.3/src/rand_impls.rs => third_party/rust/rand/src/rand_impls.rs
rename : third_party/rust/rand-0.4.3/src/read.rs => third_party/rust/rand/src/read.rs
rename : third_party/rust/rand-0.4.3/src/reseeding.rs => third_party/rust/rand/src/reseeding.rs
rename : third_party/rust/rand-0.4.3/src/seq.rs => third_party/rust/rand/src/seq.rs
rename : third_party/rust/rand-0.4.3/utils/ziggurat_tables.py => third_party/rust/rand/utils/ziggurat_tables.py
rename : third_party/rust/fuchsia-cprng/LICENSE => third_party/rust/sha1/LICENSE
2019-05-14 08:16:26 +03:00
Bastien Orivel
4816d6ec16 Bug 1550903 - Part 1: Update ws to 0.8. r=emilio
This is part of the effort to get all the other versions of rand out.
Unfortunately the diff is kinda bug because this is the first crate
requiring rand 0.6 which has been split into multiple crates.

Differential Revision: https://phabricator.services.mozilla.com/D30744

--HG--
extra : moz-landing-system : lando
2019-05-12 12:38:56 +00:00
Nicolas Silva
ea0c5eda0a Bug 1536021 - Sanitize filters in place. r=kvark
--HG--
extra : source : d68b728d584c38053387c4df0096a9744389469f
extra : intermediate-source : 4e52aa850e3607ffe872a8da66874eaddefea046
2019-05-10 01:23:54 +02:00
Nicolas Silva
c7a54e68a1 Bug 1536021 - Shadow stack implementation. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D30620

--HG--
extra : source : e830b256419b53556e27aa2586f2ed8f715aa99e
extra : intermediate-source : c223987f3de744979a0b08b336b46ac9f199e9bd
2019-05-12 12:27:44 +02:00
Daniel Varga
84647fc525 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-05-11 00:53:46 +03:00
Andrew Osmond
11a7bb40e7 Bug 1550725 - Cull primitives with an empty clip. r=kvark
When the clip chain generates the local clip rect for a primitive, it
can be empty. This violated the assumption that the visible rect will
never be empty, and so when we snap, it produces NaNs, which in turn,
violates other assumptions when converting between spaces, and hence the
crash.

Now we cull the primitive from the visible list if the local clip rect
is empty, or if the visible rect is empty.

Differential Revision: https://phabricator.services.mozilla.com/D30659
2019-05-10 16:31:13 -04:00
Dzmitry Malyshau
7f9b0ee390 Bug 1532174 - Repace WR RelativeTransform with CoordinateSpaceMapping, improve flattening semantics. r=gw
This change makes get_relative_transform() to no longer rely on any flattening done before in the pipeline.
This makes it correct is some of the cases we failed previously (see ini files removed).
It now does flattening on every flat coordinate system it passes through, and it's used for SpaceMapper.
The old RelativeTransform is now replaced with CoordinateSpaceMapping, which reduces the zoo of our types :)

Differential Revision: https://phabricator.services.mozilla.com/D30600

--HG--
extra : moz-landing-system : lando
2019-05-10 02:22:51 +00:00
Glenn Watson
4d09f84fb5 Bug 1524427 - Fix panic when clip mask is supplied with non-existent image key. r=kvark
In some cases, Gecko supplies a display item with an image clip
mask where the image itself does not exist in the resource cache.

In these cases, WR would skip requesting the image, but would
still try to fetch the image info during batching, causing a panic.

This patch skips adding clip items to the batching pass if the
image mask does not exist.

It also adds support to wrench for a crash test when the image
mask is invalid.

Differential Revision: https://phabricator.services.mozilla.com/D30560

--HG--
extra : moz-landing-system : lando
2019-05-09 21:23:58 +00:00
Glenn Watson
cbb89e0d8a Bug 1549921 - Refactor batch building code in preparation for multiple alpha batchers per picture. r=kvark
This patch is scaffolding only - there shouldn't be any functional
changes as a result of these changes.

Differential Revision: https://phabricator.services.mozilla.com/D30330

--HG--
extra : moz-landing-system : lando
2019-05-08 20:32:39 +00:00
Csoregi Natalia
0b4a204c24 Merge mozilla-central to autoland. CLOSED TREE 2019-05-08 06:39:09 +03:00
Csoregi Natalia
197210b8c1 Merge inbound to mozilla-central. a=merge 2019-05-08 06:37:15 +03:00
Dzmitry Malyshau
0ab96c1983 Bug 1532174 - Refactor WR fast transform, use when returning relative transforms r=gw
Based on https://phabricator.services.mozilla.com/D30229

Instead of converting from the scale-offset to the transform right away in
`get_relative_transform`, we only do it if there is a jump between coordinate spaces.

Differential Revision: https://phabricator.services.mozilla.com/D30228

--HG--
extra : moz-landing-system : lando
2019-05-08 02:32:15 +00:00
Nicolas Silva
987eae6cae Bug 1543974 - Add render task scheduling tests. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D30021

--HG--
extra : source : 41300ab303ce3fe31a5065cd899949aa4fc97f95
2019-05-07 17:25:27 +02:00
Glenn Watson
effaccc4f6 Bug 1549271 - Create render task graph earlier during frame building. r=nical
This moves creation of the render task graph to be slightly
earlier during frame building. Instead of creeating the render
tasks during prepare_prims, they are created during the
take_context call for pictures, before recursing into primitives.

This means that in future we can have a surface that targets
multiple render tasks (e.g. for multiple dirty regions), which
may create a different batch set for each region.

Differential Revision: https://phabricator.services.mozilla.com/D29994

--HG--
extra : moz-landing-system : lando
2019-05-07 20:49:56 +00:00
Lee Salzman
0037d62d7b Bug 1414961 - enable WR dual-source blending by default. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D30107

--HG--
extra : moz-landing-system : lando
2019-05-07 02:30:16 +00:00
Alexis Beingessner
63afa58e9a Bug 1525402 - Mark all gfx/wr crates as Rust 2018. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D29569

--HG--
extra : moz-landing-system : lando
2019-05-07 01:39:22 +00:00
Alexis Beingessner
9847a632f7 Bug 1525402 - Run cargo fix --edition on webrender on macos. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D29567

--HG--
extra : moz-landing-system : lando
2019-05-07 01:40:23 +00:00
Alexis Beingessner
89682a3ff0 Bug 1525402 - Manual fixups for configs cargo fix missed. r=kvark
cargo fix works by building under a specific config, so we can't hit both
sides of a mutually exclusive pair of cfgs, such as cfg(target_os) or
when cfg(feature) and cfg(not(feature)) both exist in the codebase.

Differential Revision: https://phabricator.services.mozilla.com/D29568

--HG--
extra : moz-landing-system : lando
2019-05-07 01:40:21 +00:00
Alexis Beingessner
3c003ecb1c Bug 1525402 - Migrate webrender externs to a Rust 2018 compatible form. r=kvark
Notably `extern crate foo as bar` is no longer supported
(must do it in Cargo.toml). Also stopped using euclid through webrender_api,
because it produces worse results in 2018.

Differential Revision: https://phabricator.services.mozilla.com/D29566

--HG--
extra : moz-landing-system : lando
2019-05-07 01:40:19 +00:00
Oana Pop Rus
65399363fb Merge inbound to mozilla-central. a=merge 2019-05-07 00:45:24 +03:00
Doug Thayer
8efbd9be96 Bug 1541078 - Add pre/post frames hooks into save_capture r=kvark
There's two ways we could get around this. We could add a path
around the prepared_for_frames assertion in GpuCache::end_frame,
or we can do this, and leave the TODO explicit with the
assertion. I took the latter approach because we can clear
the GpuCache / TextureCache through other routes than frame
building anyway, so we could hit this failure path before
any of the patches in this bug landed.

Differential Revision: https://phabricator.services.mozilla.com/D29884

--HG--
extra : moz-landing-system : lando
2019-05-06 17:21:22 +00:00
Doug Thayer
2f3c20a88f Bug 1541078 - Rename before/after_frames r=kvark
These aren't great names - I couldn't come up with better though.
We lose the symmetry of before/after but this clarifies a little
bit what they are doing.

Differential Revision: https://phabricator.services.mozilla.com/D29877

--HG--
extra : moz-landing-system : lando
2019-05-06 17:21:10 +00:00
Doug Thayer
c3b4dee3c1 Bug 1541078 - Require frame builds for all docs after GpuCache clear r=kvark
If we run a GpuCache clear and do not update all documents, we run into
situations where the stale documents try to access things in the gpu
cache and just show random garbage. The solution is similar to what we
do for TextureCache, so I am just duplicating those signatures and providing
helpers in RenderBackend to access both together.

Differential Revision: https://phabricator.services.mozilla.com/D29860

--HG--
extra : moz-landing-system : lando
2019-05-06 17:21:01 +00:00
Nicolas Silva
284bf80f3f Bug 1543974 - Deal with conflicting render task rect scheduling and allocation. r=kvark
Due to the render task ping-pong target allocation scheme, we need to ensure:
 - that tasks only read from tasks that are an odd number of passes apart,
 - that render task content is kept valid long enough for all of the dependent tasks.

The former is solved in this patch through blit tasks, the latter by marking tasks for saving as needed.

Differential Revision: https://phabricator.services.mozilla.com/D29800

--HG--
extra : moz-landing-system : lando
2019-05-04 13:31:13 +00:00
Doug Thayer
9dddfa57d6 Bug 1538540 - Respect texture_cache rebuild reqs even if doc has no pixels r=kvark
If a document has an empty rect for whatever reason (in the case observed, this was
due to running a full screen video in the content document, which occludes the
chrome document), then we still want to ensure that we build a frame if the
texture cache has performed a clear, as otherwise we may try to access stale
items from the texture resolver in render_impl.

Differential Revision: https://phabricator.services.mozilla.com/D29848

--HG--
extra : moz-landing-system : lando
2019-05-03 20:30:46 +00:00
Glenn Watson
44849e69c1 Bug 1548712 - Restructure and tidy up some code in prepare primitive pass. r=kvark,nical
Differential Revision: https://phabricator.services.mozilla.com/D29777

--HG--
extra : moz-landing-system : lando
2019-05-03 20:26:32 +00:00
Kartikaya Gupta
a059915b0b Bug 1548635 - Add mechanism to skip wrench reftests on specific platforms. r=gw
This allows us to blacklist certain configurations. Previously we could only
use platform(...) which was more of a whitelist.

Differential Revision: https://phabricator.services.mozilla.com/D29729

--HG--
extra : moz-landing-system : lando
2019-05-02 20:49:08 +00:00
Kartikaya Gupta
38a1e79594 Bug 1548635 - Some tweaks for wrench on Android. r=gw
This makes some minor tweaks:
- Use a /sdcard/wrench/ folder for the args and reftests. For me bundling
  the reftests as assets didn't work (app would panic trying to load those
  files). Plus it seems better to not always bundle the reftests with the app.
- Always dump a full backtrace on Android
- Build both x86 and armv7 architectures of wrench into the same APK for
  better compatibility.
- Update documentation.

Differential Revision: https://phabricator.services.mozilla.com/D29728

--HG--
extra : moz-landing-system : lando
2019-05-02 20:49:07 +00:00
Kartikaya Gupta
0064188850 Bug 1548261 - Run wrench reftests in debug also. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D29663

--HG--
extra : moz-landing-system : lando
2019-05-02 14:18:21 +00:00
Kartikaya Gupta
82055a726b Bug 1547833 - Check for the KHR_debug extension before trying to use it. r=gw,kvark
Differential Revision: https://phabricator.services.mozilla.com/D29824

--HG--
extra : moz-landing-system : lando
2019-05-06 12:16:15 +00:00
Mihai Alexandru Michis
359ca2cfd0 Backed out changeset 8f066e5c42c8 (bug 1543974) for causing bustages on webrender builds CLOSED TREE 2019-05-07 11:38:28 +03:00
Nicolas Silva
6b44beb855 Bug 1543974 - Add render task scheduling tests. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D30021

--HG--
extra : moz-landing-system : lando
2019-05-07 03:03:16 +00:00
Andrew Osmond
5b1c558e2a Bug 1540200 - Part 3. Reuse snapping offsets calculated on the CPU in the WebRender shaders. r=kvark
Historically we calculated the snapping offsets in the GPU shaders.
Because this information is always needed on the CPU side, we now just
pass the values into the shader instead of recalculating again. This
ensures we will use the same set of values consistently and makes it
easier to adjust how we snap in the future.

This patch should have no functional change on the output of WebRender
itself.

Differential Revision: https://phabricator.services.mozilla.com/D28883
2019-05-06 08:36:50 -04:00
Andrew Osmond
28d348f0dc Bug 1540200 - Part 2. Calculate snapped primitive rect and offsets for WebRender on the CPU. r=kvark
We currently do most snapping on the GPU in the shader. However the
picture's local rect needs to take into account the snapping done there,
so we need to calculate this earlier in the pipeline. Instead of using
the clipped primitive local rects to create the picture's own local
rect, we now snap the child local rects first. If no snapping is
required, there should be no functional change. If snapping is required,
there should be fewer visual distortions caused by an inaccurate picture
local rect.

Differential Revision: https://phabricator.services.mozilla.com/D28882
2019-05-06 08:36:50 -04:00
Andrew Osmond
1a022002f5 Bug 1540200 - Part 1. Move picture local rect calculation to update visibility. r=kvark
We currently calculate a picture's local rect when we are doing the
first picture traversal. It was composed of the union of the clipped
local rects of its children. However the true local rect of a picture is
the union of the snapped clipped local rects of its children. The
snapping is done in device space, but we won't know the exact transform
until we establish the raster roots, which is based on the picture's
local rect.

As such, we create an estimated local rect which is how we currently
calculate the local rect. Then once the raster roots have been selected,
we recalculate the local rect of the picture based on its children
during update visibility.

This patch should have not contain any functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D28881
2019-05-06 08:36:50 -04:00
Glenn Watson
51efa36789 Bug 1548405 - Do all resource requests during visibility pass in WR. r=kvark
This builds on earlier patches to move all remaining resource requests
to occur during the visibility pass, and change the block on glyph
rasterization to occur after the visibility pass.

This allows batch generation to occur during the prepare_prims pass,
which is useful for generating a batch set per-dirty-region, while
only doing a single pass of the picture / primitive tree.

Differential Revision: https://phabricator.services.mozilla.com/D29584

--HG--
extra : moz-landing-system : lando
2019-05-02 01:54:32 +00:00
Dzmitry Malyshau
9512939607 Bug 1548131 - WR reset texture allocation r=gw
Introduce a new texture allocation operation "reset", which acts like a "realloc" but without the contents preserved.
Use it for the picture texture cache.

Differential Revision: https://phabricator.services.mozilla.com/D29539

--HG--
extra : moz-landing-system : lando
2019-05-01 22:43:16 +00:00
Doug Thayer
512461990a Bug 1538540 - Sanity check frames after TextureCache clears r=bholley
In trying to diagnose bug 1538540, I'm hitting my limits as far as
simply staring at the code and trying to work out possible ways to
hit the crash goes. This assertion will split the search space into
clear-related causes and non-clear-related causes to narrow things
down.

Differential Revision: https://phabricator.services.mozilla.com/D29420

--HG--
extra : moz-landing-system : lando
2019-05-02 01:37:02 +00:00
Dzmitry Malyshau
0302456bb8 Bug 1525420 - Use KHR_blend_equation_advanced for mix-blend mode implementation r=gw
Use natively supported mix-blend modes, where appropriate. Disabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D26350

--HG--
extra : moz-landing-system : lando
2019-05-01 20:45:22 +00:00
Glenn Watson
546a095298 Bug 1548202 - Request glyphs earlier during frame building. r=kvark
This patch changes glyph requests in the resource cache to occur
as soon as a text run is found to be visible, rather than during
the prepare_prims pass.

This has two major benefits:
 - (with other patches) will allow some batching code to run
   during the prepare_prims pass.
 - allows glyph raster worker threads to start earlier in the
   frame, which may lead to less time blocking on the workers.

Differential Revision: https://phabricator.services.mozilla.com/D29458

--HG--
extra : moz-landing-system : lando
2019-05-01 20:35:18 +00:00
Glenn Watson
21c39a0ede Bug 1548171 - Allocate texture cache location for render task cache immediately. r=kvark
This is a first step towards allowing (some) batching work to be
done during prepare_prims pass rather than render pass building.

This is prep work related to output different batch lists for a given
picture (e.g. a different batch list per dirty region), rather than
replaying the same batch list.

Differential Revision: https://phabricator.services.mozilla.com/D29445

--HG--
extra : moz-landing-system : lando
2019-05-01 20:31:47 +00:00
Andreea Pavel
4fea4aeb28 Merge mozilla-central to autoland. on a CLOSED TREE 2019-05-01 19:05:19 +03:00
Nicolas Silva
798d69cc03 Bug 1533735 - Refactor render task pass assignment in preparation for the render graph work. r=gw,kvark
In addition, batch together render tasks for the cached render tasks.

Differential Revision: https://phabricator.services.mozilla.com/D23839

--HG--
extra : source : 1b80e184b0bd6324ea62d1e38b2061da2b96a867
2019-04-29 17:53:00 +02:00
Kartikaya Gupta
d10394a6c3 Bug 1548092 - Fix improper alpha value in yaml reftest. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D29402

--HG--
extra : moz-landing-system : lando
2019-04-30 21:00:57 +00:00
Kartikaya Gupta
e8dfcba2e3 Bug 1548197 - Remove unused mut instances to fix warnings with rust nightly. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D29492

--HG--
extra : moz-landing-system : lando
2019-05-01 13:54:09 +00:00