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

44613 Коммитов

Автор SHA1 Сообщение Дата
Marian-Vasile Laza ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Kershaw Chang a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
Emilio Cobos Álvarez 8f0d73d3ae Bug 1821815 - Remove some unused ServoStyleConstsInlines includes. r=boris
I noticed extremely long build times when touching that file and this
helps a bit.

Differential Revision: https://phabricator.services.mozilla.com/D172344
2023-03-11 02:00:25 +00:00
Brad Werth f4655d6da0 Bug 1821727: Refactor NativeLayerCA clip rect geometry calcuations. r=mstange
This creates a new method that is used in ApplyChanges and DumpLayer to
calculate the clip rect geometry. Along the way, it eliminates some
redundant outputs:

1) effectiveClip is just a holder of both the position and bounds of the
clip, which are applied seperately by the caller, so the new function
returns them seperately.
2) clipToLayerOffset is just the unscaled negated value of the clip
position, and the only place it is used can tolerate doing the math at the
point of use.

It also reorganizes the logic in DumpLayer a bit to more cleanly separate
the parts that output the wrapping div from the parts that output the img.

It also replaces the use of NS constants with CG constants in
ApplyChanges, for consistency. Hopefully this makes it more clear that
when the clip rect is set and then later unset, the wrapper layer is
restored to its original condition.

Unfortunately, it also re-lints the files it touches, which were somehow
out of compliance with current linting rules, so the changes look much
more extensive than they are.

Differential Revision: https://phabricator.services.mozilla.com/D172289
2023-03-10 19:23:05 +00:00
Brad Werth 52ef74b383 Bug 1658986 Part 3: Remove NativelayerCA checks of invalid regions. r=mstange
These checks were designed to identify if we have a logic error in the
display rects or update rects we get from our callers to
HandlePartialUpdate. We've gathered enough evidence that there is such an
error and we've opened Bug 1818540 to address it. There's no longer a good
reason to keep these checks around, as they just crash the browser for
users rather than risk showing them invalid pixels (which we're fairly
sure are valid pixels).

Differential Revision: https://phabricator.services.mozilla.com/D172287
2023-03-10 17:38:42 +00:00
Glenn Watson 16787c4f2c Bug 1821082 - Fix perf regression due to too much swgl blending r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172088
2023-03-09 20:29:50 +00:00
Jonathan Kew 4d44c5aa6d Bug 1820988 - Templatize the 8- and 16-bit versions of gfxFontGroup::MakeTextRun for convenience. r=gfx-reviewers,aosmond
No functional change, just a drive-by cleanup noticed when looking over the text-rendering APIs.

Differential Revision: https://phabricator.services.mozilla.com/D171984
2023-03-09 12:48:42 +00:00
Emilio Cobos Álvarez 48efee8e29 Bug 1820280 - Don't proxy some principal destruction to the main thread. r=dshin
Drive-by, but nsIPrincipal is thread-safe now.

Differential Revision: https://phabricator.services.mozilla.com/D171642
2023-03-09 10:22:35 +00:00
stransky b3b9bd67b2 Bug 1802844 [Linux] Configure FEATURE_HW_DECODED_VIDEO_ZERO_COPY on Linux r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171553
2023-03-09 08:57:41 +00:00
Norisz Fay d51def9e85 Backed out changeset 6fdd0782eb8d (bug 1820988) for causing build bustage CLOSED TREE 2023-03-08 23:11:46 +02:00
Dan Robertson 85fd59cea3 Bug 1758760 - Do not expire first scrollable frame displayport. r=tnikkel,botond
Do not allow the displayport for the first scrollable frame to expire.

Differential Revision: https://phabricator.services.mozilla.com/D169861
2023-03-08 18:39:04 +00:00
Jonathan Kew b5e33edcbb Bug 1820988 - Templatize the 8- and 16-bit versions of gfxFontGroup::MakeTextRun for convenience. r=gfx-reviewers,aosmond
No functional change, just a drive-by cleanup noticed when looking over the text-rendering APIs.

Differential Revision: https://phabricator.services.mozilla.com/D171984
2023-03-08 18:28:07 +00:00
Tiaan Louw c8476cb106 Bug 1817641 - Convert RGBA to AbsoluteColor for computed/animated/resolved CSS colors r=emilio
Computed color values will not be in the correct format, closer to the
one specified by the author.  This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor.  This allows
color space/gamut information to be available for use.

Some animation related test failures had to be changed, because colors
now has greater precision.  Animated a color now causes a lot more
animation updates, which was not initially expected.  See the bug for
discussion.

