Commit Graph

960 Commits

Author SHA1 Message Date
Glenn Watson
d98231a231 Bug 1582624 - Add partial present API for webrender. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D47732

--HG--
extra : moz-landing-system : lando
2019-10-06 20:59:36 +00:00
Glenn Watson
d170ede903 Bug 1585898 - Fix broken tab bar with picture caching on mac. r=mstange
Promote clear primitives to be picture cache slices that can
be drawn during the composite step. Without this, the clear
primitive is not correct since it only operates on the slice
it is assigned to, not the entire background before it.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 01:20:49 +00:00
Glenn Watson
ead3514ee7 Bug 1586062 - Fix WebRender with picture caching path disabled. r=kvark
We need to detect this code path in renderer, and call the
legacy draw_color_target method.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 19:32:09 +00:00
Glenn Watson
611160e516 Bug 1585240 - Add a composite code path for picture cache tiles. r=kvark
Previously, picture cache tiles were added to normal batches, and drawn
via the brush_image shader. Since all content is now in picture cache
tiles, we can instead draw the tiles via a separate code path. The tiles
for all picture caches are collected into a single composite config, that
is stored in the Frame structure. These two changes provide a number of
advantages:

 * The composite shader is very simple - it doesn't need to deal with
   transforms, anti-aliasing, repetition etc.
 * Since we create the tile batches in render(), rather than in the
   backend, we can take advantage of information not available until
   the render() call. For example, Gecko will provide information here
   when the partial presentation rects need to be reset. This will be
   used to enable partial presentation parameters on Windows.
 * In future, we can access this list of tiles to be composited, and use
   them to configure the OS compositor integration, and hand the tiles
   directly to the OS compositor.
 * In future, we can apply global optimizations to the set of picture
   cache tiles (e.g. occlude background tiles on CPU to skip paying
   the z-reject cost of drawing them).
 * In future, we can take advantage of the simpler composite path
   for software rasterizer implementations.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 01:14:42 +00:00
Glenn Watson
29fd75717f Bug 1566031 - Update vulnerable lodash version in WebRender Debugger. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D47856

--HG--
extra : moz-landing-system : lando
2019-10-02 19:52:48 +00:00
Nicolas Silva
aa11c1282e Bug 1580922 - Add a wrench rawtest. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D47790

--HG--
extra : moz-landing-system : lando
2019-10-02 07:58:35 +00:00
Nicolas Silva
3caec70162 Bug 1580922 - Ensure boundary tiles are invalidated when updating the visible area. r=jrmuizel
In addition, make sure the descriptor size stays in sync with the visible rect's size.
The descriptor's size stored in the resource cache is pretty much obsolete now, we should be able to clean it up and remove it.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 07:58:27 +00:00
Nicolas Silva
e706b2be8a Bug 1580922 - changing the blob visible area can require rasterization requests. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D47084

--HG--
extra : moz-landing-system : lando
2019-10-02 07:58:26 +00:00
Bogdan Tara
d78d9c367f Backed out 3 changesets (bug 1580922) for wrench failures CLOSED TREE
Backed out changeset daad734d5665 (bug 1580922)
Backed out changeset e24d2e6811b0 (bug 1580922)
Backed out changeset 485eee83a4f3 (bug 1580922)
2019-10-02 10:44:04 +03:00
Nicolas Silva
dd62825627 Bug 1580922 - Add a wrench rawtest. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D47790

--HG--
extra : moz-landing-system : lando
2019-10-02 06:54:56 +00:00
Nicolas Silva
8b3a6d3b5f Bug 1580922 - Ensure boundary tiles are invalidated when updating the visible area. r=jrmuizel
In addition, make sure the descriptor size stays in sync with the visible rect's size.
The descriptor's size stored in the resource cache is pretty much obsolete now, we should be able to clean it up and remove it.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 23:39:33 +00:00
Nicolas Silva
ae7070c711 Bug 1580922 - changing the blob visible area can require rasterization requests. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D47084

--HG--
extra : moz-landing-system : lando
2019-10-01 23:39:31 +00:00
Glenn Watson
334f0b22f4 Bug 1584439 - Enable picture caching for scroll bars and UI content. r=nical
Once this patch lands, all content drawn by WebRender is drawn into
a picture cache surface.

