Commit Graph

998 Commits

Author SHA1 Message Date
Glenn Watson
1a277253b9 Bug 1591534 - Ensure native surfaces are destroyed on renderer deinit. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D50775

--HG--
extra : moz-landing-system : lando
2019-10-29 00:32:50 +00:00
Glenn Watson
7f20e257e6 Bug 1591524 - Clean up native compositor surfaces that are not retained. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D50773

--HG--
extra : moz-landing-system : lando
2019-10-29 00:32:20 +00:00
Glenn Watson
074c0fe3ca Bug 1591527 - Integrate partial repainting with OS compositor surfaces. r=kvark,mstange
This passes the existing dirty rect for a picture cache update
through the native compositor interface, allowing compositors
to only update a sub-rect of a tile.

Also update the example to pass dirty rect to DirectComposition,
and add debug drawing for compositor redraw region.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:56:42 +00:00
Glenn Watson
d9b66a11dc Bug 1591837 - Support specification of FBO id in native compositor interface. r=mstange
Platform differences between DirectComposition and CoreAnimation
mean that WR needs to bind the FBO ID that the underlying platform
returns as part of the surface binding operation.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:38:57 +00:00
Glenn Watson
af909bd6ee Bug 1591223 - Tidy up the WR renderer options for partial present and native compositing. r=kvark
This patch is a small refactor of the public and internal structures
for options related to partial present and native compositing. It
doesn't contain any functional changes.

It adds a field to the native compositing setup to allow clients to
express whether dirty rect updates are supported when native compositing
is enabled (not currently used but will be enabled soon).

It also removes the partial present config options, and makes them
part of the default / draw compositing mode.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 19:51:24 +00:00
sotaro
11d9c7b7fa Bug 1591346 - Remove EGL_ANGLE_experimental_present_path usage with WebRender r=gw
EGL_ANGLE_experimental_present_path was enabled for fast rendering to SwapChain by ANGLE. But current gecko does not request ANGLE to render to SwapChain for WebRender. Then we do not need to use EGL_ANGLE_experimental_present_path anymore. But Its usage still has a side effect that y is flipped. But OS compositor implementation on Windows does not want it. And it seems not good to continue to use EGL_ANGLE_experimental_present_path since it is experimental feature.

But when EGL_ANGLE_experimental_present_path is removed, rendering result of frame buffer is y flipped with ANGLE compared to other OpenGL implementation. It needs to be handled in WR. It is similar to chromium.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 00:56:41 +00:00
Glenn Watson
16bde5fcfd Bug 1590284 - Construct picture cache slices for scroll roots. r=kvark
With this patch, picture cache slices are constructed each time
a new scroll root is established. This reduces rasterization
cost on pages that have large fixed position elements, and pages
that contain multiple scroll roots.

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

--HG--
extra : moz-landing-system : lando
2019-10-27 19:12:08 +00:00
Markus Stange
8785168981 Bug 1591752 - FFI for WebRender OS compositor integration: Create WrCompositor struct which implements the webrender::Compositor trait and calls through to virtual methods on RenderCompositor. r=sotaro
This patch was largely written by Sotaro.

This patch also adds an off-by-default pref gfx.webrender.compositor that currently does nothing.

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

--HG--
extra : moz-landing-system : lando
2019-10-27 01:18:27 +00:00
Glenn Watson
a457606700 Bug 1589512 - Part 2 - Add example DirectComposite webrender integration. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D49869

--HG--
extra : moz-landing-system : lando
2019-10-23 20:35:55 +00:00
Glenn Watson
dd724015d2 Bug 1589512 - Part 1 - Add OS compositor interface to webrender. r=kvark,mstange
Differential Revision: https://phabricator.services.mozilla.com/D49868

--HG--
extra : moz-landing-system : lando
2019-10-23 20:15:58 +00:00
Alex Touchet
501ce471f9 Bug 1590553 - Dedupe synstructure r=jrmuizel
[import_pr] From https://github.com/servo/webrender/pull/3779

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