Differential Revision: https://phabricator.services.mozilla.com/D171021
2023-03-07 11:28:15 +00:00
Kelsey Gilbert a34741e58d Bug 1817240 - Cherry-pick ANGLE skylake clearview fix. r=gfx-reviewers,lsalzman
Also fix update-angle.py:
* Use shell=True to get ninja to run
* Don't record "/PDBSourcePath:" because it depends on configuration of
  the vendoring machine and is otherwise unused, and so uselessly causes
  blame noise.

Differential Revision: https://phabricator.services.mozilla.com/D171824
2023-03-07 06:59:50 +00:00
Hiroyuki Ikezoe f6eeba9f7b Bug 1816032 - Schedule a timeout to avoid waiting for the browser gesture responce forever. r=botond
The browser mochitest in this change causes a timeout without this fix since
the overscroll gutter gets stuck thus we will never get "APZ:TransformEnd".

Differential Revision: https://phabricator.services.mozilla.com/D171421
2023-03-07 03:36:07 +00:00
Botond Ballo 0a75e8f45a Bug 1820338 - Further fuzzing tweaks to scrollbar sizing tests. r=rzvncj
Differential Revision: https://phabricator.services.mozilla.com/D171778
2023-03-06 21:41:38 +00:00
Jamie Nicol 17ccf1e5e9 Bug 1819540 - Apply Mali driver bug workaround on additional GPU. r=gfx-reviewers,lsalzman
In bug 1787520 and bug 1795614 we added a workaround for a driver bug
on Mali G78 and G710 GPUs. It turns out this also affects the G77, now
that some devices have received software updates containing an updated
driver version. This patch applies the workaround to the G77 as well,
as long as the driver version is affected.

Differential Revision: https://phabricator.services.mozilla.com/D171740
2023-03-06 19:57:39 +00:00
Teodor Tanasoaia 1c86b28363 Bug 1818748 - Update wgpu to revision 73b4257b17cc62ecc8df6d6aa3730bd9c6cba4b9. r=webgpu-reviewers,jimb
Differential Revision: https://phabricator.services.mozilla.com/D170905
2023-03-06 17:00:15 +00:00
sotaro 592d27074f Bug 1817674 - Change RDDProcess shutdown from XPCOMShutdown event to gfxPlatform::ShutdownLayersIPC() r=KrisWright,gfx-reviewers,lsalzman
There was a case that RDD process was shut down during WebRender rendering. It happens by RDDProcess shutdown during XPCOMShutdown event. In this case, there could be a widget that nsBaseWidget::Shutdown() has not yet been called.

RDD process must be shutdown after all nsBaseWidget::Shutdown()s are called. gfxPlatform::ShutdownLayersIPC() is called immediately after XPCOMShutdown event in ShutdownXPCOM(). Then the ShutdownLayersIPC() is a good place to handle RDDProcess shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D171313
2023-03-05 08:47:22 +00:00
Lee Salzman 620b4abe8f Bug 1777849 - Require HW-WR for Accelerated Canvas2D. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D171638
2023-03-05 03:11:08 +00:00
Botond Ballo 702de69191 Bug 1818702 - Use reftest-zoom instead of layout.css.devPixelsPerPx in test. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171627
2023-03-04 09:42:41 +00:00
Stanca Serban c4c9c4a5b6 Backed out changeset bbe1109a1f94 (bug 1818702) for causing reftest failures in gfx/layers/apz/test/reftest. CLOSED TREE 2023-03-04 04:17:54 +02:00
Botond Ballo c1ff3c969e Bug 1818702 - Use reftest-zoom instead of layout.css.devPixelsPerPx in test. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171627
2023-03-04 00:22:47 +00:00
Botond Ballo 6e20a2a104 Bug 1815372 - Introduce OuterCSSPixel to represent quantities in CSS pixels of content surrounding a scroll frame. r=dlrobertson
This is currently used mostly for calculations related to scrollbars,
which are an example of content outside the scroll frame (and in
particular not subject to the zoom of a zoomable scroll frame).

As part of this change, FrameMetrics::
CalculateCompositionBoundsInCssPixelsOfSurroundingContent() is
renamed to CalculateCompositionBoundsInOuterCSSPixels() for brevity.

Differential Revision: https://phabricator.services.mozilla.com/D171142
2023-03-03 23:57:14 +00:00
Botond Ballo 44e9f66e2c Bug 1815372 - Factor out a TranslateThumb() helper function. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D171141
2023-03-03 23:57:13 +00:00
Marco Castelluccio eb25a67e10 Bug 1759728 - Remove unused CheckBufferSize function. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171363
2023-03-03 23:33:53 +00:00
Lee Salzman a990878896 Bug 1817442. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D170689
2023-03-03 20:46:24 +00:00
Botond Ballo 27de6799c7 Bug 1819848 - Move calculations that are only needed for the 'if (haveAsyncZoom)' branch into that branch. r=rzvncj
Differential Revision: https://phabricator.services.mozilla.com/D171439
2023-03-03 16:49:50 +00:00
Botond Ballo aa78a6537b Bug 1819848 - If we don't scale the thumb, use the unscaled length in the position calculation. r=rzvncj
Differential Revision: https://phabricator.services.mozilla.com/D171438
2023-03-03 16:49:49 +00:00
Botond Ballo 5864496b95 Bug 1819848 - Only scale the thumb in the compositor if we are async-zoomed. r=rzvncj
In principle, the calculated scale should be 1.0 if we are not async-zoomed,
but sometimes things like rounding error can cause the scale to be slightly
off.

