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

43163 Коммитов

Автор SHA1 Сообщение Дата
Sergio Villar Senin 4e4273a599 Bug 1771515 - [webxr] Support Oculus Quest2 controllers. r=jgilbert
Add support for the oculus-touch-v3 (Quest2) input profile. As specified
in the XR input profile we're setting oculus-touch-v2, oculus-touch, and
generic-trigger-squeeze-thumbstick as fallback profiles.

Update the externalVR VRControllerType enum as well.

Co-authored-by: Imanol Fernandez <ifernandez@igalia.com>

Differential Revision: https://phabricator.services.mozilla.com/D147519
2022-06-02 05:10:17 +00:00
Lee Salzman 91acfa8f3f Bug 1771932 - Use more initializer lists in glsl.h. r=gfx-reviewers,gw
Avoid assigning to fields in the constructor body when it is constexpr.

Differential Revision: https://phabricator.services.mozilla.com/D148093
2022-06-02 03:19:07 +00:00
Razvan Cojocaru dab093953c Bug 1770289 - Change the return type of nsLayoutUtils::ComputeSuitableScaleForAnimation() to MatrixScales. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D147835
2022-06-01 23:19:11 +00:00
Glenn Watson 9abf4c300d Bug 1772049 - Use a surface for stacking contexts with backface-visible: false r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147828
2022-06-01 21:52:08 +00:00
Brad Werth 6af8eda593 Bug 1731136 Part 5: Make macOS native compositor and NativeLayerCA handle backdrop r=mstange
layers.


This makes the macOS native compositor claim the ability to handle color
layers and makes NativeLayerCA actually do it. Color layers have a different
structure than other layers. Color layers apply the color to the
wrappingCALayer, and have no contentCALayer at all. That means that the
color layers are always sized to the layer's clip rect.

This also contains a drive-by fix to handle the case where an mOpaquenessTintLayer
exists when mMutatedSpecializeVideo is set to true. Before this change, in such a
case, the opaqueness layer will not be associated with the recreated wrapping layer.

Depends on D128131

Differential Revision: https://phabricator.services.mozilla.com/D128545
2022-06-01 19:40:04 +00:00
Brad Werth 199e48dfac Bug 1731136 Part 4: Limit backdrops to the visible area. r=gw
This calculates the visible area of the TileCache, and compares against that area
for four purposes:

1) Backdrops must cover only the visible area, not the tile coverage area.
2) Primitives only obstruct the backdrop if they appear in the visible area.
3) Backdrop candidates opaque rects are clipped to the visible area.
4) Subpixel AA is allowed as long as the backdrop rect covers the visible
tiling area, not necessarily the entire tiling area.

All these changes ensure that if a tile coverage area is larger than the window,
backdrops are only considered and created for the visible area.

Note that this has no effect on the contents of tiles that intersect the
backdrop area, wholly or partly. Those tiles, per earlier parts of this
patch, are only set with is_visible=false, which means that they are not
sent to the compositor this frame. The tile surfaces still exist, etc.
This is all in alignment with the idea that we want the entire slice area
(covered by the tiles) to be ready to be scrolled in.

Differential Revision: https://phabricator.services.mozilla.com/D147566
2022-06-01 19:40:03 +00:00
Glenn Watson a48bfe124b Bug 1731136 Part 3: Make the tile_cache track compositor backdrop surfaces. r=gw
In addition to creating the backdrop surface when it is detected, this also
turns off the rendering of tiles in that same slice. Virtual tiles
associated with compositor surfaces (external or not) will still be
rendered.

This adds a clip check to avoid pushing tiles that are fully clipped out. It
also adds a similar check for compositor surfaces.

Depends on D127175

Differential Revision: https://phabricator.services.mozilla.com/D128131
2022-06-01 19:40:03 +00:00
Brad Werth c979bb1fd6 Bug 1731136 Part 2: Allow native compositors to handle surface backdrops. r=gw
This only allows native compositors to claim this capability, without changing
any compositors to do so. In Part 4, the macOS native compositor claims this
capability in conjunction with adding the code that handles the color layers.

