Commit Graph

906 Commits

Author SHA1 Message Date
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
Ciure Andrei
b54e31abf8 Backed out changeset 91859883a54d (bug 1538540) for causing tests crashes with [@ GeckoCrash] CLOSED TREE 2019-05-01 12:46:56 +03:00
Doug Thayer
92c9cb3613 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-04-30 23:58:23 +00:00
Kartikaya Gupta
140fb1c366 Bug 1547097 - Remove ReadPixelsFormat. r=kvark
The Rgba8 enum value is redundant with the Standard(ImageFormat::RGBA8) value,
this patch collapses the former into the latter. Which then makes the entire
ReadPixelsFormat redundant, so we can get rid of it completely.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 17:43:41 +00:00
Kartikaya Gupta
1ee860c169 Bug 1547979 - Bump appveyor rust version to 1.34. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D29351

--HG--
extra : moz-landing-system : lando
2019-04-30 13:51:08 +00:00
Nicolas Silva
c55d3f681a Bug 1547290 - Mark CaptureConfig::file_path allow(dead_code) on a CLOSED TREE. r=me
--HG--
extra : histedit_source : 9188555b2ccaeb30a135ed4aecfb28b01cfd478f
2019-04-30 09:39:15 +02:00
Nicolas Silva
9008946909 Bug 1547290 - Dump the render graph in SVG format in frame captures. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D29005

--HG--
extra : source : b4afebeb22461c276463a919880efdbe0126695d
2019-04-29 16:11:12 +02:00
Glenn Watson
3ba7bef4b0 Bug 1547632 - Remove unused local clip rect stored on WR picture primitives. r=emilio,kvark
Differential Revision: https://phabricator.services.mozilla.com/D29148

--HG--
extra : moz-landing-system : lando
2019-04-29 16:16:11 +00:00
Dzmitry Malyshau
3aa374797c Bug 1525641 - Revise WR backface visibility semantics, separate picture and primitive logic r=gw
This changes our backface visibility semantics to a slightly more complex rule,
as described by Matt (and reinterpret by me in the context of WR) in bug 1525641 during our work week.
We are now propagating is_backface_visible to pictures and evaluate it in the context of
the local transform for a picture if it's outside of preserve-3d context.
We also refactor get_relative_transform() a bit.

Note: this fixes all of the existing backface-visibility bugs: 1525641, 1546110, 1546818
It also passes the Wrench tests, but the try push is still pending for surprises.

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

--HG--
rename : gfx/wr/wrench/reftests/backface/backface-leaf.yaml => gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml
extra : moz-landing-system : lando
2019-04-29 16:45:38 +00:00
Nicolas Silva
8471eabd7f Bug 1546126 - Fix the max blob tile limit logic. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D28991

--HG--
extra : moz-landing-system : lando
2019-04-26 15:38:54 +00:00
Kartikaya Gupta
5023b06a14 Bug 1542826 - Rebuild the debugger front-end. r=gw
This patch is the output of rebuilding the debugger frontend with a
recent npm installation. The changes to dist/ and the addition of
package-lock.json are a result of the build. The changes to package.json
and main.js were done manually to work around an incompatible change
in beufy 0.6.7 (the lib/ folder changed to dist/).

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

--HG--
extra : moz-landing-system : lando
2019-04-25 19:31:09 +00:00
Kartikaya Gupta
336a506446 Bug 1542826 - Add more debug flags to disable various things. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D28356

--HG--
extra : moz-landing-system : lando
2019-04-25 19:29:15 +00:00
Kartikaya Gupta
288d1e8e3e Bug 1542826 - Allow enabling/disabling the debug server at runtime. r=gw
This adds a RendererOption flag to control whether the debug server is
enabled. This allows the debug server feature to be built without
enabling the feature by default; it can then be enabled on a
per-renderer basis via the RendererOption.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 19:28:32 +00:00
Kartikaya Gupta
9fc3672251 Bug 1542826 - Reduce featureset enabled on image crate. r=gw
The debugger in WebRender uses the image crate to generate PNGs, and so
it only really needs the png codec feature from the image crate.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 19:28:23 +00:00
Dzmitry Malyshau
681ee8a0d0 Bug 1546371 - Switch render backend and API away from FramebufferPixel r=gw
The gist of the problem I introduced with the framebuffer coordinate system is that we provided the window rect (effectively) twice:
  1. when computing the document rectangle (and Y-inverting it)
  2. when rendering

If between these points the window got resized (during scene building), we end up with our document aligned to bottom left corner.
The user expects content to still be aligned to the top left, so that's what is visible as a bug.

The change here switched scene building to only care about device coordinate space, restraining the framebuffer coordinates to be mostly
an implementation detail of the renderer/device (the way it was originally meant to be, when introduced). This way the current window size
is only considered once during rendering.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 13:02:47 +00:00
Lee Salzman
e7d7a7b122 Bug 1414961 - check for EXT_blend_func_extended when using GL ES. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D28569

--HG--
extra : moz-landing-system : lando
2019-04-24 05:15:04 +00:00
Razvan Maries
5f610a07b3 Backed out 8 changesets (bug 1542826) for build bustages. CLOSED TREE
Backed out changeset f3516e1416f0 (bug 1542826)
Backed out changeset 1dba743761b7 (bug 1542826)
Backed out changeset a02e469be7b3 (bug 1542826)
Backed out changeset 5118d628ec89 (bug 1542826)
Backed out changeset 5744891efeef (bug 1542826)
Backed out changeset e5af8cd01080 (bug 1542826)
Backed out changeset 314f9bc7dafe (bug 1542826)
Backed out changeset 7df230ea5122 (bug 1542826)
2019-04-23 23:14:06 +03:00
Kartikaya Gupta
0dd25a94d2 Bug 1542826 - Rebuild the debugger front-end. r=gw
This patch is the output of rebuilding the debugger frontend with a
recent npm installation. The changes to dist/ and the addition of
package-lock.json are a result of the build. The changes to package.json
and main.js were done manually to work around an incompatible change
in beufy 0.6.7 (the lib/ folder changed to dist/).

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

--HG--
extra : moz-landing-system : lando
2019-04-23 19:57:09 +00:00
Kartikaya Gupta
d3c9a80c63 Bug 1542826 - Add more debug flags to disable various things. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D28356

--HG--
extra : moz-landing-system : lando
2019-04-23 19:56:23 +00:00
Kartikaya Gupta
6227460f41 Bug 1542826 - Allow enabling/disabling the debug server at runtime. r=gw
This adds a RendererOption flag to control whether the debug server is
enabled. This allows the debug server feature to be built without
enabling the feature by default; it can then be enabled on a
per-renderer basis via the RendererOption.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 19:55:11 +00:00
Kartikaya Gupta
343a8913bf Bug 1542826 - Reduce featureset enabled on image crate. r=gw
The debugger in WebRender uses the image crate to generate PNGs, and so
it only really needs the png codec feature from the image crate.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 19:55:06 +00:00
Alexis Beingessner
8289701d8c Bug 1536121 - rearchitect the webrender display-list. r=gw
disclaimer: this isn't an *amazing* cleanup, but more of a major step that
unlocks the ability to do more minor cleanups and refinements. There's some
messy things and inconsistencies here and there, but we can hopefully iron
them out over time.

1. The primary change here is to move from
    struct { common_fields, enum(specific_fields) }
to
    enum (maybe_common_fields, specific_fields)

most notably this drops the common fields from a ton of things
that don't need them PopXXX, SetXXX, ClipChain, etc.

2. Additionally some types have had some redundant states shaved off,
for instance, rect no longer has *both* bounds and a clip_rect, as
the intersection of the two can be used. This was done a bit conservatively
as some adjustments will need to be done to the backend to fully eliminate
some states, and this can be done more incrementally.

2.5. As a minor side-effect of 2, we now early-reject some primitives whose
bounds and clip_rect are disjoint.

3. A HitTest display item has been added, which is just a Rect without
color. In addition to the minor space wins from this, this makes it much
easier to debug display lists

4. Adds a bunch of comments to the display list, making it easier to understand
things.

The end result of all these changes is a significantly smaller and easier to
understand display list. Especially on pages like gmail which have so many
clip chains. However this ultimately just makes text an even greater percentage
of pages (often 70-80%).

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

--HG--
extra : moz-landing-system : lando
2019-04-23 17:29:58 +00:00
Alexis Beingessner
bd5e102438 Bug 1536121 - cleanup display list code a little bit to prep for refactor. r=gw
* make all enums repr(u8) (compiler bug blocking this long fixed)
* add display list stats feature
* remove cache markers (abandoned design)
* don't always push empty SetFilters before PushStackingContext
* remove dead pub methods

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