Differential Revision: https://phabricator.services.mozilla.com/D171437
2023-03-03 16:49:49 +00:00
Jonathan Kew a885dbf9a2 Bug 1819272 - Implement ScaledFontDWrite::HasVariationSettings(), so that we can use the print-as-paths option for PDF output with variation fonts on Windows. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171565
2023-03-03 14:06:07 +00:00
Jeff Muizelaar a6407ad292 Bug 1818820. Fix drawing of some blend modes with non-complex clips. r=bas
This ensures that we have our clips pushed when we expect them to.

Differential Revision: https://phabricator.services.mozilla.com/D171492
2023-03-03 11:54:49 +00:00
Updatebot f7adfaac24 Bug 1820063 - Update harfbuzz to 7.1.0 r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D171519
2023-03-03 09:20:12 +00:00
Botond Ballo e3c4fb73d8 Bug 1818702 - Handle a non-default device scale correctly in ScrollThumbUtils. r=rzvncj
There were two problems:

 * The line scroll amount was queried in LayoutDevice pixels
   and used as CSS pixels without applying the device scale.

 * The thumb length was rounded in CSS pixels. To match main
   thread behaviour, it needs to be rounded in LayoutDevice
   pixels.

Differential Revision: https://phabricator.services.mozilla.com/D171435
2023-03-03 06:33:00 +00:00
Brad Werth 2c839a9c54 Bug 1817691 Part 2: Make HandlePartialUpdate tolerate the same fuzziness as NotifySurfaceReady. r=mstange
Now that NotifySurfaceReady will clean up a 1-pixel strip invalid region,
this change makes HandlePartialUpdate allow a 1-pixel strip invalid
region. This should hopefully make HandlePartialUpdate only crash on the
cases that will also crash NotifySurfaceReady.

Differential Revision: https://phabricator.services.mozilla.com/D171500
2023-03-03 00:57:27 +00:00
Cosmin Sabou 2057febcbf Backed out changeset e51a9dda4b96 (bug 1817674) for causing asan failures in __pthread_mutex_lock. 2023-03-03 02:39:51 +02:00
Cosmin Sabou 8c80747241 Backed out changeset 451ce16f5fd1 (bug 1817691) for causing region update related assertion failures. CLOSED TREE 2023-03-03 01:02:21 +02:00
sotaro 04266eba2f Bug 1817674 - Change RDDProcess shutdown from XPCOMShutdown event to gfxPlatform::ShutdownLayersIPC() r=KrisWright,gfx-reviewers,lsalzman
There was a case that RDD process was shut down during WebRender rendering. It happens by RDDProcess shutdown during XPCOMShutdown event. In this case, there could be a widget that nsBaseWidget::Shutdown() has not yet been called.

RDD process must be shutdown after all nsBaseWidget::Shutdown()s are called. gfxPlatform::ShutdownLayersIPC() is called immediately after XPCOMShutdown event in ShutdownXPCOM(). Then the ShutdownLayersIPC() is a good place to handle RDDProcess shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D171313
2023-03-02 22:22:58 +00:00
Brad Werth 5546663d79 Bug 1817691 Part 2: Make HandlePartialUpdate tolerate the same fuzziness as NotifySurfaceReady. r=mstange
Now that NotifySurfaceReady will clean up a 1-pixel strip invalid region,
this change makes HandlePartialUpdate allow a 1-pixel strip invalid
region. This should hopefully make HandlePartialUpdate only crash on the
cases that will also crash NotifySurfaceReady.

Differential Revision: https://phabricator.services.mozilla.com/D171500
2023-03-02 22:14:08 +00:00
Jonathan Kew 3be9a8c3bb Bug 1819843 - Add missing harfbuzz source file to moz.build list. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171446
2023-03-02 18:45:39 +00:00
Jeff Muizelaar d4b665dc34 Bug 1819966 - Add some more tests around single number versioning. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D171488
2023-03-02 18:34:06 +00:00
sotaro f47f7a1973 Bug 1819850 - Remove TextureHost::DisableExternalTextures() r=gfx-reviewers,jnicol
TextureHost::DisableExternalTextures() is no longer used.

