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

43521 Коммитов

Автор SHA1 Сообщение Дата
Cristian Tuns dad30161bf Merge autoland to mozilla-central. a=merge 2022-07-22 04:57:12 -04:00
Bogdan Szekely ae3891e91e Backed out changeset d2c2f810bf14 (bug 1780389) for causing Bug 1780679 a=backout 2022-07-22 11:30:25 +03:00
Glenn Watson 246371eb45 Bug 1780567 - Fix shared target allocation for tasks with Existing mode r=gfx-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D152474
2022-07-21 23:57:02 +00:00
Bas Schouten 548a858362 Bug 1780431: Fix Compositing PerfStat and do minor cleanup in the process. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D152291
2022-07-21 20:31:49 +00:00
Brad Werth 8b86012f73 Bug 1780586: Make IsCGColorOpaqueBlack handle clear color correctly. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D152439
2022-07-21 18:02:34 +00:00
Emilio Cobos Álvarez a829fc3af6 Bug 1780540 - Don't forget charmap after setting in a font entry. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D152379
2022-07-21 14:58:13 +00:00
Ryan VanderMeulen 7d4ba4cffd Bug 1780461 - Fix HarfBuzz Wcomma errors introduced in version 4.4.1. r=jfkthame
Cherry-pick of upstream commit:
https://github.com/harfbuzz/harfbuzz/pull/3719

Differential Revision: https://phabricator.services.mozilla.com/D152318
2022-07-21 14:33:08 +00:00
Norisz Fay e99928ae0e Backed out changeset 3f75ba849f09 (bug 1780540) for causing build bustages on gfxFcPlatformFontList.cpp CLOSED TREE 2022-07-21 17:28:24 +03:00
Emilio Cobos Álvarez 54c02d1014 Bug 1780540 - Don't forget charmap after setting in a font entry. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D152379
2022-07-21 13:52:28 +00:00
Owen Rafferty d08627e1b0 Bug 1776724 - fix wayland-only build r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D150485
2022-07-21 09:10:59 +00:00
stransky 1ea3f7a202 Bug 1780389 [Wayland] Call moz_container_wayland_add_initial_draw_callback() on locked container, always lock MozContainer for access r=rmader
With this patch moz_container_wayland_surface_lock() always locks MozContainer and needs to be paired with moz_container_wayland_surface_unlock() even if it fails and returns nullptr.
Split moz_container_wayland_add_initial_draw_callback() to two new functions:

- moz_container_wayland_add_initial_draw_callback_locked() is called on locked container and only adds draw callback.
  It asserts when MozContainer is already to draw as we don't expect it.

- moz_container_wayland_add_or_fire_initial_draw_callback() is called on unlocked container as it has it's own lock.
  It behaves as original moz_container_wayland_add_initial_draw_callback(), i.e. stores draw callback when MosContainer is not visible
  and fires draw callback when we're ready to draw.

Differential Revision: https://phabricator.services.mozilla.com/D152276
2022-07-21 07:54:47 +00:00
Hiroyuki Ikezoe 7ecc3eddc9 Bug 1779909 - Skip re-snapping during pan/touch gestures or scrollbar dragging. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D152229
2022-07-21 00:02:10 +00:00
Glenn Watson 0080c38b17 Bug 1780320 - Support child scroll roots if in the root coordinate system r=gfx-reviewers,lsalzman
A requirement of calling `get_relative_transform` is that the child
node is an ancestor of the reference node. To ensure this invariant
is met, we exclude non-ancestor scroll roots from consideration when
picking a scroll root for an atomic picture cache slice. However, this
can mean we select a non-optimal scroll root in some cases. But the
`get_relative_transform` constraint only applies if the spatial nodes
are in a different coordinate system - if we know that the scroll roots
are in the same coordinate system, we can always calculate the correct
relative transform, regardless of ancestry of the nodes. We can rely on
this to relax the condition here, which means we select a more appropriate
scroll root, resulting in much less invalidation and rasterization work
in these cases.