--HG--
extra : moz-landing-system : lando
2019-04-23 17:29:38 +00:00
Glenn Watson
aad259b402 Bug 1546286 - Fix external scroll offset handling for perspective elements. r=emilio
External scroll offsets are not propagated across reference frames.

When a perspective element scrolls relative to an ancestor scroll
frame, remove the effect of any external scroll offset during that
offset calculation.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 09:25:39 +00:00
Dorel Luca
0caaab0f1e Backed out 2 changesets (bug 1536121) for Reftest failures
Backed out changeset 0fc395a2ac71 (bug 1536121)
Backed out changeset 430032511561 (bug 1536121)

--HG--
extra : rebase_source : 95c710b24ec5b76da20ddb5573036c8c73873e9e
2019-04-23 10:05:14 +03:00
Alexis Beingessner
ee4e394f45 Bug 1536121 - rearchitect the webrender display-list. r=gw
disclaimer: this isn't an *amazing* cleanup, but more of a major step that
unlocks the ability to do more minor cleanups and refinements. There's some
messy things and inconsistencies here and there, but we can hopefully iron
them out over time.

1. The primary change here is to move from
    struct { common_fields, enum(specific_fields) }
to
    enum (maybe_common_fields, specific_fields)

most notably this drops the common fields from a ton of things
that don't need them PopXXX, SetXXX, ClipChain, etc.

2. Additionally some types have had some redundant states shaved off,
for instance, rect no longer has *both* bounds and a clip_rect, as
the intersection of the two can be used. This was done a bit conservatively
as some adjustments will need to be done to the backend to fully eliminate
some states, and this can be done more incrementally.

2.5. As a minor side-effect of 2, we now early-reject some primitives whose
bounds and clip_rect are disjoint.

3. A HitTest display item has been added, which is just a Rect without
color. In addition to the minor space wins from this, this makes it much
easier to debug display lists

4. Adds a bunch of comments to the display list, making it easier to understand
things.

The end result of all these changes is a significantly smaller and easier to
understand display list. Especially on pages like gmail which have so many
clip chains. However this ultimately just makes text an even greater percentage
of pages (often 70-80%).

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

--HG--
extra : moz-landing-system : lando
2019-04-23 02:32:50 +00:00
Alexis Beingessner
e16f06e3b9 Bug 1536121 - cleanup display list code a little bit to prep for refactor. r=gw
* make all enums repr(u8) (compiler bug blocking this long fixed)
* add display list stats feature
* remove cache markers (abandoned design)
* don't always push empty SetFilters before PushStackingContext
* remove dead pub methods

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

--HG--
extra : moz-landing-system : lando
2019-04-23 02:32:48 +00:00
Glenn Watson
160bd46b0d Bug 1543356 - Visual glitches on resizing the browser with WebRender. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D27978

--HG--
extra : moz-landing-system : lando
2019-04-18 15:28:39 +00:00
Glenn Watson
d8c42a8290 Bug 1545006 - Use external scroll offsets to move primitives and clips into local space. r=kats
Use the external scroll offsets provided by Gecko to:
 (a) Offset primitives and clips by accumulated scroll offset.
 (b) Adjust the scroll transforms and hit test results.

This allows primitives and clips to be stored in a true local space,
that is consistent between display lists, even if scrolling has
occurred. This is a step towards planned picture caching improvements.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 21:06:19 +00:00
Nicolas Silva
ddb01e5eb8 Bug 1519106 - Converge towards the max number of tiles faster. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27728

--HG--
extra : moz-landing-system : lando
2019-04-17 14:41:47 +00:00
Nicolas Silva
d64ddb564e Bug 1519106 - Increase the maximum number of rasterized blob images per transaction. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D16190

--HG--
extra : moz-landing-system : lando
2019-04-17 14:43:37 +00:00
Doug Thayer
a632894d10 Bug 1539629 - Fix WR capture for multi-document use r=kvark
We fail the assertion at the beginning of GpuCache::begin_frame
right now because we run the extract_updates call after building
frames for every document. This just moves the extract_updates
work to be per-document.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 18:33:17 +00:00
Nicolas Silva
bd2c8b86cd Bug 1544374 - Make FilterOp not copy. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D27480

--HG--
extra : moz-landing-system : lando
2019-04-16 07:43:04 +00:00
Barret Rennie
96b41444c7 Bug 1444434 - Bind pixel pack buffer before trying to map it for readback r=gw
Differential Revision: https://phabricator.services.mozilla.com/D26946

--HG--
extra : moz-landing-system : lando
2019-04-15 23:39:10 +00:00
Doug Thayer
fa696a2768 Bug 1538710 - Regen wrench reftest images r=kats
These are trivially different. I couldn't find a cause for the
difference, so I am just regenerating them.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 22:35:05 +00:00
Doug Thayer
56b32c7614 Bug 1538710 - Remove disable-shrink pref r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D25134

--HG--
extra : moz-landing-system : lando
2019-04-15 22:34:51 +00:00
Doug Thayer
452bc370df Bug 1538710 - Move texture_cache cleanup to beginning of all frames r=bholley
... and ensure that, if we do cleanup, we generate frames for every document.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 22:34:43 +00:00
Doug Thayer
066df32bb7 Bug 1538710 - Add WR API endpoint for sending multiple transactions r=nical
We discussed this a bit in Orlando. Essentially, we want to run cleanup
operations in texture_cache before all documents' frames, and then be
able to ensure that every document generates a frame, because otherwise
we will run into problems with evicted cache items used by non-updating-
but-still-rendering documents. Accordingly, we need an endpoint to
lump all of the transactions that generate frames together. This adds
that and builds out all of the plumbing necessary.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 22:34:13 +00:00
Daniel Varga
bf8c3286c2 Backed out 4 changesets (bug 1538710) for webrender-lint
Backed out changeset 6f3f506c7740 (bug 1538710)
Backed out changeset 1a529f967061 (bug 1538710)
Backed out changeset afa5cc2c6032 (bug 1538710)
Backed out changeset ab2083ff97f4 (bug 1538710)
2019-04-15 23:18:19 +03:00
Doug Thayer
ae6cce41e3 Bug 1538710 - Regen wrench reftest images r=kats
These are trivially different. I couldn't find a cause for the
difference, so I am just regenerating them.

Depends on D25134

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

--HG--
extra : moz-landing-system : lando
2019-04-15 18:38:14 +00:00
Doug Thayer
1bcffd5a5f Bug 1538710 - Remove disable-shrink pref r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D25134

--HG--
extra : moz-landing-system : lando
2019-04-15 18:09:10 +00:00
Doug Thayer
20361c4f24 Bug 1538710 - Move texture_cache cleanup to beginning of all frames r=bholley
... and ensure that, if we do cleanup, we generate frames for every document.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 18:08:47 +00:00
Doug Thayer
3efeb79ae5 Bug 1538710 - Add WR API endpoint for sending multiple transactions r=nical
We discussed this a bit in Orlando. Essentially, we want to run cleanup
operations in texture_cache before all documents' frames, and then be
able to ensure that every document generates a frame, because otherwise
we will run into problems with evicted cache items used by non-updating-
but-still-rendering documents. Accordingly, we need an endpoint to
lump all of the transactions that generate frames together. This adds
that and builds out all of the plumbing necessary.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 18:56:04 +00:00
Glenn Watson
cb4bba0e06 Bug 1513019 - Fix plane splitting with complex, axis-aligned transforms. r=emilio,kats
Differential Revision: https://phabricator.services.mozilla.com/D27462

--HG--
extra : moz-landing-system : lando
2019-04-15 14:00:23 +00:00
shindli
ed9c6ae936 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-04-12 19:19:43 +03:00
Nicolas Silva
c341b17328 Bug 1535273 - Remove webrender::util::rect_from_points. r=kats 2019-04-12 16:08:39 +02:00
Glenn Watson
6348da8082 Bug 1543844 - Fix incorrect max scale detection in WR border rendering. r=emilio
The local rect for border segments is not solely determined by
the widths and/or radius. Instead of determining the max scale
based on those parameters, use the calculated border segment
rects to determine an appropriate max scale factor.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 09:58:24 +00:00
Jean-Yves Avenard
d91ea6eb87 Bug 1540581 - P9. Add R16G16 type and update of P010/P016 resource update. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D26464

--HG--
extra : moz-landing-system : lando
2019-04-11 12:37:23 +00:00
Jean-Yves Avenard
c6e2001c75 Bug 1493898 - P1. Add preliminary BT2020 colorspace support. r=mattwoodrow
Only active with webrender and AL.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:40:40 +00:00
Alexis Beingessner
57e741babc Bug 1525642 - ensure that w~=1 when assuming a transform is just a translation. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D27163