--HG--
extra : moz-landing-system : lando
2019-10-22 23:29:01 +00:00
Emilio Cobos Álvarez
54404e676b Bug 1590060 - Update unicode-xid in peek-poke-derive. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D49893

--HG--
extra : moz-landing-system : lando
2019-10-21 13:04:54 +00:00
Nicolas Silva
fe6102fc27 Bug 1583841 - Adjust expected gpu cache blocks constants. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D49622

--HG--
extra : moz-landing-system : lando
2019-10-17 15:39:37 +00:00
Jeff Muizelaar
8696184851 Bug 1589661. Switch WebRender AppVeyor CI to rust 1.36. r=kvark
This fixes a recent build error.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 14:28:15 +00:00
Nicolas Silva
cee2912fd6 Bug 1589319 - Add some picture caching documentation. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D49566

--HG--
extra : moz-landing-system : lando
2019-10-18 08:46:45 +00:00
Nicolas Silva
cd34415e10 Bug 1583841 - Don't set an expected range for the FPS counter. r=gw
When we are not scrolling or animating it can be normal for there to be a long pause between frames, in which case highlighting the FPS counter in the profiler is distracting.

Depends on D49619

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

--HG--
extra : moz-landing-system : lando
2019-10-18 01:11:17 +00:00
Nicolas Silva
2baf1ffc83 Bug 1583841 - Highlight values in red in the full and compact profilers when values are outside their expected range. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D49619

--HG--
extra : moz-landing-system : lando
2019-10-18 01:10:19 +00:00
Nicolas Silva
50edeec550 Bug 1583841 - Include some ResourceProfileCounters in the smart profiler. r=gw
Depends on D49617

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

--HG--
extra : moz-landing-system : lando
2019-10-18 01:09:17 +00:00
Nicolas Silva
2e5413d663 Bug 1583841 - Add an expected range in ResourceProfileCounter. r=gw
Depends on D49438

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

--HG--
extra : moz-landing-system : lando
2019-10-18 01:08:17 +00:00
Nicolas Silva
bfc2b52283 Bug 1589119 - Add profile counters for rendered and total number of picture cache tiles. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D49438