This will incur some extra GPU memory overhead since there are extra
GPU texture buffers. Much of this can be reduced by adding a couple
of simple optimizations in future to detect tiles that are solid
colors only.

With this change, we'll now be able to provide exact dirty rects for
the entire screen without any hacks, and start the work to draw into
OS compositor surfaces directly.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 08:52:40 +00:00
Oana Pop Rus
dbfb0e6cdd Backed out 3 changesets (bug 1580922) for wrench bustages. on a CLOSED TREE
Backed out changeset c6552f7ec6a0 (bug 1580922)
Backed out changeset ac6bd19f200a (bug 1580922)
Backed out changeset 31d0469993bd (bug 1580922)
2019-10-02 02:32:26 +03:00
Nicolas Silva
fe80db04c7 Bug 1580922 - Add a wrench rawtest. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D47790

--HG--
extra : moz-landing-system : lando
2019-10-01 16:34:43 +00:00
Nicolas Silva
7c48ca945a Bug 1580922 - Ensure boundary tiles are invalidated when updating the visible area. r=jrmuizel
In addition, make sure the descriptor size stays in sync with the visible rect's size.
The descriptor's size stored in the resource cache is pretty much obsolete now, we should be able to clean it up and remove it.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 16:34:59 +00:00
Nicolas Silva
98ffe8b435 Bug 1580922 - changing the blob visible area can require rasterization requests. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D47084

--HG--
extra : moz-landing-system : lando
2019-10-01 16:34:59 +00:00
arthur.iakab
9bc47253cc Backed out changeset 3eba60b905c0 (bug 1584439) for causing wrench bustages CLOSED TREE 2019-10-01 09:12:49 +03:00
Glenn Watson
cc9a8ee004 Bug 1584439 - Enable picture caching for scroll bars and UI content. r=nical
Once this patch lands, all content drawn by WebRender is drawn into
a picture cache surface.

This will incur some extra GPU memory overhead since there are extra
GPU texture buffers. Much of this can be reduced by adding a couple
of simple optimizations in future to detect tiles that are solid
colors only.

With this change, we'll now be able to provide exact dirty rects for
the entire screen without any hacks, and start the work to draw into
OS compositor surfaces directly.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 04:51:56 +00:00
Ciure Andrei
896ee6e424 Backed out changeset 4f126cfd8012 (bug 1584439) for causing wrench bustage CLOSED TREE 2019-10-01 07:39:54 +03:00
Glenn Watson
e861c795b9 Bug 1584439 - Enable picture caching for scroll bars and UI content. r=nical
Once this patch lands, all content drawn by WebRender is drawn into
a picture cache surface.

This will incur some extra GPU memory overhead since there are extra
GPU texture buffers. Much of this can be reduced by adding a couple
of simple optimizations in future to detect tiles that are solid
colors only.

With this change, we'll now be able to provide exact dirty rects for
the entire screen without any hacks, and start the work to draw into
OS compositor surfaces directly.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 01:34:01 +00:00
Jamie Nicol
db3ac60fec Bug 1584497 - Update wrench reftest expectations for emulator 29.2.1. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D47629

--HG--
extra : moz-landing-system : lando
2019-09-30 21:05:09 +00:00
Andrew Osmond
956a5992ad Bug 1582975 - Ensure that we don't attempt to iterate over image tiles outside the range. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D47468

--HG--
extra : moz-landing-system : lando
2019-09-27 19:10:27 +00:00
Jamie Nicol
ffd7f50dee Bug 1581628 - Update wrench jobs to work with NDK r20. r=jrmuizel
To support NDK r20, wrench needs to be built with a more recent, upstream
(though still unpublished) version of cargo-apk. This has some consequences
which have been adjusted for:
 * Gradle is no longer required to build wrench.
 * The output apk file paths have changed.
 * The apks are now signed automatically.
 * The default activity name has changed.
 * Android permissions must be explicitly requested.
 * We must ensure winit is built with a matching version of android_glue.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 13:50:43 +00:00
Glenn Watson
ab1041de89 Bug 1581757 - Support slicing the scene into an arbitrary number of picture cache slices r=nical,kvark
Previously, the setup_picture_caching function was hard coded
to support only a very specific shape of display list. With this
change, flags are added to PrimitiveCluster that can specify
if a picture cache slice should be created before / after this
cluster when picture caching is set up.