--HG--
extra : moz-landing-system : lando
2019-04-11 20:52:21 +00:00
Glenn Watson
2e71f94491 Bug 1542972 - Reduce use of world_content_transform in WR. r=emilio
The way that world content transform is calculated has some
inconsistencies related to transform flattening, compared to
the get_relative_transform implementation.

Reducing usage of this field will make it simpler to take
advantage of the external scroll offset, which is needed for
some of the planned picture caching improvements.

This patch removes the simple uses of world_content_transform,
but there are still a small number of more complicated uses that
need to be handled separately.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 10:40:35 +00:00
Glenn Watson
f7a2dbd20e Bug 1542696 - WR crashes on debug_assert! with out-of-process iframes r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D26611

--HG--
extra : moz-landing-system : lando
2019-04-08 21:39:19 +00:00
Dorel Luca
d0e6f0880f Backed out 3 changesets (bug 1538710) for Wrench bustage. CLOSED TREE
Backed out changeset 9a80bc4d626a (bug 1538710)
Backed out changeset f5f916011032 (bug 1538710)
Backed out changeset 585b51bba30d (bug 1538710)
2019-04-08 19:09:49 +03:00
Doug Thayer
e096909f4c Bug 1538710 - Remove disable-shrink pref r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D25134

--HG--
extra : moz-landing-system : lando
2019-04-08 15:25:47 +00:00
Doug Thayer
9225547960 Bug 1538710 - Move texture_cache cleanup to beginning of all frames r=bholley
... and ensure that, if we do cleanup, we generate frames for every document.

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

--HG--
extra : moz-landing-system : lando
2019-04-08 15:24:03 +00:00
Doug Thayer
33295b9e8b Bug 1538710 - Add WR API endpoint for sending multiple transactions r=nical
We discussed this a bit in Orlando. Essentially, we want to run cleanup
operations in texture_cache before all documents' frames, and then be
able to ensure that every document generates a frame, because otherwise
we will run into problems with evicted cache items used by non-updating-
but-still-rendering documents. Accordingly, we need an endpoint to
lump all of the transactions that generate frames together. This adds
that and builds out all of the plumbing necessary.

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

--HG--
extra : moz-landing-system : lando
2019-04-08 15:23:20 +00:00
Alexis Beingessner
432d3446dd Bug 1527751 - properly apply transformed clips in brush shader. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D26332

--HG--
extra : moz-landing-system : lando
2019-04-05 17:16:55 +00:00
Kartikaya Gupta
4752e32d5b Bug 1529117 - Bump serde and serde_derive to branch from 1.0.88. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D20460

--HG--
extra : moz-landing-system : lando
2019-04-04 15:41:57 +00:00
Dzmitry Malyshau
eef888097b Bug 1538711 - Fix tile cache clip chain in WR r=gw
Differential Revision: https://phabricator.services.mozilla.com/D25667

--HG--
extra : moz-landing-system : lando
2019-04-03 16:28:19 +00:00
Andrew Osmond
a26277d8ff Bug 1541059 - Add support for KHR_debug to WebRender for debug markers. r=kvark
Today we already support EXT_debug_marker for debug markers in
WebRender. This is useful to categorize GL API calls in tools such as
APITrace and RenderDoc. However not all drivers indicate support for
said extension, but instead support KHR_debug. This patch makes us
support both methods, preferring KHR_debug.

Differential Revision: https://phabricator.services.mozilla.com/D25787
2019-04-02 12:31:03 -04:00
Emilio Cobos Álvarez
a77e5e1ffc Bug 1520953 - Use GL_ANGLE_provoking_vertex extension if available. r=jgilbert
You tell me if this is right, I have no Windows build available to test :)

Depends on D25602

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

--HG--
extra : moz-landing-system : lando
2019-04-01 16:06:20 +00:00
Emilio Cobos Álvarez
63d22618c3 Bug 1520953 - Update gleam. r=kats,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D25602

--HG--
extra : moz-landing-system : lando
2019-04-01 17:54:08 +00:00
Nicolas Silva
5568e27ddb Bug 1535273 - Remove webrender::util::rect_is_empty. r=kats 2019-03-14 11:23:39 +01:00
Barret Rennie
6e284e1063 Bug 1444434 - Free the Gecko profiler screenshots structures in the WebRender renderer when profiling stops r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23964

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:49 +00:00
Barret Rennie
6131c4dbab Bug 1444434 - Add C bindings to the Renderer::get_screenshot_async and Renderer::map_and_recycle_screenshot APIs r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23962

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:32 +00:00
Barret Rennie
03468158ba Bug 1444434 - Add infrastructure for reading back screenshots for the Gecko profiler to WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23961

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:25 +00:00
Barret Rennie
98ab12e0e7 Bug 1444434 - Capture screenshots for the Gecko profiler in WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23960

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:15 +00:00
Barret Rennie
a3b16ea535 Bug 1444434 - Optionally create PBOs with a backing buffer and store that size with the PBO r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23959

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:08 +00:00
Dzmitry Malyshau
44c0bfd046 Bug 1528674 - WR improve picture texture cache allocaton r=gw
The change contains a number of incremental improvements with the main goal of:
  - allocating exactly as many tile as required by the app
  - respecting the picture caching option

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

--HG--
extra : moz-landing-system : lando
2019-03-28 03:02:45 +00:00
Glenn Watson
9b399ba2a8 Bug 1539048 - Support segment rendering for pictures in WR. r=kvark
On some low end GPUs, clip mask rendering can be a significant
GPU cost. One way to reduce this is to support segment rendering
on more primitive types, to reduce the size of clip masks.

This patch adds support for pictures that have clip masks
to take part in segment rendering. This can significantly
reduce the number of fragments that must be drawn into a clip
mask for off-screen picture surfaces.

In future, WR can take advantage of segment rendering to use
clip mask shaders that handle only a single corner at a time.
This will be a further significant performance win to clip mask
render time.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 21:25:31 +00:00
Cosmin Sabou
d3aa170d5a Backed out changeset bbb6a31ebf07 (bug 1528674) for webrender crashtests and reftests failures.
--HG--
extra : rebase_source : 083b18e419d18de6a13d7a22e482f995adee1b00
2019-03-27 02:15:39 +02:00
Coroiu Cristina
c1e4fdf4a6 Backed out 6 changesets (bug 1444434) for build bustages on a CLOSED TREE
Backed out changeset 13c0d857bf3c (bug 1444434)
Backed out changeset d2c85db549ea (bug 1444434)
Backed out changeset 543708a1f683 (bug 1444434)
Backed out changeset af008ed0a5c2 (bug 1444434)
Backed out changeset ec2a81eea388 (bug 1444434)
Backed out changeset 0bcf6edc8656 (bug 1444434)
2019-03-26 23:43:17 +02:00
Dzmitry Malyshau
5e158608bc Bug 1528674 - WR improve picture texture cache allocaton r=gw
The change contains a number of incremental improvements with the main goal of:
  - allocating exactly as many tile as required by the app
  - respecting the picture caching option

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

--HG--
extra : moz-landing-system : lando
2019-03-26 21:18:09 +00:00
Barret Rennie
b8fcd696e6 Bug 1444434 - Free the Gecko profiler screenshots structures in the WebRender renderer when profiling stops r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23964

--HG--
extra : moz-landing-system : lando
2019-03-21 19:30:34 +00:00
Barret Rennie
02072d330d Bug 1444434 - Add C bindings to the Renderer::get_screenshot_async and Renderer::map_and_recycle_screenshot APIs r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23962

--HG--
extra : moz-landing-system : lando
2019-03-21 19:09:22 +00:00
Barret Rennie
84219e9643 Bug 1444434 - Add infrastructure for reading back screenshots for the Gecko profiler to WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23961

--HG--
extra : moz-landing-system : lando
2019-03-21 19:16:12 +00:00
Barret Rennie
b8cb6e3e8a Bug 1444434 - Capture screenshots for the Gecko profiler in WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23960

--HG--
extra : moz-landing-system : lando
2019-03-21 20:13:58 +00:00
Barret Rennie
b73731e1e0 Bug 1444434 - Optionally create PBOs with a backing buffer and store that size with the PBO r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23959

--HG--
extra : moz-landing-system : lando
2019-03-21 17:07:24 +00:00
Glenn Watson
b625730d0b Bug 1538626 - Support fast path for clip-out rectangles in WR. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D24666