--HG--
extra : moz-landing-system : lando
2019-10-18 01:03:07 +00:00
skierpage
d101684601 Bug 1587650 - Update README.md with more informative intro r=gw
Addresses issues with the README in [mozilla bug 1587650](https://bugzilla.mozilla.org/show_bug.cgi?id=1587650).
[import_pr] From https://github.com/servo/webrender/pull/3772

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

--HG--
extra : moz-landing-system : lando
2019-10-18 01:04:50 +00:00
Nicolas Silva
c9239b0fe8 Bug 1588467 - Remove unused methods. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D49130

--HG--
extra : moz-landing-system : lando
2019-10-17 13:05:31 +00:00
Nicolas Silva
6a93f75199 Bug 1588467 - Use AverageIntProfileCounter instead of IntProfileCounter in some places. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D49129

--HG--
extra : moz-landing-system : lando
2019-10-17 13:05:17 +00:00
Nicolas Silva
898c4ff8bd Bug 1588467 - Implement AverageTimeProfileCounter on top of AverageIntProfileCounter. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D49128

--HG--
extra : moz-landing-system : lando
2019-10-17 13:05:05 +00:00
Nicolas Silva
cecca9135c Bug 1588467 - Implement AverageIntProfileCounter. r=gw
AverageIntProfileCounter records the average and maximum of sampled interger values over time slices of half a second. Using it instead of IntProfileCounter in some places will make it easier to notice single-frame spikes.

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

--HG--
extra : moz-landing-system : lando
2019-10-17 13:04:47 +00:00
Nicolas Silva
3df2348614 Bug 1583841 - Define some expected ranges for webrender's smart profiler. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D48970

--HG--
extra : moz-landing-system : lando
2019-10-17 13:04:30 +00:00
Nicolas Silva
f1db815413 Bug 1583841 - Add a smart profiler HUD. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D48969

--HG--
extra : moz-landing-system : lando
2019-10-17 13:04:17 +00:00
Kris Taeleman
8205a49853 Bug 1585801 - Fixing crash when folder is not writable and refactored logic. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D48999

--HG--
extra : moz-landing-system : lando
2019-10-15 17:03:22 +00:00
Glenn Watson
1cca72e311 Bug 1587676 - Allocate picture caching tile surfaces later during the frame. r=nical,kvark
Instead of allocating a tile surface from the texture cache during
the tile post_update method, this is now deferred until the
take_context method of picture.

This will allow a simple CPU occlusion culling pass to run after
all the tile cache dependency updates (when the visible tiles and
rects are know), but before the surfaces are allocated. In this way,
we will be able to skip allocating, rasterizing and compositing
any tiles that are eliminated by the occlusion culling test.

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

--HG--
extra : moz-landing-system : lando
2019-10-13 20:24:40 +00:00
Jeff Muizelaar
8a440a3269 Bug 1587198. Wrench: Supported saving images with strides != width*bytes_per_pixel. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D48602

--HG--
extra : moz-landing-system : lando
2019-10-09 18:58:08 +00:00
arthur.iakab
604018cb2e Backed out changeset 42d3ccf69629 (bug 1583879) for causing reftest failures on sort-startSame-1b.svg CLOSED TREE 2019-10-11 18:27:52 +03:00
Nicolas Silva
c1f7e63ce2 Bug 1583879 - Skip uploading and rendering empty blob tiles. r=jrmuizel
This patch adds a notion of "fully transparent" image in the resource cache.
These are not uploaded in the texture cache and image requests return the
necessary information to allow the frame building code to skip emitting
primitives accordingly.

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

--HG--
extra : moz-landing-system : lando
2019-10-09 13:34:51 +00:00
Dzmitry Malyshau
1cc5f88f07 Bug 1558167 - Force 256 alignment for texture uploads on AMD on macOS r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D48862

--HG--
extra : moz-landing-system : lando
2019-10-10 15:25:57 +00:00
Emilio Cobos Álvarez
b320aa695c Bug 1587468 - Add syn/quote/etc to the list of allowed duplicated WR dependencies for now. r=bustage
MANUAL PUSH: bustage
2019-10-09 23:06:09 +02:00
Emilio Cobos Álvarez
3a4be043a8 Bug 1587468 - Update syn / quote / synstructure in peek-poke-derive. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D48732

--HG--
extra : moz-landing-system : lando
2019-10-09 17:10:12 +00:00
Jamie Nicol
523db48f57 Bug 1587047 - Update wrench reftest expectations. r=gw
Depends on D48541

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

--HG--
extra : moz-landing-system : lando
2019-10-08 20:18:50 +00:00
Jamie Nicol
fb307f9307 Bug 1587047 - Ensure PBO is at least height * stride size to avoid emulator error. r=gw
When uploading texture data with a PBO we currently ensure the PBO
is the size of `(height - 1) * stride + (width * bpp)`, ie the final row
only contains the width's worth of data, not the stride. This should
be okay, and works fine on other implementations, but the android
emulator thinks it is invalid and emits a GL_INVALID_OPERATION error
in the glTexSubImage* call. To avoid this, ensure that the PBO is the
full `height * stride` size.

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

--HG--
extra : moz-landing-system : lando
2019-10-08 20:18:28 +00:00
Glenn Watson
59f6ac9ee1 Bug 1587084 - Fix non-picture-caching path on webrender. r=kvark
The framebuffer clear was accidentally removed due to a rebase
error. We need to clear the framebuffer (and z) here when the
non-picture caching path is active.

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

--HG--
extra : moz-landing-system : lando
2019-10-08 20:44:56 +00:00
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