Differential Revision: https://phabricator.services.mozilla.com/D171442
2023-03-02 11:42:06 +00:00
Glenn Watson 3c1aea8dd2 Bug 1811978 - Enable the new tiled rendering path, update test expectations r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D167630
2023-03-02 00:58:44 +00:00
Cristian Tuns aa39d6bc20 Merge mozilla-central to autoland on a CLOSED TREE 2023-03-01 18:03:12 -05:00
Ryan VanderMeulen fdeae6aef2 Backed out changesets 38a4e166571c and 88798511f9ec (bug 1817126) for causing bug 1819724. 2023-03-01 17:52:33 -05:00
sotaro bfa93d0546 Bug 1769404 - Do not handle invalid message caused by moving tabs between different windows r=gfx-reviewers,aosmond
The problem happened by ProcessWebRenderParentCommands() handling with invalid transaction message. When a Tab is moved between Windows, WebRenderBridgeParent::UpdateWebRender() is called. It update mApi and mIdNamespace. Then all WebRender related resources are freed. Then a message with old mIdNamespace from WebRenderBridgeChild becomes invalid. Then we should not handle the obsoleted message.

Differential Revision: https://phabricator.services.mozilla.com/D170563
2023-03-01 21:51:59 +00:00
Brad Werth 51eda373b8 Bug 1808155 Part 2: Make VIDEO_LOG note events that will cause the video layer to rebuild. r=mstange
There are only a few things that could cause the video layer to be
rebuilt:
1) The mMutatedSpecializeVideo flag being set.
2) A new layer object being created to host for the video.

This patch more thoroughly documents instances of case 1 by adding
VIDEO_LOG message to anything that sets the mMutatedSpecializeVideo flag.

It also makes some attempt to identify case 2 by adding a VIDEO_LOG
message whenever we destroy a layer that has ever displayed a video
texture. If a log message like this is followed by a message that a new
video layer is created, it is a strong signal that we are unexpectedly
throwing away our external surface handles when we'd like to keep using
them.

Differential Revision: https://phabricator.services.mozilla.com/D171301
2023-03-01 20:57:58 +00:00
Brad Werth 0486642892 Bug 1658986 Part 2: Add region stringification to gfxCriticalError before crashing. r=mstange
We're headed for a crash, so this change makes gfxCriticalError have more
information that will help us understand the crash. Unlike some other
error-checking code in this class, it is not NIGHTLY_BUILD because the
crash signatures in this Bug are reported in Beta and beyond.

Differential Revision: https://phabricator.services.mozilla.com/D171390
2023-03-01 20:57:12 +00:00
sotaro d62a6e32ad Bug 1816482 - Add lock/sync handling to D3D11ShareHandleImage::MaybeCreateNV12ImageAndSetData() r=gfx-reviewers,lsalzman
Lock handling is borrowed from D3D11YCbCrImage::SetData(). But ID3D11Texture2D of D3D11TextureData does not use keyed mutex. Since if D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX is used, ID3D11Texture2D could not be used for video overlay. Then D3D11TextureData uses manual synchronization with sync object like D3D11DXVA2Manager::CopyToImage().

Differential Revision: https://phabricator.services.mozilla.com/D171056
2023-03-01 08:17:07 +00:00
Makoto Kato 051c921a72 Bug 1813573 - Part 2. Restart vsync when refresh rate is changed. r=geckoview-reviewers,owlish
When refresh rate is changed, `DisplayListener` is called. So we restart vsync
when refresh rate may be changed.

Differential Revision: https://phabricator.services.mozilla.com/D168666
2023-03-01 03:12:32 +00:00
Makoto Kato 9aca857df0 Bug 1813573 - Part 1. Clean up AndroidVsyncSource to get current refresh rate when enabling vsync. r=geckoview-reviewers,owlish
Newer Android supports multiple refresh rate that is dynamically changed.
Actually, GeckoView will always pass the refresh rate value to vsync when
getting it first time.

So this fix changes that GeckoView gets the refresh rate when vsync is started.

Differential Revision: https://phabricator.services.mozilla.com/D168665
2023-03-01 03:12:31 +00:00
Hiroyuki Ikezoe e458d4423f Bug 1817126 - Implement GetUnsnappedLayoutScrollRange and use it in WantAsyncScroll. r=tnikkel
Depends on D170465