--HG--
extra : moz-landing-system : lando
2019-03-25 08:35:31 +00:00
Doug Thayer
c734d845d0 Bug 1441308 - Map document layers to z ranges r=gw
As discussed in IRC. AFAICT the ORTHO_NEAR|FAR_PLANE should match
up with the ranges of valid ZBufferIds, but please double-check
me.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:51 +00:00
Doug Thayer
09c427ac55 Bug 1441308 - Correct Renderer issues with multiple documents r=gw
This corrects A) An issue encountered with our strategy for skipping
the end_pass call for all but an offscreen render target. See the
comment above the end_pass call for details, and B) An issue with
depth clearing where we do not clear the whole rect if there are
multiple non-intersecting documents.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:46 +00:00
Doug Thayer
45b7708846 Bug 1441308 - Rename ForEach trait to AsyncForEach r=lsalzman
Just a little rename for clarity - I ended up scratching my head at
something for a little more time than I should have because I assumed
this was synchronous without looking at the implementation.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:38 +00:00
Doug Thayer
b172543596 Bug 1441308 - Core renderroot splitting changes r=kats,sotaro
This is a large patch that contains all of the core changes for
renderroot splitting.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:42 +00:00
Ciure Andrei
3de853018a Backed out 7 changesets (bug 1441308)for causing webrender build bustages CLOSED TREE
Backed out changeset 1764701d11d1 (bug 1441308)
Backed out changeset 32f7793dfd1a (bug 1441308)
Backed out changeset d8b4d6ec9b40 (bug 1441308)
Backed out changeset e2f83e4816dd (bug 1441308)
Backed out changeset baee8ada680f (bug 1441308)
Backed out changeset c09a51622e98 (bug 1441308)
Backed out changeset 737807563dd5 (bug 1441308)
2019-03-22 10:52:44 +02:00
Doug Thayer
472a9344d2 Bug 1441308 - Map document layers to z ranges r=gw
As discussed in IRC. AFAICT the ORTHO_NEAR|FAR_PLANE should match
up with the ranges of valid ZBufferIds, but please double-check
me.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 23:15:23 +00:00
Doug Thayer
fc4d50c197 Bug 1441308 - Correct Renderer issues with multiple documents r=gw
This corrects A) An issue encountered with our strategy for skipping
the end_pass call for all but an offscreen render target. See the
comment above the end_pass call for details, and B) An issue with
depth clearing where we do not clear the whole rect if there are
multiple non-intersecting documents.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 03:15:18 +00:00
Doug Thayer
32a7e500dd Bug 1441308 - Rename ForEach trait to AsyncForEach r=lsalzman
Just a little rename for clarity - I ended up scratching my head at
something for a little more time than I should have because I assumed
this was synchronous without looking at the implementation.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 03:15:16 +00:00
Doug Thayer
5b3a0454a4 Bug 1441308 - Core renderroot splitting changes r=kats,sotaro
This is a large patch that contains all of the core changes for
renderroot splitting.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 03:15:14 +00:00
Glenn Watson
557728d4ad Bug 1537668 - Refactor how clip task indices are passed to shaders. r=kvark
This patch shouldn't have any functional effect. It's motivated by
some changes needed to implement clip masks in pixel local storage,
but these are also general improvements that stand alone. Specifically:

 - Remove clip_task_index from the global PrimitiveHeader struct.
   In most cases, the clip task is supplied in the BrushInstance
   structure, so it makes no sense to have this as a common field,
   where it is generally unused. Instead, there is now an extra
   'user data' field available in the PrimitiveHeader. Non-brush
   shaders (text_run and split_composite) use that extra field to
   store the clip task address, while the brush shaders gain an extra
   (currently unused) user data field.
 - In turn, this means there is no need to unconditionally try
   and retrieve the first clip task address for a primitive
   during batching. This was previously used to initialize the
   PrimitiveHeader structure.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 14:37:57 +00:00
Kartikaya Gupta
f6575a29b2 Bug 1537577 - Move doc comment to fix new warning in rustc 1.35.0-nightly. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D24359

--HG--
extra : moz-landing-system : lando
2019-03-21 14:32:09 +00:00
Glenn Watson
8452fc14bc Bug 1536732 - Add experimental pixel-local-storage render path to WR r=kvark
Add an experimental code path that makes use of the pixel local
storage extension available on many mobile GPUs.

This code path is currently disabled by default, as the support
is not complete for all primitives and blend modes. The initial
aim is to get feature parity with the existing renderer.

Once that's complete, we can take advantage of the (minimum)
12 bytes per pixel of high speed on-tile memory to store custom
data.

Clip masks are a good use case for this, since they map 1:1 with
the position of the fragment they are clipping. Using this for
clip masks allows us to handle clipping on mobile GPUs in a much
more efficient way - we can skip (a) separate render targets,
(b) target resolve (c) sample the mask texture during rendering.

Depends on D24123

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

--HG--
extra : moz-landing-system : lando
2019-03-21 02:59:04 +00:00
Barret Rennie
36cd17958e Bug 1444434 - Bump webrender and webrender_bindings gleam dependency to 0.6.14 r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23958

--HG--
extra : moz-landing-system : lando
2019-03-20 19:52:53 +00:00
Dzmitry Malyshau
7afa68dc61 Bug 1536085 - Update plane-split to 0.13.8 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D24095

--HG--
extra : moz-landing-system : lando
2019-03-19 21:00:08 +00:00
Glenn Watson
9d856b1091 Bug 1535976 - Add a fast path for common rounded rect clips to WR. r=kvark
Most rounded rect clips in real content are (a) axis aligned and
(b) have uniform radii.

When these conditions are met, we can run a fast path for clip
mask generation that uses significantly fewer ALU shader ops.

This is not typically a bottleneck on desktop GPUs, but can have
a large performance impact on mobile GPUs (and perhaps low end
integrated GPUs).

The Mali shader analyzer reports the slow path for the rounded
rect clip shader to be 94 cycles per fragment, while the fast
path is 10 cycles.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 19:48:13 +00:00
Bogdan Tara
d8ee73369c Backed out changeset 93c9a0e2da6e (bug 1527751) for wrench bustages CLOSED TREE 2019-03-19 07:41:50 +02:00
Alexis Beingessner
e2857c55ed Bug 1527751 - properly apply transformed clips in brush shader. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D23905

--HG--
extra : moz-landing-system : lando
2019-03-18 21:05:56 +00:00
Bogdan Tara
84581c394f Backed out changeset 70440f88051f (bug 1535976) for /reftests/transform-3d/mask-layer* failures CLOSED TREE 2019-03-19 06:02:09 +02:00
Glenn Watson
7e08c517ab Bug 1535976 - Add a fast path for common rounded rect clips to WR. r=kvark
Most rounded rect clips in real content are (a) axis aligned and
(b) have uniform radii.

When these conditions are met, we can run a fast path for clip
mask generation that uses significantly fewer ALU shader ops.

This is not typically a bottleneck on desktop GPUs, but can have
a large performance impact on mobile GPUs (and perhaps low end
integrated GPUs).

The Mali shader analyzer reports the slow path for the rounded
rect clip shader to be 94 cycles per fragment, while the fast
path is 10 cycles.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 16:15:45 +00:00
Jamie Nicol
083b51840d Bug 1511433 - Ensure address variables in fragment shaders are highp precision. r=gw
In GLES 3 GLSL, the default precision for ints is highp (32 bit) in
vertex shaders, but only mediump (16 bit) in fragment shaders.

To render linear and radial gradients the fragment shader must fetch
the gradient stops from the gpu cache, using an address variable. This
variable is a 16 bit int, so if the stops data is located at
too high an address (row 32 or greater) then this value will have
overflown and we fetch from the wrong location. This was resulting in
garbage being drawn instead of the correct gradients.

To fix this, any address used in a fragment shader must be marked as
highp. This includes the varying input which supplies the address, and
the arguments to any functions used for the fetch.

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

--HG--
extra : moz-landing-system : lando
2019-03-17 20:54:29 +00:00
Glenn Watson
a15a5c4425 Bug 1535540 - Remove the identity transform condition while checking redundant stacking contexts. r=emilio
The only time that the ancestor spatial node index is read is
during push_stacking_context. This means that even if it was
used as an ancestor for a 3d context, we can safely collapse
it in to the parent stacking context during flattening, if it
is otherwise redundant.

This is a partial fix for picture caching heuristics failing
with the display list produced on mobile devices.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 03:08:26 +00:00
Dzmitry Malyshau
7f7b9d9668 Bug 1527325 - Don't re-export contents of WR API units r=gw
The cleans up our WR use statements further, easying the merge conflicts.
Note: this PR is subject to instant rot, it is preferred to land quickly.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 01:44:05 +00:00
Gurzau Raul
fc5efa3bc0 Backed out changeset 950174a8c708 (bug 1527325) for wrench failures on a CLOSED TREE. 2019-03-14 00:56:55 +02:00
Dzmitry Malyshau
5136f1e520 Bug 1527325 - Don't re-export contents of WR API units r=gw
The cleans up our WR use statements further, easying the merge conflicts.
Note: this PR is subject to instant rot, it is preferred to land quickly.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 19:30:56 +00:00
Glenn Watson
59cda29424 Bug 1534885 - Change clip mask rendering to not rely on render task data. r=kvark
As a general principle, we're trying to remove most usage of the
render task data that gets stored in a texture (bind_frame_data
is slow on many platforms, and it's somewhat inflexible with the
amount of data that can be provided).

