Commit Graph

585 Commits

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Depends on D34166

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

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

Depends on D34165

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

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

Depends on D34164

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

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

Depends on D34162

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

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

Depends on D34161

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

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

Depends on D34160

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

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

Depends on D34159

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

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

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

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

Depends on D33781

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--HG--
extra : moz-landing-system : lando
2019-05-29 21:52:57 +00:00