Differential Revision: https://phabricator.services.mozilla.com/D127175
2022-06-01 19:40:02 +00:00
Brad Werth 6c7a45e39b Bug 1731136 Part 1: Extend compositor to manage backdrop surfaces. r=gw
This is all scaffolding that will be used by later parts of this patch
series.

Differential Revision: https://phabricator.services.mozilla.com/D128130
2022-06-01 19:40:02 +00:00
stransky 67f9cb618c Bug 1752494 [Linux] Enable VA-API on Nightly and Mesa >= 21.0 r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D147874
2022-06-01 17:52:34 +00:00
Molnar Sandor 307fd4a744 Backed out 5 changesets (bug 1731136) for causing reftest failures in layout/reftests/bugs/299136-1.html CLOSED TREE
Backed out changeset d2a56d51c65b (bug 1731136)
Backed out changeset a24467137e9b (bug 1731136)
Backed out changeset e127e41e12da (bug 1731136)
Backed out changeset 7dfdcb74d1c1 (bug 1731136)
Backed out changeset 6b5626a7b82d (bug 1731136)
2022-06-01 04:12:55 +03:00
Brad Werth 8626787faa Bug 1768824 Part 2: Set macOS transfer functions independently of colorSpace. r=media-playback-reviewers,alwu
This creates a helper function in a new class gfxMacUtils that makes the
software and hardware decoders use the same logic. The new class was
necessary because gfxUtils is included in many files that don't include
CoreFoundation headers and would hit namespace collision if it was included
there.

Differential Revision: https://phabricator.services.mozilla.com/D146735
2022-05-31 23:06:16 +00:00
Brad Werth a020cf9407 Bug 1768824 Part 1: Track transfer characteristics for BT709. r=media-playback-reviewers,alwu
BT709 transfer characteristics may be specified in videos even if they don't
use the BT709 colorSpace. This change also makes BT709 the default, since it
is the safest option for unspecified cases.

Differential Revision: https://phabricator.services.mozilla.com/D146734
2022-05-31 23:06:15 +00:00
Glenn Watson 64e35e6e1a Bug 1771561 - Fix incorrectly invalidating tiles with zero-sized backdrop filters r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147710
2022-05-31 22:55:32 +00:00
Glenn Watson fffb5f1ec1 Bug 1771556 - Handle backdrop capture failing clip check when sub-graph is visible r=gfx-reviewers,lsalzman
This can happen when there is a long nested chain of backdrop-filters
and float inaccuracies cause the final capture primitive to be culled.

Differential Revision: https://phabricator.services.mozilla.com/D147704
2022-05-31 22:55:32 +00:00
Brad Werth 47917e0be8 Bug 1731136 Part 5: Make macOS native compositor and NativeLayerCA handle backdrop r=mstange
layers.


This makes the macOS native compositor claim the ability to handle color
layers and makes NativeLayerCA actually do it. Color layers have a different
structure than other layers. Color layers apply the color to the
wrappingCALayer, and have no contentCALayer at all. That means that the
color layers are always sized to the layer's clip rect.

This also contains a drive-by fix to handle the case where an mOpaquenessTintLayer
exists when mMutatedSpecializeVideo is set to true. Before this change, in such a
case, the opaqueness layer will not be associated with the recreated wrapping layer.

Depends on D128131

Differential Revision: https://phabricator.services.mozilla.com/D128545
2022-05-31 22:21:15 +00:00
Brad Werth 3e0472c2f5 Bug 1731136 Part 4: Limit backdrops to the visible area. r=gw
This calculates the visible area of the TileCache, and compares against that area
for three purposes:

1) Backdrops must cover only the visible area, not the tile coverage area.
2) Primitives only obstruct the backdrop if they appear in the visible area.
3) Backdrop candidates opaque rects are clipped to the visible area.

All these changes ensure that if a tile coverage area is larger than the window,
backdrops are only considered and created for the visible area.

Note that this has no effect on the contents of tiles that intersect the
backdrop area, wholly or partly. Those tiles, per earlier parts of this
patch, are only set with is_visible=false, which means that they are not
sent to the compositor this frame. The tile surfaces still exist, etc.
This is all in alignment with the idea that we want the entire slice area
(covered by the tiles) to be ready to be scrolled in.