This also lays some foundations for possibly drawing clip masks
with alternative techniques on mobile / tiled GPU architectures,
where we may not need / want a render task for clip masks.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 19:28:36 +00:00
Dzmitry Malyshau
97423c7bca Bug 1519718 - Revert the mix-blend rewrite r=jrmuizel
https://phabricator.services.mozilla.com/D20608
Caused problems in Servo https://github.com/servo/servo/pull/22973 and MotionMark - https://bugzilla.mozilla.org/show_bug.cgi?id=1519718

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

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml
extra : moz-landing-system : lando
2019-03-13 14:50:46 +00:00
sotaro
c046c7a430 Bug 1531294 - Fix RecvEmptyTransaction() as to handle WebRenderTextureHostWrapper usage case
By Bug 1526213, WebRenderBridgeParent::RecvEmptyTransaction() does not handle a case that resource update is handled by WebRenderTextureHostWrapper. In this case, txn.IsResourceUpdatesEmpty() became true and the function thought there was no resource update and the function returned DidComposite soon to client side. Then it caused a heavy over production of SharedSurface_ANGLEShareHandle if GPU is not powerful.

Differential Revision: https://phabricator.services.mozilla.com/D22454
2019-03-12 21:48:34 +09:00
Bogdan Tara
8abdafbf10 Merge inbound to mozilla-central. a=merge 2019-03-12 11:51:39 +02:00
Timothy Nikkel
6061184923 Bug 1532245. Factor out component transfer code to a function in brush_blend shader for webreder. r=gw
Some phones can't compile the shader as is: "ERROR: 0:1448: '' : No default label can be nested inside other control flow nested within their corresponding switch"

https://github.com/servo/webrender/wiki/Driver-issues#bug-1532245---switch-statement-inside-control-flow-inside-switch-statement-fails-to-compile-on-some-android-phones

Differential Revision: https://phabricator.services.mozilla.com/D22853
2019-03-11 21:34:30 -05:00
Oana Pop Rus
69cfd60db1 Backed out changeset c32dcf4e6f92 (bug 1532245) for wrench failures 2019-03-12 00:29:04 +02:00
Timothy Nikkel
22a6c8b875 Bug 1532245. Factor out component transfer code to a function in brush_blend shader for webreder. r=gw
Some phones can't compile the shader as is: "ERROR: 0:1448: '' : No default label can be nested inside other control flow nested within their corresponding switch"

https://github.com/servo/webrender/wiki/Driver-issues#bug-1532245---switch-statement-inside-control-flow-inside-switch-statement-fails-to-compile-on-some-android-phones

Differential Revision: https://phabricator.services.mozilla.com/D22853
2019-03-11 17:01:40 -05:00
Dorel Luca
d16991b48d Backed out changeset ec39fd695adb (bug 1531294) for webrender failures 2019-03-12 05:33:33 +02:00
Dzmitry Malyshau
b6ebaa6f8d Bug 1532174 - Roll back env_logger to 0.5 r=gw
needed to avoid duplicate dependencies

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

--HG--
extra : moz-landing-system : lando
2019-03-12 02:54:05 +00:00
Dzmitry Malyshau
f64c5868d0 Bug 1532174 - Refactor get_relative_transform to not return an option r=gw
Just a refactor without any semantical changes.
Makes it for cleaner client code. Also prepares for caching of the world transforms.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 02:27:29 +00:00
Dzmitry Malyshau
cfb49f008a Bug 1532174 - Strongly typed vertex data stores in WR r=gw
Establishes a clear link of TransformData with the shader.
Associates a vertex data type permanently, which makes the code cleaner and allow finding the relevant bits quickly with search.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 02:26:51 +00:00
Dzmitry Malyshau
176b658e7a Bug 1532174 - Enable env_logger by default in Wrench r=gw
Env logger is useful for:
  1. seeing error! generated by the code (by default). Sometimes it can give us hints on what is wrong with the capture, or a test right away.
  2. seeing processed shader compile/link errors, which is very useful when changing them

Given that wrench is the main debugging tool at the moment, enabling the logging output by default should increase our productivity, at the cost of slightly longer build times.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 02:26:34 +00:00
sotaro
ed7384e097 Bug 1531294 - Fix RecvEmptyTransaction() as to handle WebRenderTextureHostWrapper usage case r=mattwoodrow
By Bug 1526213, WebRenderBridgeParent::RecvEmptyTransaction() does not handle a case that resource update is handled by WebRenderTextureHostWrapper. In this case, txn.IsResourceUpdatesEmpty() became true and the function thought there was no resource update and the function returned DidComposite soon to client side. Then it caused a heavy over production of SharedSurface_ANGLEShareHandle if GPU is not powerful.

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

--HG--
extra : moz-landing-system : lando
2019-03-11 23:05:58 +00:00
Glenn Watson
f2f661a64c Bug 1531170 - Fix WR hit testing breakage caused by stacking context clip changes. r=kvark
Recently, semantics for clips on stacking contexts were changed
such that primitives inherit the clip chain from all enclosing
stacking contexts. However, the hit testing code was not updated
to handle this change.

As each hit testing primitive is added, the current stack of
active stacking contexts is now scanned. Any valid clip chain
roots from the primitive and/or the stacking context stack are
added to the list of clip chain roots for this hit testing
primitive.

This patch also applies some optimizations and other cleanups
of the hit-testing code, specifically:

 - Instead of cloning the hit testing runs Vec every time a
   frame is built, store these in the new HitTestingScene. The
   HitTestingScene is built once per scene, and then shared by
   any hit tester instances via an Arc. This reduces a lot of
   memory allocations and copying during scrolling.
 - When creating a new HitTestingScene, pre-allocate the size
   of the arrays, based on the size of the previous hit testing
   structure. This works similarly to how arrays are sized
   in the PrimitiveStore.
 - Pre-calculate and cache a number of inverse transform matrices
   that were previously being calculated for each hit testing run.
 - Store hit testing primitives in a flat array, instead of runs,
   since there is no longer a single clip chain id per primitive.
 - Fix an apparent (?) bug in the existing hit testing code, where
   clipping out a single hit test primitive would break out of the
   loop for the current run of hit test items.

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

--HG--
extra : moz-landing-system : lando
2019-03-11 16:19:21 +00:00
Bogdan Tara
e3008ee390 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-03-08 23:57:07 +02:00
Bogdan Tara
738b07a929 Merge inbound to mozilla-central. a=merge 2019-03-08 23:52:28 +02:00
Bobby Holley
af5a99b2ad Bug 1532810 - Report long-running GL calls to the profiler. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D22202
2019-03-08 13:34:49 -08:00
Bobby Holley
fa27fe3954 Bug 1532810 - Update gleam. r=me 2019-03-08 13:34:48 -08:00
shindli
b483c4a572 Backed out 3 changesets (bug 1532810) for wrench bustages CLOSED TREE
Backed out changeset 866b6d9949a8 (bug 1532810)
Backed out changeset 1cb006402562 (bug 1532810)
Backed out changeset 24b9ae45e4fa (bug 1532810)
2019-03-08 19:41:32 +02:00
Bobby Holley
843df28fb1 Bug 1532810 - Update Cargo.lock to fix wrench bustage on a CLOSED TREE. r=me 2019-03-08 09:37:26 -08:00
Bobby Holley
c1cbf37e13 Bug 1532810 - Report long-running GL calls to the profiler. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D22202
2019-03-08 09:16:50 -08:00
Bobby Holley
b49d9f5234 Bug 1532810 - Update gleam. r=me 2019-03-08 09:16:49 -08:00
Nicolas Silva
fc4df4b5f7 Bug 1533282 - Restore the debugging options in wrench/script/headless.py. r=kvark,kats
Differential Revision: https://phabricator.services.mozilla.com/D22458

--HG--
extra : source : 84b7e225952a06c95cc415abf497e8295e644ad6
2019-03-08 11:15:32 +01:00
Kartikaya Gupta
1889f4e164 Bug 1532284 - Build wrench on Android. r=glandium
Depends on D22377

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