The usage of these flags in this patch matches the old behaviour,
so should not have any functional effect.

However, in future we will make use of this functionality to
create picture slices for a number of different use cases, such as:

 * Creating cache tiles for the UI.
 * Slicing the scene where there are video elements, in order to
   allow these to be composited directly by the OS. This may also
   apply to WebGL and/or canvas elements.
 * Slicing the scene when there is a very large fixed position
   background image or other element, to avoid invalidating the
   entire tile cache each frame.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 21:14:36 +00:00
Kris Taeleman
d2d88e021d Bug 1582565 - Log transactions into readable format. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D46657

--HG--
extra : moz-landing-system : lando
2019-09-26 16:43:05 +00:00
Dorel Luca
f1e99da78f Backed out changeset c2c9dbf826fe (bug 1581757) by dev's request 2019-09-26 12:37:59 +03:00
Glenn Watson
2637b20d2f Bug 1581757 - Support slicing the scene into an arbitrary number of picture cache slices r=nical,kvark
Previously, the setup_picture_caching function was hard coded
to support only a very specific shape of display list. With this
change, flags are added to PrimitiveCluster that can specify
if a picture cache slice should be created before / after this
cluster when picture caching is set up.

The usage of these flags in this patch matches the old behaviour,
so should not have any functional effect.

However, in future we will make use of this functionality to
create picture slices for a number of different use cases, such as:

 * Creating cache tiles for the UI.
 * Slicing the scene where there are video elements, in order to
   allow these to be composited directly by the OS. This may also
   apply to WebGL and/or canvas elements.
 * Slicing the scene when there is a very large fixed position
   background image or other element, to avoid invalidating the
   entire tile cache each frame.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 20:38:42 +00:00
Bobby Holley
585847b17a Bug 1583998 - Implement a pref to obscure images. r=gw
This approach does have some stacking issues. The way to fix this would
be to instrument the brush_image shader rather than adding debug rects.

Something like: #ifdef WR_FEATURE_SFW frag.color = vec4(0,1,1,1); #endif

That's slightly more involved though, so I'm going to leave it for now.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 21:48:35 +00:00
Bobby Holley
d599cb6095 Bug 1583998 - Refactor debug rectangles to allow the outer and inner colors to be explicitly specified. r=gw
The current code doesn't permit fully opaque debug rects.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 21:46:20 +00:00
Glenn Watson
b0ffdb3a87 Bug 1583460 - Refactor picture caching setup to simplify creating multiple slices. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D46907

--HG--
extra : moz-landing-system : lando
2019-09-24 20:09:19 +00:00
Andrew Osmond
9793f08b9b Bug 1581934 - Restore the calculation for a more precise picture local rect. r=kvark,gw
As it turns out, the difference between the snapped local rect and the
unsnapped local rect was not just that the former contained snapped
primitives and the latter contained unsnapped primitives, but also that
the former took into account surface inflation for primitives, the
entire clip chain instead of just the primitive's local clip, and
removal of culled primitives. As such, the picture's rects can be wildly
different, even if snapping has been taken care of earlier, and parts of
WebRender have come to rely upon this more accurate representation of a
picture.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 10:34:00 +00:00
Nicolas Silva
9b0314ab6a Bug 1582459 - Improve the clipping and segment documentation. r=kvark
Adds a module documentation in segment.rs giving an overview of the role of primitive segments and how they interact with clipping. Also reformatted the clip.rs documentation to play well with rustdoc.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 08:07:13 +00:00
arthur.iakab
5147f9a0ff Backed out changeset 43dbcbd6f57a (bug 1581934) for causing reftest failures on 1081185-1.html. 2019-09-24 06:17:53 +03:00
Timothy Nikkel
3311b640cc Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

--HG--
extra : moz-landing-system : lando
2019-09-24 02:40:27 +00:00
Andrew Osmond
c3f9baa23f Bug 1581934 - Restore the calculation for a more precise picture local rect. r=kvark,gw
As it turns out, the difference between the snapped local rect and the
unsnapped local rect was not just that the former contained snapped
primitives and the latter contained unsnapped primitives, but also that
the former took into account surface inflation for primitives, the
entire clip chain instead of just the primitive's local clip, and
removal of culled primitives. As such, the picture's rects can be wildly
different, even if snapping has been taken care of earlier, and parts of
WebRender have come to rely upon this more accurate representation of a
picture.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 23:58:44 +00:00
arthur.iakab
76632198c8 Backed out changeset da5d5eb153f2 (bug 1582273) for causing tidy bustages. CLOSED TREE 2019-09-24 03:14:33 +03:00
Timothy Nikkel
3c9a0952b5 Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