Differential Revision: https://phabricator.services.mozilla.com/D147566
2022-05-31 22:21:15 +00:00
Glenn Watson ac39164f78 Bug 1731136 Part 3: Make the tile_cache track compositor backdrop surfaces. r=gw
In addition to creating the backdrop surface when it is detected, this also
turns off the rendering of tiles in that same slice. Virtual tiles
associated with compositor surfaces (external or not) will still be
rendered.

This adds a clip check to avoid pushing tiles that are fully clipped out. It
also adds a similar check for compositor surfaces.

Depends on D127175

Differential Revision: https://phabricator.services.mozilla.com/D128131
2022-05-31 22:21:15 +00:00
Brad Werth 4b0f3f3d0f Bug 1731136 Part 2: Allow native compositors to handle surface backdrops. r=gw
This only allows native compositors to claim this capability, without changing
any compositors to do so. In Part 4, the macOS native compositor claims this
capability in conjunction with adding the code that handles the color layers.

Differential Revision: https://phabricator.services.mozilla.com/D127175
2022-05-31 22:21:14 +00:00
Brad Werth 5455eef7f6 Bug 1731136 Part 1: Extend compositor to manage backdrop surfaces. r=gw
This is all scaffolding that will be used by later parts of this patch
series.

Differential Revision: https://phabricator.services.mozilla.com/D128130
2022-05-31 22:21:14 +00:00
Jamie Nicol 2cf59fe695 Bug 1767128 - Rework and re-enable SurfaceControl rendering path on Android. r=agi,gfx-reviewers,aosmond
In bug 1762424 we introduced a rendering path on Android using the
SurfaceControl API, in order to work around a bug preventing recovery
from a GPU process crash. However, the initial implementation caused
this bug: repeatedly sending the same SurfaceControl objects over AIDL
to the GPU process resulted in them being leaked, eventually causing
severe display issues. Not only were we duplicating the SurfaceControl
for each widget, but each time a widget was resized too.

This patch reworks our usage of the SurfaceControl API to avoid ever
having to send them cross-process. Instead, we create a single child
SurfaceControl object for each SurfaceControl that is attached to a
widget. (Typically there will be a single one shared between all
widgets, changing only when the app is paused and resumed, which is
much fewer than one per widget per resize.)

In the parent process we obtain the Surfaces that will be rendered in
to from the child SurfaceControls, and only send those Surfaces to the
GPU process. Thankfully unlike SurfaceControls, sending Surfaces
cross-process does not cause leaks. When the GPU process dies we
simply destroy all of the child SurfaceControls, and recreate them
again on-demand.

Differential Revision: https://phabricator.services.mozilla.com/D147437
2022-05-31 18:41:07 +00:00
Mike Hommey 7b58e2b833 Bug 1771827 - Don't enable the aarch64_target_feature feature on rustc 1.61.0. r=gfx-reviewers,jrmuizel
because it's stable as of that version.

Differential Revision: https://phabricator.services.mozilla.com/D147706
2022-05-31 00:50:09 +00:00
Hiroyuki Ikezoe 43bb9dc340 Bug 1312165 - Parse scroll-snap-stop style and propagate it to APZ side. r=emilio,botond
Depends on D146147

Differential Revision: https://phabricator.services.mozilla.com/D145850
2022-05-31 00:45:11 +00:00
Hiroyuki Ikezoe 898933043c Bug 1312165 - Add a mochitest to make sure our special handling for page down/up scrolls. r=botond
In our scroll snap implementation, there's a special handling on a page
scrolling that the closest snap point in the same page before scrolling is prior
to the closest snap point in the next page. There was no test case to test the
behavior.

Differential Revision: https://phabricator.services.mozilla.com/D145849
2022-05-31 00:45:10 +00:00
Bas Schouten c1f8082a55 Bug 1770974: Collect telemetry on blob rasterization times. r=nical
Depends on D147224