Differential Revision: https://phabricator.services.mozilla.com/D170466
2023-03-01 03:11:37 +00:00
Marian-Vasile Laza 6c1f72e279 Backed out 2 changesets (bug 1817126) for wpt failures on scrollable-overflow-zero-one-axis.html. CLOSED TREE
Backed out changeset 1a1fa9a635b8 (bug 1817126)
Backed out changeset 0a1f7b5bed45 (bug 1817126)
2023-03-01 04:51:48 +02:00
Glenn Watson 3844186dc3 Bug 1819224 - Fix buffer size bug in gpu-buffer r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171167
2023-03-01 00:13:08 +00:00
Brad Werth 75eeec6a99 Bug 1768495 Part 4: Disable window occlusion tracker pref on crashtests that rely on a running compositor. r=emilio
These crashtests rely upon either a requestAnimationFrame callback or a
MozAfterPaint event. Those currently won't happen when the compositor is
paused, and on Windows these crashtests are occluded, which will now pause
the compositor. To deal with this, we disable the occlusion tracking pref
on Windows. Other platforms seem not to treat the crashtests as occluded,
so their compositors keep running.

Differential Revision: https://phabricator.services.mozilla.com/D171137
2023-02-28 23:04:54 +00:00
Hiroyuki Ikezoe bf9d5b4f09 Bug 1817126 - Implement GetUnsnappedLayoutScrollRange and use it in WantAsyncScroll. r=tnikkel
Depends on D170465

Differential Revision: https://phabricator.services.mozilla.com/D170466
2023-02-28 22:19:24 +00:00
Daniel Holbert 25409964a2 Bug 1818157: Backout changeset 510d250fd545 (bug 1814398) and e44b3ab61ae4 (bug 1817212) for introducing a performance regression. CLOSED TREE 2023-02-28 11:23:00 -08:00
Glenn Watson db38a6636e Bug 1818400 - Optimize primitive dependency checks in picture caching. r=gfx-reviewers,ahale
The main goal of this is to fix an implementation detail where the
WR code had to read every primitive in the tile even when checking
if a small sub-tile was valid (as the advance amounts of the
primitive dependency array vectors was stored in each primitive).

However, this patch itself is quite a significant optimization, it
improves displaylist_mutate by ~16%.

Instead of maintaining separate arrays for each dependency, use
a single byte array and use peek-poke to store these dependencies.

This simplifies the code for comparing dependencies, and makes the
traversal of sparse index buffers of the primitive array much faster.

Differential Revision: https://phabricator.services.mozilla.com/D170710
2023-02-28 19:52:41 +00:00
Chris H-C 319a2387c2 Bug 1816454 - Update Glean SDK to v52.3.0 r=TravisLong,supply-chain-reviewers,emilio
Also update some FOG tests that are now incorrect (label limits have been
lifted).

The `default_features = false` on `env_logger` are to avoid a new, duplicate
dependency on hermit-abi.

Differential Revision: https://phabricator.services.mozilla.com/D170816
2023-02-28 16:44:02 +00:00
Sandor Molnar c7778b99c0 Backed out changeset 1c6351a80663 (bug 1819097) for causing macOS bc failures in security/sandbox/test/browser_bug1393259.js CLOSED TREE 2023-02-28 19:07:51 +02:00
Jonathan Kew 988a2a4cab Bug 1819097 - Avoid repeating InitFontList due to RegisteredFontsChanged notification during startup on macOS. r=gfx-reviewers,lsalzman
During font-list initialization, we call Core Text to "activate" the supplemental language fonts,
and potentially any bundled fonts shipped with the app. But this generates an OS notification,
which if we process it will cause a redundant rebuild of our list. So to avoid this, set a flag
when we activate the fonts, telling us that the upcoming notification can be ignored.

Differential Revision: https://phabricator.services.mozilla.com/D171205
2023-02-28 10:36:59 +00:00
Jed Davis 3219af97cc Bug 1763625 - Refactor how we access child process handles. r=nika,media-playback-reviewers,karlt
Differential Revision: https://phabricator.services.mozilla.com/D169777
2023-02-28 03:41:51 +00:00
Lee Salzman a3fb56e5ce Bug 1818929 - Don't disable THREADSAFE_GL for X11, but leave stack size fixes from bug 1777849. r=aosmond,gfx-reviewers
Running WebGL on the Renderer thread is causing inexplicable browsertime harness failures. Since there is
still contention with the main thread, moving WebGL work from the CanvasRenderer thread to the Renderer
thread probably has only a small impact on the incidence of bug 1777849.

However, there were other stack size issues fixed there, so we want to leave the stack size fixes in
place.

Differential Revision: https://phabricator.services.mozilla.com/D171147
2023-02-27 22:57:43 +00:00
Csoregi Natalia 43c5854833 Backed out changeset dc92467cea22 (bug 1763625) for causing memory-related crashes and failures. CLOSED TREE 2023-02-28 00:52:22 +02:00
Dan Robertson 73fa554e54 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-27 21:09:06 +00:00
Jed Davis 1015aea40b Bug 1763625 - Refactor how we access child process handles. r=nika,media-playback-reviewers,karlt
Differential Revision: https://phabricator.services.mozilla.com/D169777
2023-02-27 20:32:51 +00:00
Stanca Serban 8917a2896e Backed out changeset aba2a1dc6802 (bug 1816454) for causing PNGEncoder related build bustages. CLOSED TREE 2023-02-27 16:42:40 +02:00
Chris H-C 68d8ce8104 Bug 1816454 - Update Glean SDK to v52.3.0 r=TravisLong,supply-chain-reviewers
Also update some FOG tests that are now incorrect (label limits have been
lifted).