--HG--
extra : moz-landing-system : lando
2019-03-08 00:37:46 +00:00
Kartikaya Gupta
b4182026be Bug 1532284 - Build using android-28. r=gw
This is the SDK version we use to build other Android stuff in
mozilla-central. It's simpler if we build Wrench using the same
target since we can reuse the toolchains.

Depends on D22376

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

--HG--
extra : moz-landing-system : lando
2019-03-07 17:34:50 +00:00
Kartikaya Gupta
d1e8fe8a40 Bug 1532284 - Fix rustc compiler warnings when building wrench for Android. r=gw
Various variables are unused when building for Android.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 17:34:50 +00:00
Lee Salzman
18932c1c7f Bug 1522787 - downscale bitmap glyphs to avoid filtering artifacts r=gw
Differential Revision: https://phabricator.services.mozilla.com/D22704
2019-03-08 08:48:38 -05:00
Glenn Watson
e920cc3f6a Bug 1533236 - Add a fast path to WR for common gradient types. r=kvark
The existing linear gradient shader is quite slow, especially
on very large gradients on integrated GPUs.

The vast majority of gradients in real content are very simple
(typically < 4 stops, no angle, no repeat). For these, we can
run a fast path to persist a small gradient in the texture cache
and draw the gradient via the image shader.

This is _much_ faster than the catch-all gradient shader, and also
results in better batching while drawing the main scene.

In future, we can expand the fast path to handle more cases, such
as angled gradients. For now, it takes a conservative approach,
but still seems to hit the fast path on most real content.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 21:20:40 +00:00
Ciure Andrei
5b0d4e70f1 Backed out changeset 664fd8f4cc02 (bug 1533282) for causing a wrench bustage CLOSED TREE 2019-03-07 19:17:34 +02:00
Nicolas Silva
a9c6312e6e Bug 1533282 - Restore the debugging options in wrench/script/headless.py. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D22458

--HG--
extra : moz-landing-system : lando
2019-03-07 14:16:44 +00:00
Jamie Nicol
b112738bcb Bug 1528820 - Work around Adreno bug when blitting to texture array. r=kvark
There is a bug on Adreno GPUs where glBlitFramebuffers always writes
to the 0th layer of a texture array, regardless of which layer is
actually attached to the draw framebuffer.

With picture caching enabled on webrender, the cached pictures were
all being drawn to the 0th layer of the picture cache texture array,
leaving the other layers blank. This was resulting in the wrong
content being drawn on one tile of the screen, and the rest being
black.

This works around this by blitting to an intermediate renderbuffer,
then using glCopyTexSubImage3D to copy from the renderbuffer to the
correct texture layer.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 14:02:50 +00:00
Jamie Nicol
783cdd7d41 Bug 1528820 - Make Device::blit_render_target() require read and draw targets as arguments. r=kvark
Same for blit_render_target_invert_y(). Make them wrappers around the
private function blit_render_target_impl(), which uses the currently
bound read and draw targets as before.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 14:02:46 +00:00
Emilio Cobos Álvarez
cb19991fd7 Bug 1533142 - Use more cbindgen features. r=kats
We can get back the fancy flag syntax as soon as we get C++17 inline variables,
which I sent an email to dev-platform@ about, with no reply.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 23:01:11 +00:00
Lee Salzman
91d9a90e20 Bug 1533139 - pass in raster scale to text run shader without inverting r=gw
Differential Revision: https://phabricator.services.mozilla.com/D22379

--HG--
extra : moz-landing-system : lando
2019-03-06 21:39:04 +00:00
Lee Salzman
f4c05292a1 Bug 1527531 - calculate glyph subpixel positions using the precise font transform r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D22349

--HG--
extra : moz-landing-system : lando
2019-03-06 20:40:53 +00:00
Bobby Holley
ec2f81db57 Bug 1531196 - Add a "small-screen" debug pref to shrink the overlay a bit. r=gw
Adaptive sizing would be better, but this is the simplest path to
victory.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 20:32:32 +00:00
Gurzau Raul
0208b45a04 Backed out changeset 6878f6294d68 (bug 1519718) for bustages on a CLOSED TREE. 2019-03-06 12:34:28 +02:00
Gurzau Raul
0e6a425f79 Backed out 2 changesets (bug 1519718) for performance regression (bug 1530611) on a CLOSED TREE.
Backed out changeset 9bae35dc1471 (bug 1519718)
Backed out changeset 640e731ed52e (bug 1519718)

--HG--
extra : rebase_source : ee2bc4503c84e709f7cd2265b4b6286960c20d4a
2019-03-06 11:47:53 +02:00
Ciure Andrei
253bf420a1 Merge inbound to mozilla-central. a=merge 2019-03-05 06:20:52 +02:00
Ciure Andrei
5ebab45abd Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-03-04 23:54:12 +02:00
Glenn Watson
31fb2275a2 Bug 1531524 - Support running wrench on Android. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D21881

--HG--
extra : moz-landing-system : lando
2019-03-04 18:49:52 +00:00
Dzmitry Malyshau
fbd7d832eb Bug 1531930 - Interneration refactoring r=gw
Remove the intern_types module in favor of the associated Internable types that we already have.
The only bit of magic I had to do is around serialization bounds, and it's nicely isolated.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 16:48:40 +00:00
Andrew Osmond
8e407b7327 Bug 1526756 - Snap brushes for pictures to the primitive instead of visible rect. r=kvark
A picture can have its own unique clip which was not considered by its
children when calculating their visible rects. As a result, if a picture
clips its primitive rect for snapping purposes, it may produce a
different snapping offset than expected. We should instead just snap to
the primitive rect itself for the picture, since it is the union of the
visible rects that we snapped to for the children.

Differential Revision: https://phabricator.services.mozilla.com/D21778
2019-03-04 14:21:18 -05:00
Bogdan Tara
f516b0e3b5 Backed out changeset 458edf3460d4 (bug 1531930) for tidy bustage CLOSED TREE 2019-03-04 05:58:40 +02:00
Dzmitry Malyshau
2ef785bda1 Bug 1531930 - Interneration refactoring r=gw
Remove the intern_types module in favor of the associated Internable types that we already have.
The only bit of magic I had to do is around serialization bounds, and it's nicely isolated.

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

--HG--
extra : moz-landing-system : lando
2019-03-03 21:14:49 +00:00
Dzmitry Malyshau
79ad259c7c Bug 1531217 - Document origin rewrite and framebuffer coordinates r=gw,nical
The goal of this change was to simplify the semantics of our document placement and split the logical elements inside (display list) from the actual screen rectangle occupied by a document.
To achieve that, we introduce the framebuffer space for things Y-flipped on screen.
We fix the frame outputs, so that they get produced on the first frame without loopback from the frame building to scene building.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 17:16:59 +00:00
Csoregi Natalia
b2672c85cf Backed out changeset 93f7dc3084a1 (bug 1531217) for wrench failures. CLOSED TREE 2019-03-01 18:48:30 +02:00
Dzmitry Malyshau
57074df49b Bug 1531776 - Spew debug messages on GL error r=nical
example error
ERROR 2019-03-01T15:23:27Z: webrender::device::gl: (error) GL_INVALID_ENUM error generated. Invalid primitive mode.
thread 'main' panicked at 'Caught GL error 500 at 'draw_elements_instanced'', webrender/src/device/gl.rs:1098:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 15:42:33 +00:00
Dzmitry Malyshau
a8d4f45a20 Bug 1531217 - Document origin rewrite and framebuffer coordinates r=gw,nical
The goal of this change was to simplify the semantics of our document placement and split the logical elements inside (display list) from the actual screen rectangle occupied by a document.
To achieve that, we introduce the framebuffer space for things Y-flipped on screen.
We fix the frame outputs, so that they get produced on the first frame without loopback from the frame building to scene building.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 14:25:36 +00:00
Nicolas Silva
9ad4994f85 Bug 1530978 - Show profiler stats averaged over half a second instead of 600 frames. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D21392

--HG--
extra : moz-landing-system : lando
2019-02-27 20:00:56 +00:00
Nicolas Silva
e5891efca7 Bug 1530730 - Update plane-split to 0.13.7. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D21503

--HG--
extra : moz-landing-system : lando
2019-02-28 16:04:29 +00:00
Kartikaya Gupta
a23137f08f Bug 1531512 - Mark unused variables as unused for non-windows. r=kvark
rustc 1.33 is smart enough to detect and complain about this.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 04:04:46 +00:00
Glenn Watson
c01089654e Bug 1531248 - Reduce the number of resolve / copy steps in WR on mobile devices. r=kvark
This patch fixes some wasted GPU time on mobile devices due to
redundant resolve / copy steps.