Differential Revision: https://phabricator.services.mozilla.com/D152236
2022-07-20 23:37:40 +00:00
Glenn Watson e757de0919 Bug 1780321 - Support shared render targets that have a lifetime of more than one pass r=gfx-reviewers,lsalzman
In the presence of complex effects such as backdrop-filter, it's
possible that some picture cache tiles can be drawn in a different
pass to other picture cache tiles. If there are a large number of
child render tasks that are shared between tiles assigned to different
render passes, that may result in a large number of standalone render
target allocations, which can hurt performance and reduce batching
efficiency.

This patch allows shared surfaces to be used when they have a lifetime
that spans more than one pass. We track the `free_after` in the active
shared surface list, and only allocate tasks if they match the lifetime
of other tasks in that shared surface. Existing logic ensures that
surface is returned to the shared target pool only after the `free_after`
pass has occurred.

Differential Revision: https://phabricator.services.mozilla.com/D152235
2022-07-20 23:37:39 +00:00
Brad Werth b7bf5c8d2e Bug 1737682 Part 1: Log whether or not we are hitting the detached state. r=mstange
There are 10 enum cases that we track internally, one of which isn't
emitted as telemetry. These cases are 0-indexed to match the enum values.

0 / NotVideo: Not used for telemetry. No video is showing.

1 / LowPower: We are showing exactly one video and we believe we are
hitting the video low power mode. We don't use "Success" because of name
collision in the telemetry generation.

2 / FailMultipleVideo: There is more than one video visible.

3 / FailWindowed: The video is being viewed in windowed mode, not
fullscreen mode, so low power mode is not possible.

4 / FailOverlaid: The video has something on top of it (like captions).

5 / FailBacking: The layer directly underneath the video does not cover
the window or does not have a black background.

6 / FailMacOSVersion: The system is running a too-early version of macOS.

7 / FailPref: The user has disabled the
`gfx.core-animation.specialize-video` pref.

8 / FailSurface: The video is encoded in such a way we can't decode it to
a qualifying pixel format.

9 / FailEnqueue: The video didn't enqueue properly, and we fell back to a
non-video display path.

Differential Revision: https://phabricator.services.mozilla.com/D129453
2022-07-20 20:00:26 +00:00
Cosmin Sabou ea3afb405e Backed out 2 changesets (bug 1737682) for causing build bustages on TelemetryHistogramEnums.h. CLOSED TREE
Backed out changeset 297b16133aa9 (bug 1737682)
Backed out changeset 362b1e430789 (bug 1737682)
2022-07-20 22:08:50 +03:00
Brad Werth 7b4233aaa1 Bug 1737682 Part 1: Log whether or not we are hitting the detached state. r=mstange
There are 10 enum cases that we track internally, one of which isn't
emitted as telemetry. These cases are 0-indexed to match the enum values.

0 / NotVideo: Not used for telemetry. No video is showing.

1 / Success: We are showing exactly one video and we believe we are
hitting the video low power mode.

2 / FailMultipleVideo: There is more than one video visible.

3 / FailWindowed: The video is being viewed in windowed mode, not
fullscreen mode, so low power mode is not possible.

4 / FailOverlaid: The video has something on top of it (like captions).

5 / FailBacking: The layer directly underneath the video does not cover
the window or does not have a black background.

6 / FailMacOSVersion: The system is running a too-early version of macOS.

7 / FailPref: The user has disabled the
`gfx.core-animation.specialize-video` pref.

8 / FailSurface: The video is encoded in such a way we can't decode it to
a qualifying pixel format.

9 / FailEnqueue: The video didn't enqueue properly, and we fell back to a
non-video display path.