Differential Revision: https://phabricator.services.mozilla.com/D170816
2023-02-27 14:04:03 +00:00
stransky 2bdae35320 Bug 1809026 [Linux] Move global DMABufSurface management from VideoFrameSurface to DMABUFSurfaceImage r=alwu
Right now we add global reference to DMABufSurface in VideoFrameSurface when it's allocated by decoder and release it when DMABUFSurfaceImage deleted by MediaSupervisor.
It's not very obvious so in this patch we move DMABufSurface references to DMABUFSurfaceImage only, we add global ref when DMABufSurface is put to DMABUFSurfaceImage
and unref when DMABUFSurfaceImage is deleted.

Differential Revision: https://phabricator.services.mozilla.com/D170625
2023-02-27 11:20:34 +00:00
stransky 626d67ee7b Bug 1809026 [Linux] Implement fast DMABuf WebGL textures upload r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D167240
2023-02-27 11:20:09 +00:00
sotaro c28b3ba4ed Bug 1818685 - Disable video overlay if mVideoSwapChain->Present() is very slow on Windows r=gfx-reviewers,lsalzman
There were cases that mVideoSwapChain->Present() took long time. It caused low fps and stuttering and lots of dropped frames. When it happens, disabling video overlay could address the problem.

Differential Revision: https://phabricator.services.mozilla.com/D171039
2023-02-27 05:29:24 +00:00
Lee Salzman 646e8918c1 Bug 1777849 - Disable FEATURE_THREADSAFE_GL on X11 and GLX. r=gfx-reviewers,ahale,aosmond
LibX11 versions prior to 1.7 have a race condition that made it unsafe to use
in multiple threads. Since Firefox 104, we created a CanvasRender thread that
is used to service WebGL commands off the Renderer thread so that WebGL does
not block WebRender. If WebGL uses GLX, this can lead us to using GLX on the
two different threads. In combination with an unsafe version of libX11, this
can lead to severe instability.

Further evidence points to the fact that the fix in 1.7 may have caused further
crashes that were not resolved until 1.7.4. Yet other reports indicate other
drivers than Mesa may still have issues even after 1.7.4. Ultimately, there
may be no safe version of libX11 to use right now.

However, GLX, which uses libX11, is considered legacy at this point, with many
users transitioning to EGL instead. It seems reasonable to not allow GLX to be
used from multiple threads at all, unless overridden by a pref, to work around
this.

We already have a FEATURE_THREADSAFE_GL in place to denote this, which was
currently used mainly for Nouveau which is also unsafe to use on multiple
threads. If this feature fails, the CanvasRender thread is not used, and
all WebGL commands go back to being on the Renderer thread as normal, avoiding
the problem.

A further snag is that recent ANGLE updates required a larger CanvasRenderer
thread stack size to avoid exhausting the stack. This patch uncovers the fact
that the Renderer and Compositor threads did not similarly have their stack
sizes adjusted in case WebGL is running on those threads instead.

Differential Revision: https://phabricator.services.mozilla.com/D170992
2023-02-25 22:49:51 +00:00
Stanca Serban ebf9b1f7bd Backed out changeset 42afa6604694 (bug 1777849) for causing build bustages in RenderThread.cpp. CLOSED TREE 2023-02-26 00:42:52 +02:00
Lee Salzman ada52201da Bug 1777849 - Disable FEATURE_THREADSAFE_GL on X11 and GLX. r=gfx-reviewers,ahale,aosmond
LibX11 versions prior to 1.7 have a race condition that made it unsafe to use
in multiple threads. Since Firefox 104, we created a CanvasRender thread that
is used to service WebGL commands off the Renderer thread so that WebGL does
not block WebRender. If WebGL uses GLX, this can lead us to using GLX on the
two different threads. In combination with an unsafe version of libX11, this
can lead to severe instability.

Further evidence points to the fact that the fix in 1.7 may have caused further
crashes that were not resolved until 1.7.4. Yet other reports indicate other
drivers than Mesa may still have issues even after 1.7.4. Ultimately, there
may be no safe version of libX11 to use right now.

However, GLX, which uses libX11, is considered legacy at this point, with many
users transitioning to EGL instead. It seems reasonable to not allow GLX to be
used from multiple threads at all, unless overridden by a pref, to work around
this.