In the first case, we would previously do:
 - Global clear of color / depth on main framebuffer.
 - Bind and draw off-screen targets.
 - Bind main framebuffer and draw scene.

Between step 1 and 2, a resolve step is triggered on tiled GPU
drivers, wasting a lot of GPU time. To fix this, the clear is
now deferred until the framebuffer of the first document is
drawn. This does slightly change the semantics of how WR does
clear operations, but I think it works fine and makes more sense.

In the second case, we would previously do:
 - ...
 - Draw main framebuffer
 - End frame and invalidate the contents of input textures.
 - Bind main framebuffer and draw debug overlay.

This also introduces an extra resolve / copy step, even if the
debug overlay is not enabled. To fix this, the invalidation step
of the input textures to the main framebuffer pass is deferred
until all drawing is complete on the main framebuffer, by doing
the invalidation in the end_frame() call of the texture resolver.

Together, these save a very significant amount of ms per frame
in GPU time on the mobile devices I tested.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 19:50:44 +00:00
Doug Thayer
2353e50eed Bug 1441308 - Fix picture-caching interaction with doc spitting r=gw
This is a stab at what the correct approach to this should be. It
seems that we should be using the window size here and not the
screen_rect, as the screen_rect is not used to offset what we
normally draw, but instead generally for scissoring(?). The end
result is if we use an offset screen_rect, we end up applying
the offset of the chrome area twice, once because the document's
screen rect is offset, and once because of the tile.world_rect
offset.

Depends on D20696

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

--HG--
extra : moz-landing-system : lando
2019-02-28 19:15:15 +00:00
Dorel Luca
3f139c9c3f Backed out 2 changesets (bug 1529117) for build bustage
Backed out changeset 82cfcc2f5fac (bug 1529117)
Backed out changeset d9fd8225a95f (bug 1529117)
2019-02-27 13:27:50 +02:00
Kartikaya Gupta
0699c44e5a Bug 1529117 - Bump serde and serde_derive to branch from 1.0.88. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D20460

--HG--
extra : moz-landing-system : lando
2019-02-27 11:09:50 +00:00
Glenn Watson
fde9185d49 Bug 1530915 - Change external scroll offset to be a vector. r=emilio
Change the external scroll offset to be a vector, rather than a
point. This can also be updated gecko-side in future, but for
now is converted to a vector at the API boundary.

Also plumb through the external scroll offset so that it is stored
inside the ScrollFrameInfo in a spatial node. This will allow
modifying the transforms that the clip-scroll tree creates to
take into account the external scroll offset in future.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 05:26:50 +00:00
shindli
c442603050 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-02-26 18:58:45 +02:00
shindli
c780ef516c Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-02-26 12:20:22 +02:00
Glenn Watson
1008811aea Bug 1530518 - Refactor the way stacking context coords are converted to reference frame coords. r=emilio
This doesn't introduce any functional changes. However, it refactors
the way that stacking context coords are converted into reference
frame relative coordinates.

Having a single method to retrieve the current offset will make it
easier to take advantage of the newly added API that allows Gecko
to supply initial scroll offsets for scroll nodes. In turn, this
will allow WR to normalize the local coordinates of primitives, which
will allow future improvements and simplifications to the picture
caching implementation.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 22:31:06 +00:00
Glenn Watson
1500229636 Bug 1530242 - Enable some picture caching invalidation tests in wrench. r=emilio
A number of small tweaks to enable the picture caching invalidation
tests. With this in place, we can start adding more test coverage
for various invalidation scenarios.

- Make the reference image render after the test images, so that dirty
  region tracking is more intuitive.
- Instead of replaying the same frame in wrench to ensure frames are
  caching, try to cache tiles every frame when testing mode is enabled.
- Add a basic invalidation test for a rectangle with color that changes
  each frame.
- Make the dirty region index implicit and rename dirty_region to dirty
  in reftest format.
- Fix an underflow error when moving to next frame in wrench.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 22:25:22 +00:00
Noemi Erli
7e23372938 Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
extra : rebase_source : de8796d5d7d7079af1b895a2f537371885f8cc6c
2019-02-26 00:09:40 +02:00
Kartikaya Gupta
280260b8d0 Bug 1519718 - Follow-up to bump the fuzz number slightly, so the test passes on AppVeyor too. rs=kvark 2019-02-25 09:04:23 -05:00
Dzmitry Malyshau
0bf19769e6 Bug 1519718 - WR mix-blend rewrite r=gw
This is a new implementation of mix-blend compositing that is meant to be more idiomatic to WR and efficient.

Previously, mix-blend mode was composed in the following way:
  1. parent stacking context was forced to isolate
  2. source picture is also isolated
  3. when rendering the isolated context, the framebuffer is read upon reaching the source. Both the readback and the source are placed in the RT cache.
  4. a mix-blend draw call is issued to read from those cache segments and blend on top of the backdrop

The new implementation works by using the picture cutting (intruduced for preserve-3D contexts earlier) and some bits of magic:
  1. backdrop stacking context is isolated with a special composition mode that prevents it from actually rendeing unless the suorce stacking context is invisible.
  2. source stacking context is isolated with mix-blend composition mode that has a pointer to the backdrop picture
  3. the instance of the backdrop picture is placed as a peer of the source picture (not a child)
  4. if the backdrop is invisible, the source is drawn as a simple blit
  5. otherwise, it's a draw call that reads from the isolated backdrop and source textures

Note the differences:
  - parent stacking context is not isolated, but backdrop is
  - no framebuffer readback is involved
  - the source and backdrop pictures are rendered in parallel in a pass, improving the batching
  - we don't blend onto the backdrop while reading from the backdrop copy at the same time
  - the depth of the render pass tree is reduced: previously the parent and the source were isolated, now the source and the backdrop, which are siblings

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

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml
rename : gfx/wr/wrench/reftests/blend/multiply-3.yaml => gfx/wr/wrench/reftests/blend/multiply-4.yaml
extra : moz-landing-system : lando
2019-02-25 00:17:22 +00:00
Doug Thayer
9785d8bd59 Bug 1441308 - Ensure lazy init of debug renderer in draw_frame_debug_items r=gw
Document splitting is crashing with early initialization of the debug
renderer. Not sure why, and this is just a temporary workaround, but
one that I think we want anyway, as we don't want to be unnecessarily
lazy-initting the debug renderer.

Depends on D20698

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

--HG--
extra : moz-landing-system : lando
2019-02-26 15:29:15 +00:00
Razvan Maries
98aa3c3fde Backed out 2 changesets (bug 1519718) for causing perma fails on blend-gradient-background-color.html. a=backout
Backed out changeset 4f11ca736067 (bug 1519718)
Backed out changeset 4fefbf627bfc (bug 1519718)

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml
2019-02-24 16:16:30 +02:00
Dzmitry Malyshau
9ddfc7834c Bug 1519718 - Remove accidental wrench log r=kats
Log was landed my mistake in https://phabricator.services.mozilla.com/D20608

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

--HG--
extra : moz-landing-system : lando
2019-02-23 19:31:15 +00:00
Dzmitry Malyshau
575dd4463b Bug 1519718 - WR mix-blend rewrite r=gw
This is a new implementation of mix-blend compositing that is meant to be more idiomatic to WR and efficient.

Previously, mix-blend mode was composed in the following way:
  1. parent stacking context was forced to isolate
  2. source picture is also isolated
  3. when rendering the isolated context, the framebuffer is read upon reaching the source. Both the readback and the source are placed in the RT cache.
  4. a mix-blend draw call is issued to read from those cache segments and blend on top of the backdrop

The new implementation works by using the picture cutting (intruduced for preserve-3D contexts earlier) and some bits of magic:
  1. backdrop stacking context is isolated with a special composition mode that prevents it from actually rendeing unless the suorce stacking context is invisible.
  2. source stacking context is isolated with mix-blend composition mode that has a pointer to the backdrop picture
  3. the instance of the backdrop picture is placed as a peer of the source picture (not a child)
  4. if the backdrop is invisible, the source is drawn as a simple blit
  5. otherwise, it's a draw call that reads from the isolated backdrop and source textures

Note the differences:
  - parent stacking context is not isolated, but backdrop is
  - no framebuffer readback is involved
  - the source and backdrop pictures are rendered in parallel in a pass, improving the batching
  - we don't blend onto the backdrop while reading from the backdrop copy at the same time
  - the depth of the render pass tree is reduced: previously the parent and the source were isolated, now the source and the backdrop, which are siblings

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

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml
rename : gfx/wr/wrench/reftests/blend/multiply-3.yaml => gfx/wr/wrench/reftests/blend/multiply-4.yaml
extra : moz-landing-system : lando
2019-02-23 03:34:56 +00:00
Kartikaya Gupta
b8ad25821d Bug 1499113 - Multiply transform scales into the blur radius for blur filters. r=kvark
Without this patch any enclosing scale transform between a blurred
picture and the nearest raster root was being ignored entirely for the
purposes of blur.