Differential Revision: https://phabricator.services.mozilla.com/D129453
2022-07-20 18:48:28 +00:00
Lee Salzman f1344407b0 Bug 1779953 - Ensure MaybeRecordFrame is called before EndFrame. r=tnikkel
If MaybeRecordFrame is called after EndFrame, this means we are reading from
the back buffer state immediately after a call to SwapBuffers. The state of
the back buffer is undefined in that scenario, and mostly was just returning
old frames. We actually want to call MaybeRecordFrame before EndFrame, so we
get the valid contents of the back buffer before it is swapped out.

Differential Revision: https://phabricator.services.mozilla.com/D151988
2022-07-20 16:55:20 +00:00
criss dcedbd6b45 Backed out changeset 6aefdcf0d53b (bug 1773378) for causing mochitest failures on browser_test_background_tab_scroll.js. CLOSED TREE 2022-07-20 07:36:07 +03:00
sotaro 1af3966f37 Bug 1780138 - Let zero copy hardware decoded video to release on all GPUs on Windows r=jrmuizel,gfx-reviewers
A bug is not reported related to "zero copy hardware decoded video" on Windows. Zero video frame copy needs "reuse decoder device ". And it is already enabled on Nightly / Early Beta by Bug 1773714.

RadeonBlockNoVideoCopy is renamed to RadeonBlockZeroVideoCopy

Differential Revision: https://phabricator.services.mozilla.com/D152139
2022-07-20 03:53:30 +00:00
Cristian Tuns 296431b106 Backed out 8 changesets (bug 1754239, bug 1766307, bug 1766308, bug 1766310) for causing build bustages on Logging.h CLOSED TREE
Backed out changeset 50918938a839 (bug 1766307)
Backed out changeset 19800bb8974e (bug 1766307)
Backed out changeset 40ec82794497 (bug 1766310)
Backed out changeset 4f860e20098c (bug 1754239)
Backed out changeset f54eac410bfd (bug 1754239)
Backed out changeset c8cc5e0c89dd (bug 1766307)
Backed out changeset d7aab4098f12 (bug 1766308)
Backed out changeset a7ffa6f44fe8 (bug 1766307)
2022-07-19 21:20:07 -04:00
Dan Robertson 9950071606 Bug 1773378 - Implement stateless dominant axis scrolling. r=botond,mstange
Implement the new dominant axis locking mode for the apz.axis_lock.mode
preference. When using this mode, we do not use the traditional axis locks.
Instead we only consider the input pan displacement for the axis with
a larger value, zeroing out the displacement on the opposite axis.

Differential Revision: https://phabricator.services.mozilla.com/D152104
2022-07-20 00:51:27 +00:00
az 86d8351f49 Bug 1766308 - Add gfxVars::CodecSupportInfo to store user-readable codec support string r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147386
2022-07-19 23:27:39 +00:00
az 5d97400d50 Bug 1766307 - Enable PDMFactory::Supports/SupportsMimeType to process+return HW/SW decode info r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147385
2022-07-19 23:27:38 +00:00
Hiroyuki Ikezoe 4907d4f03c Bug 1742797 - Add a new IPC call to clear animation resources on WebRender, r=sotaro.
Differential Revision: https://phabricator.services.mozilla.com/D151481
2022-07-19 19:56:21 +00:00
Butkovits Atila 398eded3f1 Backed out 4 changesets (bug 1742797, bug 1748808) for causing crashes at mozilla::layers::APZCTreeManagerParent::RecvUpdateZoomConstraints.
Backed out changeset 23f2a369a5a7 (bug 1748808)
Backed out changeset 5b0edd03f698 (bug 1742797)
Backed out changeset 8ed69c2c1d49 (bug 1742797)
Backed out changeset 18e11e7ea9d0 (bug 1742797)
2022-07-19 08:12:04 +03:00
Hiroyuki Ikezoe 0dde09cde6 Bug 1779729 - Guard simultaneous access to mLastSnapTargetIds. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D152133
2022-07-19 03:08:08 +00:00
Kelsey Gilbert b5f2464c70 Bug 1779166 - Mark two GLContexts as not owned by single threads. r=gfx-reviewers,lsalzman
1. In AndroidSharedBlitGL.
2. In DMABufSurface.