We already have a FEATURE_THREADSAFE_GL in place to denote this, which was
currently used mainly for Nouveau which is also unsafe to use on multiple
threads. If this feature fails, the CanvasRender thread is not used, and
all WebGL commands go back to being on the Renderer thread as normal, avoiding
the problem.

A further snag is that recent ANGLE updates required a larger CanvasRenderer
thread stack size to avoid exhausting the stack. This patch uncovers the fact
that the Renderer and Compositor threads did not similarly have their stack
sizes adjusted in case WebGL is running on those threads instead.

Differential Revision: https://phabricator.services.mozilla.com/D170992
2023-02-25 22:20:50 +00:00
Jonathan Kew 448dfffea4 Bug 1818412 - Flip the y-axis in GetFontExtents, to match gecko's coordinate space. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D170746
2023-02-25 20:59:45 +00:00
Jonathan Kew f1f7bf044d Bug 688193 - Remove call to CTFontManagerSetAutoActivationSetting from the startup path on macOS. r=gfx-reviewers,lsalzman
It shouldn't be necessary to do this at startup, only on first use of LookupLocalFont.
(We can also simplify things a bit: now that we don't support pre-10.6 systems where
the symbol wasn't present, we don't need to do a runtime dlsym() check.)

Differential Revision: https://phabricator.services.mozilla.com/D170998
2023-02-25 20:58:23 +00:00
Timothy Nikkel b9ea148a58 Bug 1818674. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D170847
2023-02-24 23:41:33 +00:00
sotaro f0340b38bf Bug 1818637 - Backout Bug 1817709 r=gfx-reviewers,bradwerth
The problem of Bug 1817269 happens also on Win 11. Then we do not have enough reason to block video overlay on Win10.

Differential Revision: https://phabricator.services.mozilla.com/D170835
2023-02-24 01:41:42 +00:00
Jonathan Kew aeec9224a6 Bug 688085 - Remove IDL method nsIFontEnumerator::UpdateFontList; just call gfxPlatform directly from widget/windows code where needed. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D170328
2023-02-23 21:45:12 +00:00
Jonathan Kew d1c5009e61 Bug 1818488 - Hoist access to gfxContext::GetTextDrawer() out of the glyph-rendering inner loop. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D170749
2023-02-23 21:44:34 +00:00
Jonathan Kew bf67e143fd Bug 1817854 - Update harfbuzz to release 7.0.1. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D170811
2023-02-23 21:43:47 +00:00
Erich Gubler 19553e0a37 Bug 1817271: fix ordering of WebGPU feature toggling when blocklisted r=webgpu-reviewers,jimb
In `gfx/config/gfxFeature.{h,cpp}`, it can be observed that a `mozilla::gfx::FeatureState` is
a state machine that collects different "levels" of enabled-ness. To summarize[^1], these are:

1. Default
2. User
3. Environment
4. Runtime

The rules for initializing each of these layers are basically that:

1. At least (1) must be initialized, otherwise, the feature is "unused".
2. Other levels may only be initialized (or re-initialized) if (a) all previous levels were
    initialized, and (b) no subsequent levels are initialized. Otherwise, throw an assertion
    error.

In the bug we're fixing here, we were attempting to configure the environment level before the user
level, which violates rule 2. Oops! Make sure we init the user level before initting the
environment level.

[^1]: You can find a better description of the intent of each layer at <https://searchfox.org/mozilla-central/rev/75da1dd5d4b9b991f919a41594194eab93cdef62/gfx/config/gfxFeature.h#147-155>.

Differential Revision: https://phabricator.services.mozilla.com/D170764
2023-02-23 17:41:14 +00:00
Brad Werth db56ec4f1f Bug 1817691: Make nsNativeLayerCA clean up rounding errors in update regions. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D170767
2023-02-23 17:24:44 +00:00
stransky e42ac0d5d9 Bug 1813407 Get widget size only once in RenderCompositorSWGL r=lsalzman
- Get widget size in RenderCompositorSWGL::BeginFrame() and save it for further use. That prevents flickering/artifacts if compositor widget size is changed during rendering.
- Request full screen update when widget size changes on Wayland.

Differential Revision: https://phabricator.services.mozilla.com/D169905
2023-02-23 10:52:14 +00:00
Jamie Nicol f90dfc0c14 Bug 1795592 - Allow wrench to run on recent Android versions. r=gbrown
To run webrender's wrench tests the app needs to read a file to parse
the command line args from, and write a file with the test
output. These files also need to be written and read manually over adb
by the engineer running the tests (or more likely by the
android_wrench.py script).

Currently we use the external data dir for these files. However, on
recent android versions these are no longer accessible to the app
without jumping through some hoops. This patch makes us instead use
the internal data dir. It also makes the app "debuggable" so that
these files can be written to via adb using run-as.

Additionally, we must ensure that the android_wrench.py script uses
run-as instead of root to push and pull the files, as root does not
have permission to do so on recent android versions.