Differential Revision: https://phabricator.services.mozilla.com/D147226
2022-05-30 14:49:18 +00:00
Emilio Cobos Álvarez a756db562a Bug 1769559 - Remove invalid assertion. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147631
2022-05-30 09:32:02 +00:00
Glenn Watson 76e7c0ef08 Bug 1771547 - Fix task graph dependencies with nested / sibling backdrop-filters r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147614
2022-05-30 06:17:30 +00:00
Glenn Watson 5f9af8e2cc Bug 1771573 - Fix popping incorrect number of clip roots r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147601
2022-05-29 23:52:29 +00:00
Dan Robertson ff6c4f5304 Bug 1744354 - Do not build print string for apz.printree logging unless the pref is enabled. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D147569
2022-05-29 00:52:36 +00:00
Botond Ballo 59f561e464 Bug 1770619 - Identify the async zoom container in the WebRenderScrollData dump. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147571
2022-05-28 21:55:54 +00:00
Botond Ballo bc6735e778 Bug 1770619 - In the content-side WebRenderScrollData dump, include the display item from which a WebRenderLayerScrollData node was created. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147009
2022-05-28 21:55:54 +00:00
stransky a3d16af2f2 Bug 1770407 [Linux] Remove GBM GL backend r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D147421
2022-05-28 20:13:42 +00:00
stransky c85f81924d Bug 1770407 [Linux] Use MESA_platform_surfaceless GL backed on Linux instead of GBM one r=jgilbert
MESA_platform_surfaceless provides better alternative to GBM GL backend so let's use that instead of GBM.

Differential Revision: https://phabricator.services.mozilla.com/D147420
2022-05-28 20:13:42 +00:00
Lee Salzman 063258e3b6 Bug 1771349 - Add some null checks to DrawTargetRecording. r=aosmond,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D147520
2022-05-28 04:05:51 +00:00
Dan Robertson 24e720ea06 Bug 1771364 - Add basic testing section to APZ docs. r=botond
Add a simple testing section to the APZ docs, that provides useful links, where
the tests are located, and a few practical tips.

Differential Revision: https://phabricator.services.mozilla.com/D147441
2022-05-27 20:44:02 +00:00
Butkovits Atila cf50f092e7 Backed out changeset 6b14bf7e1883 (bug 1771349) for causing crashtest failures. CLOSED TREE 2022-05-27 23:44:36 +03:00
Razvan Cojocaru 2add5dfe81 Bug 1770416 - axis lock switching should lock to an axis based on the lock angle. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D146998
2022-05-27 19:20:14 +00:00
David Shin bd41081544 Bug 1770217 - Move conversion between `layers::TimingFunction` and `ComputedTimingFunction` into `ComputedTimingFunction`. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D146836
2022-05-27 18:57:14 +00:00
Lee Salzman a7712554f4 Bug 1771349 - Add some null checks to DrawTargetRecording. r=aosmond,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D147520
2022-05-27 16:34:27 +00:00
Lee Salzman 23d9eba396 Bug 1771415 - Properly support subpixel AA in DrawTargetWebgl. r=aosmond,gfx-reviewers
It turns out subpixel AA handling is quite broken in DrawTargetWebgl. First,
we need to distinguish whether or not we are rendering bitmap or outline
fonts, so this adds a query MayUseBitmaps that tries to make a best guess
about whether the font has any bitmap glyphs in it.

If the font has bitmaps, then it might render grayscale bitmaps which use
the supplied color or color emoji which ignore the color. If the font is
just outlines, it may instead render subpixel AA which needs to be interpreted
as a subpixel mask rather than as a normal RGBA result. Thus, MayUseBitmaps
helps us distinguish what a potential rasterized color result is and how to
properly blend it.

Next, we use a similar blending strategy as for WebRender without dual-source
blending to blend the subpixel AA mask using a mode with a constant blend color.