Differential Revision: https://phabricator.services.mozilla.com/D152141
2022-07-19 02:53:56 +00:00
Botond Ballo a4bfaaf34b Bug 1779144 - Factor out a helper shared by the touch event and tap event handling codepaths. r=dlrobertson
Depends on D151939

Differential Revision: https://phabricator.services.mozilla.com/D151940
2022-07-18 21:37:48 +00:00
Botond Ballo d6e6ccf103 Bug 1779144 - Handle touchpad double-taps correctly in APZCTreeManager::ConvertToGecko(). r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D151939
2022-07-18 21:37:47 +00:00
Hiroyuki Ikezoe 30a66f3945 Bug 1742797 - Add a new IPC call to clear animation resources on WebRender, r=sotaro.
Differential Revision: https://phabricator.services.mozilla.com/D151481
2022-07-18 18:01:52 +00:00
Norisz Fay 12f6ce9a82 Backed out changeset ff417c667b5b (bug 1779355) for causing build bustages on GLLibraryEGL.h CLOSED TREE 2022-07-18 20:48:26 +03:00
Kelsey Gilbert 992f515c41 Bug 1779355 - Check for owning thead in GLContext::MakeCurrent and EGLLibrary::fMakeCurrent. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D151700
2022-07-18 17:35:03 +00:00
Stephen A Pohl a945096f93 Bug 1773752: Remove more workarounds for old macOS SDKs. r=mstange,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D151532
2022-07-18 17:08:59 +00:00
Dan Robertson 8559c5bb57 Bug 1780018 - Fix the link for reftests docs in APZ docs. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D152030
2022-07-18 16:57:32 +00:00
Brad Werth 6736828278 Bug 1778187: Explicitly store tile cache background color and backdrop rect. r=gw
This patch solves a performance problem and a semantic problem introduced
in Bug 1773109. That Bug changed the term tile cache 'backdrop' to mean
two distinct things:

1) An opaque region spanning the entire tiling area (the sole original
meaning).
2) An opaque region spanning the visible area.

Presently the code tries and fails to maintain both of those meanings in the
BackdropInfo structure. The problem arises when the tiling backdrop is one
color and the visible backdrop is a different color. There's only one color in
the structure! The existing code attempts to circumvent this by setting the
tile cache background_color for the tiling color, and that's slow. Even if it
wasn't slow, the opaque_rect is set for the tiling area instead of the actual
backdrop area, which is semantically confusing, and could lead to incorrect
draw on platforms that support native color layers.

This patch addresses these issues by adding a spanning_opaque_color to the
BackdropInfo structure, which will only be set when there is a backdrop that
covers the tiling area. That color can be used as a clear color for the slice
tiles, when set. This patch also adds a backdrop_rect which indicates the area
of the actual backdrop, if set. This backdrop_rect is used to size the native
color layers, if supported by the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D151942
2022-07-18 15:00:27 +00:00
Andrew Osmond 01f1eb1a66 Bug 1779935 - Ensure GradientCache lookup and insertion are atomic. r=gfx-reviewers,lsalzman
There are potential races between insertion of the same gradient into
the cache on different threads, as well as acquiring a strong reference
to the GradientStops object racing with the expiration timer.

Differential Revision: https://phabricator.services.mozilla.com/D151981
2022-07-18 14:43:16 +00:00
smolnar 21276b3980 Backed out changeset a137e696f06a (bug 1779935) for causing wpt failures in html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.html CLOSED TREE 2022-07-18 11:11:06 +03:00
Andrew Osmond 15890255a7 Bug 1779935 - Ensure GradientCache lookup and insertion are atomic. r=gfx-reviewers,lsalzman
There are potential races between insertion of the same gradient into
the cache on different threads, as well as acquiring a strong reference
to the GradientStops object racing with the expiration timer.

