Граф коммитов

43 Коммитов

Автор SHA1 Сообщение Дата
Jamie Nicol 3e85fea00a Bug 1694707 - Select correct scroll root within fixed position items with dynamic toolbar. r=gw
Currently when selecting the scroll root for picture caching, if a
non-Zoom transform is encountered we give up and select the root
spatial node. This is because the transform may be non-axis aligned.

When the Fenix dynamic toolbar is enabled, fixed position items must
create a spatial node with an animated transform, so that they can be
positioned asynchronously by APZ when the toolbar moves.

The combination of these two things means for that scroll frames
within fixed position items we always select the root spatial node,
meaning that the entire contents invalidates continuously while
scrolling.

To fix this, add a flag to the Transform ReferenceFrameKind which
marks the transform as always being a 2D scale or translation. When
selecting the scroll root, we can continue searching through such
reference frames, as we already do for Zoom frames. Set this flag true
for references frames created due to the dynamic toolbar.
Additionally, assert that the transform is indeed a 2d scale or
translation after it is resolved.

The condition of the transform being only a 2d scale and translation
is shared with ReferenceFrameKind::Zoom, so that has been removed and
its uses updated to use this new flag instead. An additional
should_snap flag has also been added, so that we continue to snap zoom
transforms, and additionally snap the dynamic-toolbar related
transforms too.

Lastly, this adds some unit tests for find_scroll_root.

Differential Revision: https://phabricator.services.mozilla.com/D106809
2021-03-02 21:53:41 +00:00
Robert Mader 4a37011a09 Bug 1695507 - Fix build failure in example compositor, r=gw
We're only missing `redraw_on_invalidation` but lets make it more robust
for future additions.

Differential Revision: https://phabricator.services.mozilla.com/D106732
2021-02-28 20:23:21 +00:00
sotaro ef7c05b5a5 Bug 1690145 - Get the example compositor building again r=jrmuizel
2 rectangles are added for  Bug 1638709. With them flickering of Bug 1638709 becomes easier to reproduce.

Differential Revision: https://phabricator.services.mozilla.com/D104480
2021-02-09 02:08:13 +00:00
Markus Stange 8509639277 Bug 1686635 - Reformat example-compositor C++ code. r=gw
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D101318
2021-01-14 04:25:21 +00:00
Glenn Watson 422112d55d Bug 1683242 - Make external_scroll_id required when defining scroll frames. r=nical,aosmond
It's always supplied by Gecko anyway, and being able to rely on this
will make it easier to create stable spatial node IDs that persist
across display lists.

Differential Revision: https://phabricator.services.mozilla.com/D100076
2020-12-18 16:02:55 +00:00
Markus Stange 7b0ccf01a3 Bug 1677929 - Add a way to specify an ID for a generated frame, and propagate the ID to the APZSampler. r=gw,kats
This ID allows the compositor to track per-frame information from frame
generation, through APZ sampling, to the NotifyDidRender notification.

Differential Revision: https://phabricator.services.mozilla.com/D97535
2020-12-09 03:35:50 +00:00
Glenn Watson 3170eddbd0 Bug 1675414 - Fix incorrect skipping of composites in some cases. r=nical
In the following circumstances, WR was failing to detect a
composite was required:
 - There is a picture cache slice that is smaller than a single tile.
 - The position of that picture cache slice is changed.
 - No other content invalidations occur.

This clip rect in the composite descriptor must include the
device_valid_rect rather than the tile device_rect. This ensures
that in the case of a picture cache slice that is smaller than a
single tile, the clip rect in the composite descriptor will change
if the position of that slice is changed. Otherwise, WR may conclude
that no composite is needed if the tile itself was not invalidated
due to changing content.

Differential Revision: https://phabricator.services.mozilla.com/D96966
2020-11-17 19:24:16 +00:00
Jamie Nicol e17f6c30ce Bug 1661528 - Update gleam to 0.13.1. r=kvark
Provides glBufferStorage and glFlushMappedBufferRange, and fixes
glClientWaitSync's return type.

Differential Revision: https://phabricator.services.mozilla.com/D96023
2020-11-07 00:30:09 +00:00
Glenn Watson c1e5418cb9 Bug 1674690 - Remove DocumentLayer while retaining the rest of the Document API. r=nical
This removes some of the complexity in the renderer associated with
drawing multiple document layers in a single render. It retains
the rest of the document API, which will be used to implement the
functionality in bug #1654938.

Differential Revision: https://phabricator.services.mozilla.com/D95478
2020-11-02 20:27:58 +00:00
Glenn Watson b4aecd470f Bug 1670842 - Pt 1 - Remove option to disable picture caching. r=jnicol
This patch removes the public API and high level logic for
disabling picture caching for debugging and pinch-zoom in
some cases.

Follow up patches will remove and simplify the internal parts
of WR that remain to handle the disabled picture caching
code path.