Differential Revision: https://phabricator.services.mozilla.com/D147487
2022-05-27 16:07:15 +00:00
criss 59b9e1210a Backed out 4 changesets (bug 1731136) for causing Bug 1771465 . CLOSED TREE
Backed out changeset c333a19d8712 (bug 1731136)
Backed out changeset 6b5b4b5eb1e9 (bug 1731136)
Backed out changeset 7afa3f4b5a85 (bug 1731136)
Backed out changeset b408a3230170 (bug 1731136)
2022-05-27 17:39:43 +03:00
Emilio Cobos Álvarez ddb8e6f491 Bug 1771146 - Check for gbm availability correctly before trying to create a surface. r=stransky,jgilbert
(And try to make it cheaper).

Differential Revision: https://phabricator.services.mozilla.com/D147312
2022-05-27 07:35:44 +00:00
Glenn Watson 9c01ef38cd Bug 1771388 - Ensure backdrop capture has same clip as backdrop render r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147482
2022-05-27 05:38:29 +00:00
Glenn Watson af07735825 Bug 1771293 - Handle backdrop-filter chains that are culled due to being invisible r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147460
2022-05-26 23:43:27 +00:00
Glenn Watson 7989c0df4a Bug 1771294 - Skip drawing backdrop-filters with broken transforms r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147454
2022-05-26 23:43:26 +00:00
Brad Werth c3c7926d5a Bug 1768058: Add wrench tests for opacity on stretched images. r=gw
Bug 1752919 fixed the opacity issues for tiled images. This is an attempt to
replicate the testcases from that bug. The wrench frame capture of the problem case
shows Image display items with alpha color applied. This patch updates the yaml
frame reader to process color on Images, and the "image-alpha" wrench tests recreate
that scene. For completeness' sake, the tests also  check opacity derived from the
stacking context (which already worked).

Differential Revision: https://phabricator.services.mozilla.com/D147442
2022-05-26 21:12:50 +00:00
Lee Salzman 8aba061809 Bug 1685375 - Remove ScopedXErrorHandler. r=jgilbert
Avoid relying on X11 errors to detect failures where alternative means would
suffice (i.e. checking results for failure or MakeCurrent failures). All other
users of ScopedXErrorHandler outside of GLContextProviderGLX use it only to
ignore errors rather than actually check the error result. Given those concerns,
we also change the default X11 error handler to merely ignore errors rather than
abort, such that X11 calls in Gecko no longer require an error trap by default.
This also avoids contention with other libraries that may temporarily override
the error handler such as GDK or Cairo since Gecko will never touch the handler
after startup.

Differential Revision: https://phabricator.services.mozilla.com/D147247
2022-05-26 16:13:27 +00:00
Brad Werth 77aa170cdd Bug 1731136 Part 4: Make macOS native compositor and NativeLayerCA handle backdrop layers. r=mstange
This makes the macOS native compositor claim the ability to handle color
layers and makes NativeLayerCA actually do it. Color layers have a different
structure than other layers. Color layers apply the color to the
wrappingCALayer, and have no contentCALayer at all. That means that the
color layers are always sized to the layer's clip rect.

This also contains a drive-by fix to handle the case where an mOpaquenessTintLayer
exists when mMutatedSpecializeVideo is set to true. Before this change, in such a
case, the opaqueness layer will not be associated with the recreated wrapping layer.

Differential Revision: https://phabricator.services.mozilla.com/D128545
2022-05-26 15:24:13 +00:00
Glenn Watson 72efff0f6f Bug 1731136 Part 3: Make the tile_cache track compositor backdrop surfaces. r=gw
In addition to creating the backdrop surface when it is detected, this also
turns off the rendering of tiles in that same slice. Virtual tiles
associated with compositor surfaces (external or not) will still be
rendered.

This adds a clip check to avoid pushing tiles that are fully clipped out. It
also adds a similar check for compositor surfaces.

Differential Revision: https://phabricator.services.mozilla.com/D128131
2022-05-26 15:24:13 +00:00
Brad Werth 49ab728ca4 Bug 1731136 Part 2: Allow native compositors to handle surface backdrops. r=gw
This only allows native compositors to claim this capability, without changing
any compositors to do so. In Part 4, the macOS native compositor claims this
capability in conjunction with adding the code that handles the color layers.

Differential Revision: https://phabricator.services.mozilla.com/D127175
2022-05-26 15:24:12 +00:00