Differential Revision: https://phabricator.services.mozilla.com/D151981
2022-07-17 17:11:09 +00:00
Andi-Bogdan Postelnicu bbf960e82c Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.38-stable (a8314ef 2022-06-27)
# ignore-this-changeset

Depends on D151908

Differential Revision: https://phabricator.services.mozilla.com/D151909
2022-07-15 09:37:22 +00:00
Hiroyuki Ikezoe f01e673d43 Bug 1774537 - Skip re-snapping if there's any async scroll is running. r=botond
Depends on D149497

Differential Revision: https://phabricator.services.mozilla.com/D150929
2022-07-15 06:47:38 +00:00
Hiroyuki Ikezoe da8dbbfc2f Bug 1774537 - Propagate snap target ids for async scroll operations triggered on the main-thread, but will be processed in APZ. r=botond
Ideally we can write a wpt for this case, but it doesn't work due to
bug 1674687 and ClampAndAlignWithPixels [1] in our code. In the wpt we can use
waitForScrollTo [2] to wait for the end of an async scroll operation, say
a scrollBy call with `behavior: smooth`, at some point where it's close to the
final scroll destination APZ reports a fractional scroll offset close to the
destination, it will be clamped and rounded to the final destination value, thus
waitForScrollTo considers it reached to the end of the scroll operation. At the
moment APZ considers the async scroll is still in progress, which mean the snap
target ids haven't yet been reported to back the main-thread unfortunately.

[1] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/layout/generic/nsGfxScrollFrame.cpp#2847
[2] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/testing/web-platform/tests/css/css-scroll-snap/support/common.js#84

Depends on D149496

Differential Revision: https://phabricator.services.mozilla.com/D149497
2022-07-15 06:47:37 +00:00
Hiroyuki Ikezoe 34ca1c470f Bug 1774537 - Propagate last snap target id(s) from APZ to the content. r=botond
Depends on D149495

Differential Revision: https://phabricator.services.mozilla.com/D149496
2022-07-15 06:47:37 +00:00
Hiroyuki Ikezoe 74c13fe42c Bug 1774537 - Call SetState with WEEL_SCROLL or KEYBOARD_SCROLL in the case of instant scoll. r=botond
It will ensure an APZ:TransformEnd notification.

Differential Revision: https://phabricator.services.mozilla.com/D149495
2022-07-15 06:47:36 +00:00
Glenn Watson 891c6e9288 Bug 1779387 - Restore clip root parenting for now r=gfx-reviewers,aosmond
There are some hit-test use cases that still rely on clip-chains
and invalid clip-chain handles inheriting from the root clip-id
for a pipeline.

This will become irrelevant once the clip-tree patches land next
week, but for now we can restore these to fix a regression going
out in a release.

Differential Revision: https://phabricator.services.mozilla.com/D151880
2022-07-15 04:16:07 +00:00
Lee Salzman d4bf5cfa1b Bug 1779684 - Mark more surface types as IsDataSourceSurface. r=aosmond,gfx-reviewers
We spend a significant amount of time in profiles allocating DataSourceSurfaceWrapper
when GetDataSurface is called inside DrawTargetWebgl. We can mark some more surface
types as IsDataSurface to work around this fairly easily.

Differential Revision: https://phabricator.services.mozilla.com/D151898
2022-07-15 02:27:58 +00:00
Andrew Osmond 14113a293a Bug 1779570 - Fix hybrid builds. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D151875
2022-07-14 21:13:45 +00:00
Andrew Osmond 3368585195 Bug 1779570. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D151857
2022-07-14 20:17:10 +00:00
Andrew Osmond a9049b5248 Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 19:53:09 +00:00
criss ba063e13c6 Backed out changeset e4cd98b5984d (bug 1779519) for causing build bustages. CLOSED TREE 2022-07-14 22:06:53 +03:00