Differential Revision: https://phabricator.services.mozilla.com/D93446
2020-10-14 06:06:45 +00:00
Glenn Watson 5eb6500eff Bug 1669567 - Use fixed size texture arrays for picture cache slices. r=jnicol
Previously we used a single texture array for a given tile size,
and resized the texture array as more tiles were needed.

However, this results in expensive driver stalls and GPU copy times
when resizing the array.

Instead, use a fixed slice count for each texture array, and support
multiple textures with the same tile size.

This may result in slightly more draw calls during compositing of
picture cache tiles due to batch breaks, but will remain a small
number due to the limited number of picture cache tiles that are
allocated at any one time.

Differential Revision: https://phabricator.services.mozilla.com/D92715
2020-10-07 21:58:06 +00:00
Glenn Watson 33a3e935da Bug 1656820 - Remove content_size from scene pipeline. r=nical
Previously, the content_size was used when defining an iframe
to set the size of the root scrollable area.

However, this was never useful (the root pipeline scroll frame
is not considered a scroll root, it's more of a placeholder).
The scroll frame for content is typically defined within the
iframe display list (which also allows non-scrolled content
within the iframe, such as a background rectangle color).

The existing content_size was causing problems in Gecko because
there are some snapping / rounding inaccuracies with fractional
DPI ratios, resulting in root scroll frames with +/- 1 pixel
scrollable size.

The simplest fix for this is to remove content_size altogether
and rely on the iframe display item to define the content size
of the root scroll frame for a pipeline.

Differential Revision: https://phabricator.services.mozilla.com/D85719
2020-08-03 20:57:30 +00:00
Jeff Muizelaar 6613f1b6b7 Bug 1646741 - Update gleam to 0.12. r=kvark
For stride calculation and SSBOs

Differential Revision: https://phabricator.services.mozilla.com/D80191
2020-06-18 18:11:13 +00:00
Coroiu Cristina 96536abc93 Backed out changeset 9367aa4b97e2 (bug 1646741) for wrench failures on a CLOSED TREE 2020-06-18 21:03:36 +03:00
Jeff Muizelaar c326a65a01 Bug 1646741 - Update gleam to 0.12. r=kvark
For stride calculation and SSBOs

Differential Revision: https://phabricator.services.mozilla.com/D80191
2020-06-18 15:02:08 +00:00
Glenn Watson 63892870eb Bug 1632705 - Part 1 - Remove complex clips from scroll frame definitions. r=kats,Bert
They aren't used, so can easily be removed as the first part of
this seried of patches.

If this functionality is ever required, it can be handled by the
caller defining complex clip nodes explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D72261
2020-04-24 18:29:38 +00:00
Glenn Watson a252244f3c Bug 1632389 - Remove image mask support from scroll layer API. r=nical
This is not used, so we can remove it as the first part of modifying
the public clip API in order to allow some internal optimizations.

If callers ever want to make use of this in future, it can be
achieved by placing an image mask clip node in the clip chain for
the primitives in the scroll layer.

Differential Revision: https://phabricator.services.mozilla.com/D72099
2020-04-23 11:39:42 +00:00
Glenn Watson f276147e7f Bug 1630480 - Update gleam GL bindings to 0.11.0 r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D71133

--HG--
extra : moz-landing-system : lando
2020-04-16 02:13:31 +00:00
Glenn Watson bdde050f84 Bug 1625816 - Fix rectangle display item bounds being affected by display port clip. r=nical
This can cause extra invalidations in picture caching.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 10:01:26 +00:00
Lee Salzman 757d9d309f Bug 1612941 - update gleam version to allow implementation of Gl trait. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65615

--HG--
extra : moz-landing-system : lando
2020-03-13 18:22:45 +00:00
shindli 8a8793039d Backed out 12 changesets (bug 1612941) for webrender linting bustage CLOSED TREE
Backed out changeset bbb8ec38f354 (bug 1612941)
Backed out changeset cd798d2a0433 (bug 1612941)
Backed out changeset c02c4c5bf7f7 (bug 1612941)
Backed out changeset 2e0c9b9bd507 (bug 1612941)
Backed out changeset ec0fffd12dec (bug 1612941)
Backed out changeset 2d6f65fe6ec0 (bug 1612941)
Backed out changeset dd1a92041bb4 (bug 1612941)
Backed out changeset 3cae17a5ec80 (bug 1612941)
Backed out changeset edfca5676513 (bug 1612941)
Backed out changeset f94d5c7cee41 (bug 1612941)
Backed out changeset 67bba000daba (bug 1612941)
Backed out changeset 60151122db4d (bug 1612941)
2020-03-11 14:28:55 +02:00
Lee Salzman 874d7bc3e6 Bug 1612941 - update gleam version to allow implementation of Gl trait. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65615

--HG--
extra : moz-landing-system : lando
2020-03-11 12:05:13 +00:00
shindli 0830b5e7f8 Backed out 12 changesets (bug 1612941) for causing bustages CLOSED TREE
Backed out changeset 29f9f745ff65 (bug 1612941)
Backed out changeset d92e03315f8d (bug 1612941)
Backed out changeset 9b1360daa75a (bug 1612941)
Backed out changeset ad7f43d72b08 (bug 1612941)
Backed out changeset 30b28118362a (bug 1612941)
Backed out changeset 76f80dce8875 (bug 1612941)
Backed out changeset 375896f494ae (bug 1612941)
Backed out changeset bd8ba66dc2ac (bug 1612941)
Backed out changeset 54ec5a6e8e45 (bug 1612941)
Backed out changeset 419105739e53 (bug 1612941)
Backed out changeset c198dedeaa1b (bug 1612941)
Backed out changeset 87ddcdfc5fcf (bug 1612941)
2020-03-11 14:01:26 +02:00
Lee Salzman a7cc74fee1 Bug 1612941 - update gleam version to allow implementation of Gl trait. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65615

--HG--
extra : moz-landing-system : lando
2020-03-11 11:32:40 +00:00
Jeff Muizelaar efa59f1e9f Bug 1615694. Declare our render targets up front to ANGLE. r=kvark
This should remove the allocation and copy in
TextureD3D::ensureRenderTarget() in some situations.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 18:33:48 +00:00
Arthur Iakab e352a29c70 Backed out changeset 106776ac6c20 (bug 1615694) for tidy build bustages.
CLOSED TREE
2020-02-18 18:27:23 +02:00
Jeff Muizelaar 260a5680ee Bug 1615694. Declare our render targets up front to ANGLE. r=kvark
This should remove the allocation and copy in
TextureD3D::ensureRenderTarget() in some situations.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 14:59:03 +00:00
Jeff Muizelaar cce8fe4d25 Bug 1610949 - Only use WS_EX_NOREDIRECTIONBITMAP when using DirectComposition. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D60744

--HG--
extra : moz-landing-system : lando
2020-01-22 21:23:35 +00:00
Glenn Watson 74722337a2 Bug 1607352 - Support DirectComposition virtual surface API. r=sotaro
Adds an #ifdef to the DCLayerTree implementation that allows
selecting whether to use the virtual surface API (enabled by
default) or the regular DC surface API.

For now, this is a compile-time switch. As a follow up to this,
we will support both options at runtime (for example, using the
regular surface API for surfaces that have holes or translucency).

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

--HG--
extra : moz-landing-system : lando
2020-01-07 20:42:58 +00:00
Glenn Watson 3aa1137e6f Bug 1604684 - Make opacity a compositor surface property rather than a tile property. r=sotaro
This will allow use of the DirectComposition virtual surface API. If
it turns out that some pages recreate surfaces a lot due to opacity
changing, we can add some extra logic to avoid recreating surfaces
as often, and making use of per-tile opacity in some cases.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 20:11:21 +00:00
Glenn Watson 3aeeba2db2 Bug 1604383 - Refactor the Compositor trait to allow support for DC virtual surface API. r=mstange,sotaro
Differential Revision: https://phabricator.services.mozilla.com/D57415

--HG--
extra : moz-landing-system : lando
2019-12-17 21:44:03 +00:00
Glenn Watson 739fd11cac Bug 1602992 - Add power profiling modes to example-compositor application. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D56653

--HG--
extra : moz-landing-system : lando
2019-12-11 07:13:34 +00:00
Glenn Watson 7976812278 Bug 1599000 - Make the WR example compositor application more realistic. r=nical
Adds more picture cache slices to the example application, and makes
the visual tree layer update match the strategy that Gecko uses.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 18:01:53 +00:00
Glenn Watson ae587eeebc Bug 1598448 - Change compositor example to use EGLImage instead of pbuffer. r=sotaro
Update the example compositor implementation to use the faster
EGLImage technique that the Gecko implementation now uses.

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

--HG--
extra : moz-landing-system : lando
2019-11-24 19:52:32 +00:00
Daniel Varga 19e8a51a77 Backed out changeset 59e0b3d74d19 (bug 1598448) for webrender-lint-tidy fail. On a CLOSED TREE 2019-11-22 03:45:45 +02:00
Glenn Watson 7c0b1bcdc7 Bug 1598448 - Change compositor example to use EGLImage instead of pbuffer. r=sotaro
Update the example compositor implementation to use the faster
EGLImage technique that the Gecko implementation now uses.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 23:40:57 +00:00
Glenn Watson 0c98790154 Bug 1591627 - Add support for specifying surface opacity to OS compositor interface. r=mstange,kvark
Differential Revision: https://phabricator.services.mozilla.com/D51033

--HG--
extra : moz-landing-system : lando
2019-10-30 20:49:44 +00:00
Razvan Maries ee9116f875 Backed out changeset 598b2d26c136 (bug 1591627) as per Glenn's request. CLOSED TREE 2019-10-30 22:05:32 +02:00
Glenn Watson 207356d08d Bug 1591627 - Add support for specifying surface opacity to OS compositor interface. r=mstange,kvark
Differential Revision: https://phabricator.services.mozilla.com/D51033

--HG--
extra : moz-landing-system : lando
2019-10-30 18:05:49 +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
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