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

16722 Коммитов

Автор SHA1 Сообщение Дата
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
Botond Ballo f9a2c18bfe Bug 1743731 - Disable the 'two layers that scroll together' assertion for content being presented in a paginated way. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D146972
2022-05-21 17:52:44 +00:00
Dan Robertson 62e4d2a991 Bug 1759627 - Dump the WebRenderScrollLayerData on the compositor side. r=botond
When adding APZC info to the APZ tree log when apz.printtree=true, dump the
WebRenderScrollLayerData.

Differential Revision: https://phabricator.services.mozilla.com/D146248
2022-05-20 22:38:57 +00:00
Andrew Osmond 2b6582e69d Bug 1768197 - Handle WebRenderError errors more gracefully. r=jrmuizel
WebRenderErrors errors after initialization will often be memory/driver
related. We can try to recover from this more gracefully by tearing down
the compositors instead of just crashing when we have finished falling
back. If one has a GPU process, it will be killed, and otherwise, it
will simulate a device reset in the parent process. This graceful
recovery can only be used if the process is declared "stable", according
to existing criteria for the GPU process (minimum uptime and frames
composited).

Differential Revision: https://phabricator.services.mozilla.com/D146477
2022-05-20 17:02:55 +00:00
sotaro 4f8549101c Bug 1766282 - Do not use SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy r=jgilbert,jrmuizel,gfx-reviewers
With CI's NVIDIA GPU, SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy caused rendering problem. When SharedHandle is not used, the rendering problem did not happen. But when video is rendered to WebGL texture, SharedHandle need to be used.
In this case, D3D11TextureIMFSampleImage copies original ID3D11Texture2D to a new ID3D11Texture2D and use a shared handled of the copied texture. And no video copy of future video frames are disabled.

NoCopyNV12Texture is renamed to ZeroCopyNV12Texture to clarify its meaning.

Differential Revision: https://phabricator.services.mozilla.com/D144598
2022-05-20 04:37:53 +00:00
Botond Ballo ba36d37c46 Bug 1765204 - Add a mochitest. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D146368
2022-05-19 23:00:02 +00:00
sotaro 937f83f147 Bug 1769196 - Fix D3D11TextureIMFSampleImage::GetAsSourceSurface() r=jrmuizel,gfx-reviewers
There is a case that mSize and size of mTexture are different. In this case, size of SourceSurface becomes different from mSize.

Differential Revision: https://phabricator.services.mozilla.com/D146279
2022-05-19 15:17:49 +00:00
Dan Robertson 20fb4c3c3d Bug 1713403 - Implement dominant axis scrolling on mac. r=botond
Implement dominant axis scrolling on mac by using the default axis
locking mode (sticky), setting the locking angle to 45 degrees, and
setting the breakout angle to 45 degrees.

Depends on D146609

Differential Revision: https://phabricator.services.mozilla.com/D146610
2022-05-19 02:00:06 +00:00
Dan Robertson c5601faab7 Bug 1713403 - Implement axis lock switching for the sticky axis lock mode. r=botond
When in STICKY axis locking mode and the axis lock is broken, lock onto
the opposite axis, if the input angle is within the breakout_angle from
the opposite axis.

Depends on D144854

Differential Revision: https://phabricator.services.mozilla.com/D146609
2022-05-19 02:00:05 +00:00
Dan Robertson 9aead19587 Bug 1713403 - Implement axis locking for PanGestureInput momentum scrolls. r=botond
When in the STANDARD or STICKY axis locking mode, ensure that axis locks
are held through the state transition from panning on the x or y axis
into the momentum scroll. This change only implements this form of
momentum scroll axis locking when the momentum scroll occurs due to a
momentum pan gesture, which currently only occurs on mac.

Differential Revision: https://phabricator.services.mozilla.com/D144854
2022-05-19 02:00:05 +00:00
Razvan Cojocaru ae67e4906d Bug 1767121 - Change the type of StackingContextHelper::mScale to MatrixScales. r=botond
Fix a minor typo while at it: "Inherrited" -> "Inherited".