Differential Revision: https://phabricator.services.mozilla.com/D169829
2023-02-23 10:04:34 +00:00
Csoregi Natalia dd188e11f2 Backed out changeset 05981db2f726 (bug 1743045) for causing failures on test_group_scrollend.html. CLOSED TREE 2023-02-23 04:23:40 +02:00
Dan Robertson 8ac30ce878 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-22 23:26:18 +00:00
Jonathan Kew 754f254acb Bug 1818224 - Make most things in nsFontMetrics const. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D170664
2023-02-22 18:11:34 +00:00
Iulian Moraru a6d122dc1c Backed out changeset 2ddeecc9100b (bug 1168182) for causing mochitest failures on test_wheel_scroll.html. CLOSED TREE 2023-02-22 21:32:15 +02:00
Dan Robertson e03ea6d72f Bug 1168182 - Bind wheel event targets to wheel transactions. r=masayuki,smaug
- Create wheel transactions for wheel events handled by APZ.
 - Group wheel events with the current wheel transaction, so that all
   wheel events in a wheel transaction are fired to the same element.
 - Store the current event target for the first event in a wheel
   transaction to be used for subsequent events.
 - Add the dom.event.wheel-event-groups.enabled preference as a feature
   flag for this behavior.

Differential Revision: https://phabricator.services.mozilla.com/D163484
2023-02-22 16:57:05 +00:00
Jonathan Kew c487d17dbb Bug 1818149 - Hoist access to textDrawer->GeckoClipRect() out of the inner DrawOneGlyph method. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D170578
2023-02-22 08:40:18 +00:00
Glenn Watson 986d097472 Bug 1818115 - Make FrameId be explicit u64 rather than usize r=gfx-reviewers,bradwerth
Simplifies some upcoming work to change how we store these when
updating primitive dependencies during picture cache updates.

Differential Revision: https://phabricator.services.mozilla.com/D170546
2023-02-22 03:59:32 +00:00
sotaro 75da1dd5d4 Bug 1817709 - Block video overlay with non-intel GPUs on Windows 10 r=jrmuizel,gfx-reviewers
Video overlay does not work well with non-intel GPUs on Windows 10. See Bug 1817269, Bug 1817617.

Differential Revision: https://phabricator.services.mozilla.com/D170311
2023-02-22 01:54:27 +00:00
Butkovits Atila d434d2fc49 Backed out changeset c33204e69e49 (bug 1743045) for causing failures at scroll-behavior-3.html. CLOSED TREE 2023-02-22 01:15:14 +02:00
Nicolas Silva ead11be6ca Bug 1817829 - Update wgpu to revision 74303308cd6030071889e865c40aa638214ed938. r=webgpu-reviewers,teoxoy
Depends on D170492

Differential Revision: https://phabricator.services.mozilla.com/D170493
2023-02-21 22:36:51 +00:00
Nicolas Silva 1e1d5892c3 Bug 1817829 - Don't enable wgpu's renderdoc feature by default. r=webgpu-reviewers,supply-chain-reviewers,teoxoy
It is unclear that we want it enabled for all users and this way we don't have to audit the changes in renderdoc-sys.
We can and should revisit this in the future if we feel like it would be useful to ship with webgpu+renderdoc integration.

Differential Revision: https://phabricator.services.mozilla.com/D170492
2023-02-21 22:36:50 +00:00
Dan Robertson 69572ca871 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-21 22:02:11 +00:00
Andrew Osmond e69fa7da55 Bug 1818047 - Add prefs to control WebRender scissored cache clears. r=gfx-reviewers,jrmuizel
This patch adds two new prefs, gfx.webrender.scissored-cache-clears
.enabled and .force-enabled to control its status beyond the blocklist.
The former is true by default and allows one to turn the feature off by
flipping it to false. The latter allows one to force the feature on even
if the blocklist disables it. It also adds the status to the decision
log in about:support.

Differential Revision: https://phabricator.services.mozilla.com/D170507
2023-02-21 20:50:58 +00:00
Brad Werth e452df9d3b Bug 1808155 Part 1: Make NativeLayerCA VIDEO_LOG more useful. r=mac-reviewers,mstange
This change makes the VIDEO_LOG only output the first surface sent to a
video layer (whether an AVSampleBufferDisplayLayer or a CALayer), and
notes whenever the video layer has been recreated. This will be helpful in
diagnosing cases degenerate cases where display of video content toggles
between a specialized video layer and a normal layer.

Differential Revision: https://phabricator.services.mozilla.com/D170154
2023-02-21 19:58:47 +00:00
Tom Schuster a809d9d021 Bug 1756175 - Implement roundRect for canvas2D. r=lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D168732
2023-02-21 19:41:49 +00:00