--HG--
extra : moz-landing-system : lando
2019-09-23 23:31:45 +00:00
Noemi Erli
c539b288a4 Backed out changeset 0574bc97e2ac (bug 1582273) for causing wrench build bustages CLOSED TREE 2019-09-24 00:55:58 +03:00
Noemi Erli
c9d5b4e3b5 Backed out changeset 56c82d00c513 (bug 1581934) for reftest failures CLOSED TREE 2019-09-24 00:53:30 +03:00
Timothy Nikkel
75996b49cc Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

--HG--
extra : moz-landing-system : lando
2019-09-23 21:41:18 +00:00
Andrew Osmond
32b92fbfc6 Bug 1581934 - Restore the calculation for a more precise picture local rect. r=kvark,gw
As it turns out, the difference between the snapped local rect and the
unsnapped local rect was not just that the former contained snapped
primitives and the latter contained unsnapped primitives, but also that
the former took into account surface inflation for primitives, the
entire clip chain instead of just the primitive's local clip, and
removal of culled primitives. As such, the picture's rects can be wildly
different, even if snapping has been taken care of earlier, and parts of
WebRender have come to rely upon this more accurate representation of a
picture.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 20:18:50 +00:00
Noemi Erli
728928781e Backed out changeset 195e629a7877 (bug 1582459) for causing wrench bustages CLOSED TREE 2019-09-23 21:07:24 +03:00
Nicolas Silva
ff7cdb1b4e Bug 1582459 - Improve the clipping and segment documentation. r=kvark
Adds a module documentation in segment.rs giving an overview of the role of primitive segments and how they interact with clipping. Also reformatted the clip.rs documentation to play well with rustdoc.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 15:04:19 +00:00
Glenn Watson
4f409d7a31 Bug 1581879 - Artifacts when zooming text on webrender on android. r=jnicol,nical
Fix scissor rect being incorrect during pinch zoom due to floating
point inaccuracies.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 08:13:57 +00:00
Cosmin Sabou
db07080d87 Backed out changeset 08f2148de713 (bug 1581757) for causing webrender reftest failures.
--HG--
extra : rebase_source : 6d41ee1b453c7433768f9b77b6f88483a4215f04
2019-09-19 07:40:01 +03:00
Jeff Muizelaar
4db1b2ef19 Bug 1582217. Drop unneeded image dependencies. r=kvark
We only use the png codec so let's save some link time by not including
the other codecs.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 22:04:47 +00:00
Glenn Watson
8836bc5265 Bug 1581757 - Support slicing the scene into an arbitrary number of picture cache slices r=nical
Previously, the setup_picture_caching function was hard coded
to support only a very specific shape of display list. With this
change, flags are added to PrimitiveCluster that can specify
if a picture cache slice should be created before / after this
cluster when picture caching is set up.

The usage of these flags in this patch matches the old behaviour,
so should not have any functional effect.

However, in future we will make use of this functionality to
create picture slices for a number of different use cases, such as:

 * Creating cache tiles for the UI.
 * Slicing the scene where there are video elements, in order to
   allow these to be composited directly by the OS. This may also
   apply to WebGL and/or canvas elements.
 * Slicing the scene when there is a very large fixed position
   background image or other element, to avoid invalidating the
   entire tile cache each frame.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 23:17:55 +00:00
Dzmitry Malyshau
9c34641992 Bug 1582198 - Remove nix dependency from Wrench r=jrmuizel
https://github.com/servo/webrender/pull/3736

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

--HG--
extra : moz-landing-system : lando
2019-09-18 17:51:27 +00:00
Glenn Watson
1cd0a0e783 Bug 1581677 - Fix consistency bug in WR dirty rect calculation. r=nical
This fixes a case where the is_same_content field was no longer
being reset to true before dependency calculation could occur.

In some cases, this could result in a tile being updated, but
the dirty rect being empty, which meant all primitives in that
tile would fail the visibility culling test.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 08:01:50 +00:00