Differential Revision: https://phabricator.services.mozilla.com/D146298
2022-05-19 01:45:52 +00:00
sotaro 15b053536d Bug 1769900 - Add more logs of window size sanity check around nsWindow r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146658
2022-05-18 15:15:41 +00:00
Glenn Watson cebe610723 Bug 1768983 - Add prim flag for checkerboarding backgrounds r=gfx-reviewers,lsalzman
Although not needed right now (checkerboarding backgrounds get
a slice anyway due to being a different scroll root), this will
be important for the upcoming work to make backdrop filter
roots implicit. This allows WR to know when slicing up a content
slice if the prim is relevant to the backdrop root.

Differential Revision: https://phabricator.services.mozilla.com/D146145
2022-05-15 21:54:25 +00:00
stransky bb661c9f44 Bug 1759784 [Linux] Add widthAligned / heightAligned to SurfaceDescriptorDMABuf r=sotaro
We need transfer aligned surface size, VA-API add extra width/height to decoded surface to keep 16px alignment
and some GL drivers (like AMD) refuses to create EGLImage when stride and width does not match (Bug 1724385).

Differential Revision: https://phabricator.services.mozilla.com/D146084
2022-05-14 06:48:36 +00:00
Butkovits Atila c8300b624b Backed out changeset 2c1cd96c5acf (bug 1207753) for causing xpcshell failures. CLOSED TREE 2022-05-13 06:07:05 +03:00
Dan Robertson 13f518e1ce Bug 1766898 - Update scroll linked effect tests to use await. r=hiro
- Update the APZ scroll linked effect mochitest to await for
   synthesizeNativeWheel.
 - Call synthesizeNativeWheel in a setTimeout callback to ensure the
   eventTimeStamp is an interval.

Differential Revision: https://phabricator.services.mozilla.com/D145878
2022-05-13 01:48:41 +00:00
sotaro 0bf1498ed8 Bug 1763503 - Hold layers::CanvasRenderer in ClientWebGLContext::mNotLost r=jgilbert,gfx-reviewers
bug 1733732 decreased the size of the display port on Android. When you scroll to the bottom of the page, the canvas leaves the display port. It triggers to destroy WebRenderCanvasData and WebRenderCanvasRendererAsync. And then RenderAndroidSurfaceTextureHost::NotifyNotUsed() is called and RenderAndroidSurfaceTextureHost is destroyed.

Then if scrolling makes the canvas into the display port again, WebRenderCanvasData, WebRenderCanvasRendererAsync and RenderAndroidSurfaceTextureHost are recreated again. But there is no rendering update at SharedSurface_SurfaceTexture. Since the page does WebGL rendering only once during page load.

It caused the problem to RenderAndroidSurfaceTextureHost. RenderAndroidSurfaceTextureHost::NotifyNotUsed() returns SurfaceTexture's buffer to client side. For using SurfaceTexture again in RenderAndroidSurfaceTextureHost, Client side needs to do re-rendering to SurfaceTexture. But SharedSurface_SurfaceTexture did nothing in this case.

To address the problem, we could hold layers::CanvasRenderer in ClientWebGLContext::mNotLost. If WebRenderCanvasRendererAsync is kept alive, RenderAndroidSurfaceTextureHost::NotifyNotUsed() and destruction of WebRenderCanvasRendererAsync do not happen.

Then if WebRenderCanvasData is re-created, the stored WebRenderCanvasRendererAsync is set in the new WebRenderCanvasData in ClientWebGLContext::UpdateWebRenderCanvasData().

Differential Revision: https://phabricator.services.mozilla.com/D143811
2022-05-13 00:17:42 +00:00
Timothy Nikkel de210256d9 Bug 1769020. Fix up and re-enable browser/base/content/test/general/browser_gestureSupport.js. r=hiro
The bulk of the changes are to make the sending of events much more similar to how widget/tests/browser/browser_test_swipe_gesture.js works (because that is a test that is currently working well).

browser_test_swipe_gesture.js opens a tab and uses tab.linkedBrowser to target the events. This makes sense because when we add the event listeners here https://searchfox.org/mozilla-central/rev/b72e9d7d63bf499d1d8168291b93d4ec7fde236e/browser/base/content/browser-gestureSupport.js#49 we add them to the tabbox.

We create synthesizeSimpleGestureEvent in apz_test_native_event_utils.js so we can target other elements (rather than widget relative coords) more easily. This makes several functions async so we propagate that through.