Also includes a couple of reftests to exercise this code.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 17:12:17 +00:00
Kartikaya Gupta
3d5d6cd639 Bug 1499113 - Turn the blur stddev value into a tuple with horizontal and vertical components. r=kvark
This patch is just plumbing; no functional changes intended.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 17:33:24 +00:00
Jamie Nicol
8ad32e5644 Bug 1498732 - Ensure PBO texture upload is performed asynchronously on webrender on Adrenos. r=kvark
Currently on Android we upload texture data to the webrender texture
cache using a PBO. On Adreno GPUs, however, this upload is still being
done synchronously, and profiles show a lot of time spent waiting in
glTexSubImage3D.

The problem is that the stride of the data in the PBO is not a
multiple of 256 bytes, so the driver is not able to DMA the upload.

This patch ensures that data is laid out optimally in the PBO, using
glMapBufferRange then copying the data line-by-line if required. This
allows the driver to perform the upload asynchronously as intended.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 15:00:09 +00:00
Jamie Nicol
32ffe0f9b1 Bug 1498732 - Update gleam to 0.6.9. r=kats
This provides the functions glMapBufferRange and glUnmapBuffer.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 14:59:01 +00:00
Coroiu Cristina
6a915c899d Merge mozilla-central to inbound a=merge 2019-02-22 18:41:16 +02:00
Nicolas Silva
b9092ff14c Bug 1528753 - Update euclid dependency. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D20176

--HG--
extra : moz-landing-system : lando
2019-02-21 14:41:36 +00:00
Nicolas Silva
6ccb0762a3 Bug 1528753 - Compute the layout space tiling origin. r=kvark
The tiling origin is computed withing image::tiles instead of being provided to the function.
In addition, the image rect in device space is exposed as function parameter.
In a followup, callers will have to determine the correct image rect using the blob image's visible area.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 18:16:41 +00:00
Nicolas Silva
fd337e9ded Bug 1476368 - Add VecHelper::take/take_and_preallocate. r=gw
--HG--
extra : source : 8bc9ab1a56f9985c0c8e6c85758a121d577b264f
extra : histedit_source : 3155f5881349ec818032547492e83532a894d32c
2019-02-19 17:53:31 +01:00
Nicolas Silva
f9b5d37783 Bug 1476368 - Avoid moving picture primitives when destroying them. r=gw
--HG--
extra : source : 88f409bc495a135764d75ac22802c2fca94d7be3
extra : histedit_source : fa57c05c5227b676ba5f7c582c00b6d1511d89be
2019-02-19 18:39:06 +01:00
Nicolas Silva
93f732bfcd Bug 1476368 - Avoid moving texture cache entries when evicting them. r=gw
--HG--
extra : source : 03e1b2ae53bb312d91f7251740a9cc575d7ac3cd
extra : histedit_source : 463663b79fd134e72e5130b642d347d0244340cb
2019-02-20 09:16:44 +01:00
Nicolas Silva
859c756fae Bug 1476368 - Pre-allocate primitives vector in setup_picture_caching. r=gw
--HG--
extra : source : 32aa85626f6c484dff616ec9ae78ca53ea38dec5
extra : histedit_source : 109a92a512932d686f31906c37392f5f55db18e8
2019-02-20 10:01:28 +01:00
Nicolas Silva
b6c94f1ece Bug 1476368 - Pre-allocate vectors in HitTester::read_clip_scroll_tree. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D20507

--HG--
extra : source : 96b0377ea3ce47ef806331cb7ca7881aaafdf2c1
extra : histedit_source : 97034307c821c468828f65a9aeb9436fd7cd7e7b
2019-02-20 10:11:09 +01:00
Nicolas Silva
a9803d039d Bug 1529272 - Reduce the amount of allocations, hashing and moves related to FontInstance. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D20503

--HG--
extra : source : 8c408c32fb6fdd1162938336ab26ece65a249c82
extra : histedit_source : c19032ba76065988f2fb4bc62d207e2437bfb90e
2019-02-22 14:53:37 +01:00
Timothy Nikkel
c85a512b81 Bug 1505871. Add a wrench reftest. 2019-02-26 00:16:37 -06:00
Timothy Nikkel
3bf7ef2abf Bug 1505871. Fix comment to not trigger angle_shader_validation.rs.
angle_shader_validation.rs just checks that the number of "switch" and "default:" are the same number in the source file, even if they occur in comments.
2019-02-26 00:16:37 -06:00
Timothy Nikkel
78f0cf02be Bug 1505871. Work around a suspected shader miscompilation on Windows. r=gw
On Windows the vFuncs array is always 0 in the fragment shader. If we move the computation of the vFuncs array outside of the switch (so that it is computed for every type of shader, even when it is not needed) then it works.
2019-02-26 00:16:37 -06:00
Timothy Nikkel
6919a21fa6 Bug 1505871. Implementation of shaders. r=gw 2019-02-26 00:16:37 -06:00
Timothy Nikkel
487492593e Bug 1505871. Implement putting the required data in the gpu cache for component transfer. r=gw
For table/discrete we just create a lookup table for all 256 possible input values. We should probably switch to just computing the value in the shader, unless the list of value is really long.
2019-02-26 00:16:37 -06:00
Timothy Nikkel
c0ef28ed8e Bug 1505871. Pass DataStores to prepare_for_render. r=gw
We need this to get get filter data from the intern table.
2019-02-26 00:16:37 -06:00
Timothy Nikkel
7a0fe66d40 Bug 1505871. Don't borrow frame_state.surface for the duration of prepare_for_render. r=gw
We need to call update on the filter data handle which needs to use frame_state (in a later patch), so we can't borrow across that call.
2019-02-26 00:16:36 -06:00
Timothy Nikkel
02ac32975f Bug 1505871. Implement the necessary things for interning of filter data. r=gw 2019-02-26 00:16:36 -06:00
Timothy Nikkel
dad4e9d0b7 Bug 1505871. Implement yaml reader/writer for component transfer. r=jrmuizel 2019-02-26 00:16:36 -06:00
Timothy Nikkel
f39f60fa91 Bug 1505871. Write component transfer filter data into the webrender display list bitstream. r=jrmuizel
The format for stacking contexts in the built display list goes from

PushStackingContext item
push_iter of Vec<FilterOp>

to

SetFilterOps item
push_iter of Vec<FilterOp>
1st SetFilterData item
push_iter of array of func types
push_iter funcR values
push_iter funcG values
push_iter funcB values
push_iter funcA values
.
.
.
nth SetFilterData item
push_iter of array of func types
push_iter funcR values
push_iter funcG values
push_iter funcB values
push_iter funcA values
PushStackingContext item

We need separate a SetFilterData item for each filter because we can't push_iter a variable sized thing.

When we iterate over the built display list to flatten it we work similarly to how gradients work with a SetGradientStops item before the actual gradient item. So when we see SetFilterOps or SetFilterData we use them to fill out values on the built display list iterator but don't those items return them to the iterator user and instead continue iterating until we hit the PushStackingContext item, at which point to the iterator consumer it appears as those the FilterOps and FilterDatas were on the PushStackingContext item. (This part is trickier too since we need a TempFilterData type that just holds ItemRange's until we get the actual bytes later.)

Do we need to clear cur_filters and cur_filter_data at some point to prevent them from getting ready by items for which they do not apply?
2019-02-26 00:16:36 -06:00
Timothy Nikkel
213203d8e5 Backed out changeset 90660632d641 2019-02-25 22:48:04 -06:00
Timothy Nikkel
736fc91b3f Backed out changeset def812790f5c 2019-02-25 22:47:54 -06:00
Timothy Nikkel
8238bfd239 Backed out changeset 11c9d5a64a30 2019-02-25 22:47:40 -06:00
Timothy Nikkel
e4b483e186 Backed out changeset 1206e1a32e5f 2019-02-25 22:47:23 -06:00
Timothy Nikkel
aac71db24c Bug 1505871. Don't borrow frame_state.surface for the duration of prepare_for_render. r=gw
We need to call update on the filter data handle which needs to use frame_state (in a later patch), so we can't borrow across that call.
2019-02-25 22:45:16 -06:00
Timothy Nikkel
22cf8be9b7 Bug 1505871. Implement the necessary things for interning of filter data. r=gw 2019-02-25 22:45:16 -06:00
Timothy Nikkel
24dc00068c Bug 1505871. Implement yaml reader/writer for component transfer. r=jrmuizel 2019-02-25 22:45:16 -06:00