We also change the coords from 0,0 to 10,10 to make sure it's within the bounds of the tabbox event listener (not sure if this is necessary or not, I didn't test without this).

And then I ran eslint on the file. That's should cover everything, hopefully that explanation makes review relatively easy.

Differential Revision: https://phabricator.services.mozilla.com/D146160
2022-05-12 23:40:13 +00:00
Randell Jesup 51bef01704 Bug 1207753: Add thread-safety annotations to CompositorBridgeParent r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D142083
2022-05-12 21:58:55 +00:00
Hiroyuki Ikezoe a457a5cfbb Bug 1766805 - Introduce intended direction and intended end position concepts. r=botond
The scroll snap spec defines the concepts [1]. There are three type of scroll
operations. 1) intended end position, 2) intended direction and end position
and 3) intended direction.

Basically our existing ScrollUnits types correspond;

1) DEVICE_PIXELS, WHOLE => intended end position
2) PAGES => intended direction and end position
3) LINES => intended direction

There are two exceptions in the `intended direction and end position` case,
scrollBy() and fling gestures (on Linux). They were defined as scroll operations
with DEVICE_PIXELS unit, but the spec cleary says they are `intended direction
and end position` operations.

Note that we will also use this information for scroll-snap-stop property since
the properly will only have effects on both 2) and 3) cases.

[1] https://drafts.csswg.org/css-scroll-snap/#scroll-types

Depends on D145190

Differential Revision: https://phabricator.services.mozilla.com/D145191
2022-05-12 12:25:15 +00:00
Norisz Fay ce587cb281 Backed out 3 changesets (bug 1766805) for causing build bustage on AsyncPanZoomController.cpp CLOSED TREE
Backed out changeset e35a130f2bce (bug 1766805)
Backed out changeset 9f9e2030fbc1 (bug 1766805)
Backed out changeset 898bd12a5da8 (bug 1766805)
2022-05-12 13:42:36 +03:00
Hiroyuki Ikezoe 098b8bc1a5 Bug 1766805 - Introduce intended direction and intended end position concepts. r=botond
The scroll snap spec defines the concepts [1]. There are three type of scroll
operations. 1) intended end position, 2) intended direction and end position
and 3) intended direction.

Basically our existing ScrollUnits types correspond;

1) DEVICE_PIXELS, WHOLE => intended end position
2) PAGES => intended direction and end position
3) LINES => intended direction

There are two exceptions in the `intended direction and end position` case,
scrollBy() and fling gestures (on Linux). They were defined as scroll operations
with DEVICE_PIXELS unit, but the spec cleary says they are `intended direction
and end position` operations.

Note that we will also use this information for scroll-snap-stop property since
the properly will only have effects on both 2) and 3) cases.

[1] https://drafts.csswg.org/css-scroll-snap/#scroll-types

Depends on D145190

Differential Revision: https://phabricator.services.mozilla.com/D145191
2022-05-12 07:45:59 +00:00
Razvan Cojocaru fd9479bbef Bug 1661575 - Make it so you don't need to modify two prefs to turn on APZ tree logging. r=botond
Make apz.printtree the only pref that needs enabling for APZ tree
logging.

Differential Revision: https://phabricator.services.mozilla.com/D145990
2022-05-11 20:42:38 +00:00
Lee Salzman 98ca7d586b Bug 1760928 - Evict cached textures on memory pressure. r=aosmond
Since we're going to be keeping around empty cache pages, which can further
increase memory pressure, it would be nice if we respond to memory pressure
events by evicting the empty cache pages.

Differential Revision: https://phabricator.services.mozilla.com/D145499
2022-05-11 17:22:22 +00:00
sotaro 0b576b939a Bug 1768791 - Add overlay support information to about:support r=jrmuizel,gfx-reviewers
The information is similar to chromium's overlay support information.

Differential Revision: https://phabricator.services.mozilla.com/D146042
2022-05-11 15:10:30 +00:00
Brad Werth 355dc69516 Bug 1763698: Make NativeLayerCA only iterate the sublayers with an extent. r=mstange
This additionally changes acceptProvidedSublayers to a C++ lambda function,
which keeps the compiler happy with iterating over the new nsTArray.

Differential Revision: https://phabricator.services.mozilla.com/D143220
2022-05-10 21:12:00 +00:00
Hiroyuki Ikezoe c73cba8151 Bug 1766192 - Do `snap-scope` with the snapped point rather than the destination point. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D144533
2022-05-10 08:51:38 +00:00
Hiroyuki Ikezoe 9de4521753 Bug 1766192 - Introduce SnapTarget struct along with snap-area for each element. r=botond
In the next change we will use the snap-area to implement `snap-score`
properly.

Differential Revision: https://phabricator.services.mozilla.com/D144532
2022-05-10 08:51:37 +00:00
Nicolas Silva 7d5c49c3e6 Bug 1686654 - Track CompositorHitTestInfo accross blob groups. r=jrmuizel
Before this patch the hit test info is accumulated in the painting loop of a group, there are two issues with that:
 - We can early out before getting to the painting loop if the group does not contain any visible item (hit test info items don't count as visible) so a nsDisplayCompositorHitTestInfo can be ignored if it is between two active items.
 - Group boundaries should not affect the behavior of hit testing.

With this patch, hit test info is accumulated in the ConstructItem loops, is not reset in EndGroup and is carried over from a group to the next.
This means the hit test flags are extended to the scope of the svg container, I'm not entirely sure that it's correct but I believe it is at least less incorrect than the current behavior.

Differential Revision: https://phabricator.services.mozilla.com/D145358
2022-05-10 08:05:08 +00:00
Nicolas Silva a40f07111c Bug 1686654 - Push hit test items for active items that are split off a group. r=jrmuizel
... if the group had hit test flags set.

This is more of a workaround than a proper fix. The general idea is that if we hadn't made the item active, its bound would have included in the group's hit tested bounds. Making the item active reduces the area that is covered by hit test items and we don't want that.

***
fixup

Differential Revision: https://phabricator.services.mozilla.com/D143755
2022-05-10 08:05:07 +00:00
Marian-Vasile Laza e68becd63d Backed out changeset b1b0f718e9b1 (bug 1763698) for causing reftest/mochitest/web-platform/devtools failures. CLOSED TREE 2022-05-10 06:10:17 +03:00
Brad Werth 6f95225362 Bug 1763698: Make NativeLayerCA only iterate the sublayers with an extent. r=mstange
This additionally changes acceptProvidedSublayers to a C++ lambda function,
which keeps the compiler happy with iterating over the new nsTArray.

Differential Revision: https://phabricator.services.mozilla.com/D143220
2022-05-10 00:16:16 +00:00
stransky 9e36a7b2ef Bug 1756598 [Linux] Make GL context creation thread safe r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D144284
2022-05-09 17:52:11 +00:00
Emilio Cobos Álvarez ddadb3e680 Bug 1764435 - Fix scrollbar drawing when scrollbars are on the left. r=spohl
Our scrollbar drawing code had various RTL checks for the writing mode.

These checks were busted since bug 1554571 (where the writing-mode of
the scrollbar frames and so on is reset). However, they also wouldn't be
correct (we allow to customize scrollbar position via pref).

Instead, look at the scrollable frame to really know if the scrollbar is
on the right or not. Compute that once in Theme.cpp and pass it around
light we were doing for the "is horizontal" bit.

Differential Revision: https://phabricator.services.mozilla.com/D145865
2022-05-09 17:09:24 +00:00
Bas Schouten ef6615b08f Bug 1767257: Migrate existing WebRender telemetry probes to use Glean directly. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D145315
2022-05-09 15:23:11 +00:00
Cosmin Sabou fa2ede0aba Backed out changeset 50ba61f5cf8c (bug 1767257) for causing webrender bustages. CLOSED TREE 2022-05-09 17:31:06 +03:00
Bas Schouten 5f53bddb5e Bug 1767257: Migrate existing WebRender telemetry probes to use Glean directly. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D145315
2022-05-09 13:46:51 +00:00
Razvan Cojocaru 0ec612c35b Bug 1659124 - Avoid passing non-CSS points to IsZero as it may return false when it should return true. r=botond
IsZero() is changed to take a CSSPoint parameter instead of any
point type, to avoid accidentally re-introducing the issue.

Differential Revision: https://phabricator.services.mozilla.com/D145173
2022-05-06 21:59:44 +00:00
Dan Robertson 56871a5205 Bug 1760986 - Modify APZ mochitest coordinatesRelativeToScreen callers to use await. r=tnikkel
Make the APZ mochitests use coor coordinatesRelativeToScreen and its callers
properly. When was made async not everything was made to await properly.

Differential Revision: https://phabricator.services.mozilla.com/D144756
2022-05-06 18:21:15 +00:00
sotaro 417b6e90df Bug 1766203 - Release all IMFSamples before destroying video MFTDecoder r=media-playback-reviewers,gfx-reviewers,jrmuizel,alwu
Crashes of Bug 1764753 seemed to happen during closing video MFTDecoder or closing IMFSample after closing video MFTDecoder. We might need to release all IMFSamples before destroying video MFTDecoder.

Differential Revision: https://phabricator.services.mozilla.com/D144537
2022-05-06 15:22:41 +00:00
Noemi Erli 6cd762c806 Backed out changeset c94246f87e84 (bug 1659124) for causing multiple failures CLOSED TREE 2022-05-06 01:08:19 +03:00
Razvan Cojocaru a057ee947b Bug 1659124 - Avoid passing non-CSS points to IsZero as it may return false when it should return true. r=botond
IsZero() is changed to take a CSSPoint parameter instead of any
point type, to avoid accidentally re-introducing the issue.

Differential Revision: https://phabricator.services.mozilla.com/D145173
2022-05-05 20:35:48 +00:00
Markus Stange fe5f80f73c Bug 1765399 - Move a few more things to GetGlobalVsyncDispatcher. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144372
2022-05-05 02:15:16 +00:00
Marian-Vasile Laza 45f00cd7b7 Backed out changeset adf2b25deb64 (bug 1760986) for causing mochitest fis test failures. CLOSED TREE 2022-05-05 06:08:47 +03:00
Narcis Beleuzu 5a745d370c Backed out changeset 048e4e27783d (bug 1659124) for mochitest crashes on test_group_bug1534549.html . CLOSED TREE 2022-05-05 04:14:54 +03:00
Razvan Cojocaru d0d119f806 Bug 1659124 - Avoid passing non-CSS points to IsZero as it may return false when it should return true. r=botond
IsZero() is changed to take a CSSPoint parameter instead of any
point type, to avoid accidentally re-introducing the issue.

Differential Revision: https://phabricator.services.mozilla.com/D145173
2022-05-04 21:51:57 +00:00
Dan Robertson 1342c04686 Bug 1760986 - Modify APZ mochitest coordinatesRelativeToScreen callers to use await. r=tnikkel
Make the APZ mochitests use coor coordinatesRelativeToScreen and its callers
properly. When was made async not everything was made to await properly.

Differential Revision: https://phabricator.services.mozilla.com/D144756
2022-05-04 21:41:58 +00:00
Marian-Vasile Laza 1cd0ac703f Backed out 16 changesets (bug 1765399) for causing build bustages on RefPtr.h.
Backed out changeset 8ff5e213e351 (bug 1765399)
Backed out changeset bd164f5cc8b3 (bug 1765399)
Backed out changeset 939b577eee05 (bug 1765399)
Backed out changeset ee00e3583f42 (bug 1765399)
Backed out changeset e5001537e536 (bug 1765399)
Backed out changeset d5a4004a2955 (bug 1765399)
Backed out changeset d3c1f6c420e3 (bug 1765399)
Backed out changeset d21fca656853 (bug 1765399)
Backed out changeset 5e5a29a99c9e (bug 1765399)
Backed out changeset ce326de1e107 (bug 1765399)
Backed out changeset 3890e83660b0 (bug 1765399)
Backed out changeset 2f3ceca7aefe (bug 1765399)
Backed out changeset 40c47c498858 (bug 1765399)
Backed out changeset 3a3a2aa6de9b (bug 1765399)
Backed out changeset 4a30a4b3d30d (bug 1765399)
Backed out changeset a9115d9d648e (bug 1765399)
2022-05-05 00:30:06 +03:00
Markus Stange 4270b96734 Bug 1765399 - Move a few more things to GetGlobalVsyncDispatcher. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144372
2022-05-04 16:13:37 +00:00
Timothy Nikkel ed18b23227 Bug 1765973. Hold a GeckoContentController reference for RepaintContentRepaint calls. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D144430
2022-05-04 04:32:54 +00:00