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

1205 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 4a72a442c0 Bug 1838906 - Part 2: Simplify the types for IPC::Channel::Listener, r=ipc-reviewers,necko-reviewers,kershaw,jld
Now that we've simplified the startup process somewhat, it is easier to clean
up IPC channel creation for NodeChannel connections. This stops having
GeckoChildProcessHost inherit from IPC::Channel::Listener, as it would never
receive most of the relevant callbacks, and instead implements the one callback
it would receive directly as a method on that type.

Differential Revision: https://phabricator.services.mozilla.com/D181282
2023-06-27 19:59:47 +00:00
serge-sans-paille ab13de4ec4 Bug 1839325 - Add missing header dependency on mozilla/PSandboxTestingChild.h r=bobowen,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D181446
2023-06-22 12:40:14 +00:00
sotaro 3ece048a1b Bug 1829063 - Split video overlay feature of software decoded video from nsIGfxInfo::FEATURE_VIDEO_OVERLAY r=gfx-reviewers,lsalzman
Current gecko enables "software decoded video overlay" only when "hardware decoded video overlay" is enabled. On current release, "hardware decoded video overlay" is not enabled yet with non-Intel GPU, then "software decoded video overlay" is not yet enabled on release. It is not good. We want to enable "software decoded video overlay" independently from "hardware decoded video overlay". Then settings of video overlay is split between "hardware decoded video overlay" and "software decoded video overlay". Then "software decoded video overlay" could be enabled/disabled independently from status of "hardware decoded video overlay".

* settings of hardware decoded video overlay
- nsIGfxInfo::FEATURE_VIDEO_OVERLAY:
- gfx.webrender.dcomp-video-hw-overlay-win
- gfx.webrender.dcomp-video-hw-overlay-win-force-enabled
- gfxVars::UseWebRenderDCompVideoHwOverlayWin()

* settings of software decoded video overlay
- nsIGfxInfo::FEATURE_VIDEO_SOFTWARE_OVERLAY
- gfx.webrender.dcomp-video-sw-overlay-win
- gfx.webrender.dcomp-video-sw-overlay-win-force-enabled
- gfxVars::UseWebRenderDCompVideoSwOverlayWin()

Differential Revision: https://phabricator.services.mozilla.com/D175993
2023-06-22 00:21:07 +00:00
Mike Hommey 1903893346 Bug 1836890 - Remove uses of chromium's OS_* macros in Gecko code. r=nika,media-playback-reviewers,keeler,gfx-reviewers,emilio,necko-reviewers,kershaw,karlt,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D180039
2023-06-06 20:00:47 +00:00
Nika Layzell 2f2588cf4f Bug 1828389 - Ensure IPC channel is closed with error after KillHard, r=ipc-reviewers,mccr8
This patch changes KillHard() such that the IPC channel is immediately
shut down with an error after a KillHard() is performed. This is done by
fixing the previously-broken CLOSE_CHANNEL_WITH_ERROR support in
ShutDownProcess, and calling that method after KillHard().

This ensures that after the process has been killed, no further messages
will be delivered and processed, even if they were sent before the
process was killed.

In addition, the assertions and KillHard calls which are disabled for
fuzzing were changed to also shut down the channel, making fuzzing IPC
errors cause the connection to be terminated like it is in production
for these actors.

This change does not impact actors which ignore processing errors.

Differential Revision: https://phabricator.services.mozilla.com/D178383
2023-05-26 17:44:57 +00:00
Stanca Serban 0d97343733 Backed out 2 changesets (bug 1807049, bug 1828389) for mozilla::ThreadEventTarget::Dispatch xpcshell related crashes. CLOSED TREE
Backed out changeset bbd8b8bbf677 (bug 1828389)
Backed out changeset 03bd5f26f9af (bug 1807049)
2023-05-20 07:38:09 +03:00
Nika Layzell c3ca248eeb Bug 1828389 - Ensure IPC channel is closed with error after KillHard, r=ipc-reviewers,mccr8
This patch changes KillHard() such that the IPC channel is immediately
shut down with an error after a KillHard() is performed. This is done by
fixing the previously-broken CLOSE_CHANNEL_WITH_ERROR support in
ShutDownProcess, and calling that method after KillHard().

This ensures that after the process has been killed, no further messages
will be delivered and processed, even if they were sent before the
process was killed.

In addition, the assertions and KillHard calls which are disabled for
fuzzing were changed to also shut down the channel, making fuzzing IPC
errors cause the connection to be terminated like it is in production
for these actors.

This change does not impact actors which ignore processing errors.

Differential Revision: https://phabricator.services.mozilla.com/D178383
2023-05-19 19:21:08 +00:00
Emilio Cobos Álvarez 86f1a48882 Bug 1830162 - Add array support to gfxVars, and use it for the DMABuf modifiers. r=stransky,gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D177376
2023-05-11 09:59:53 +00:00
Andrew Osmond 90299327da Bug 1827222 - GPUProcessManager should not allow (re)initialization during shutdown. r=jnicol
We already avoid launching the GPU process during shutdown, but shutdown
could happen after we initiated the launch and before it completes. Top
level IPDL protocols assert that we don't create them during shutdown,
so we need to be more diligent about checking for that.

Differential Revision: https://phabricator.services.mozilla.com/D175054
2023-05-02 14:56:26 +00:00
Nika Layzell 96288885ac Bug 1824465 - Part 9: Make PVsyncBridge refcounted, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D173724
2023-04-19 22:10:08 +00:00
Nika Layzell 27f0683118 Bug 1824465 - Part 8: Make PGPU refcounted, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D173723
2023-04-19 22:10:08 +00:00
Noemi Erli d637b3f05e Backed out 24 changesets (bug 1824465) for causing failures in nsISupportsImpl.cpp CLOSED TREE
Backed out changeset a5c8f22b7170 (bug 1824465)
Backed out changeset b551b655ac72 (bug 1824465)
Backed out changeset 0e6768a6419c (bug 1824465)
Backed out changeset fb115ebb7fe0 (bug 1824465)
Backed out changeset aaa7a2c8aa3b (bug 1824465)
Backed out changeset 7ef94bfa90b3 (bug 1824465)
Backed out changeset a4238fd6b86f (bug 1824465)
Backed out changeset 3a88e4cfbe45 (bug 1824465)
Backed out changeset 40c2467d3162 (bug 1824465)
Backed out changeset 8f900395c72c (bug 1824465)
Backed out changeset 92e4c6e4d73c (bug 1824465)
Backed out changeset 445c5d5d9661 (bug 1824465)
Backed out changeset de51ed5389d9 (bug 1824465)
Backed out changeset 72049d72bcb6 (bug 1824465)
Backed out changeset 126773c2427a (bug 1824465)
Backed out changeset 886e76bc80be (bug 1824465)
Backed out changeset a69a851411f0 (bug 1824465)
Backed out changeset 703599cf6189 (bug 1824465)
Backed out changeset 11ecb78ebc15 (bug 1824465)
Backed out changeset 563255aaa1e1 (bug 1824465)
Backed out changeset d1bf32c2a6c6 (bug 1824465)
Backed out changeset ef28b2777487 (bug 1824465)
Backed out changeset a2015d354bb1 (bug 1824465)
Backed out changeset 31d6b53fdc6a (bug 1824465)
2023-04-06 01:50:55 +03:00
Nika Layzell f6ee9822b0 Bug 1824465 - Part 9: Make PVsyncBridge refcounted, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D173724
2023-04-05 21:33:39 +00:00
Nika Layzell ce85df3482 Bug 1824465 - Part 8: Make PGPU refcounted, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D173723
2023-04-05 21:33:39 +00:00
sotaro 51e5156efa Bug 1824696 - Initialize gfxGradientCache in GPU process only when remote canvas is enabled r=gfx-reviewers,lsalzman
On Android, remote canvas is disabled. gfxGradientCache does not need to be initialized.

Differential Revision: https://phabricator.services.mozilla.com/D174058
2023-03-31 04:08:40 +00:00
Nika Layzell d57c9498f6 Bug 1825360 - Remove the NS_DISPATCH_SYNC flag, r=necko-reviewers,geckoview-reviewers,media-playback-reviewers,karlt,jesup,m_kato,emilio
This flag is not supported by most event targets and can have unexpected
side effects (namely spinning a nested event loop). All consumers have
been replaced with a new function which is more explicit about this side
effect.

Differential Revision: https://phabricator.services.mozilla.com/D173985
2023-03-30 16:53:51 +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
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
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
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
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
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
Jonathan Kew 4594ae314a Bug 1815404 - Replace most uses of gfxContext::CreateOrNull with stack-allocated contexts. r=gfx-reviewers,lsalzman
Depends on D170370

Differential Revision: https://phabricator.services.mozilla.com/D170371
2023-02-21 07:28:25 +00:00
Jonathan Kew 1b3e69f8aa Bug 1815404 - Remove refcounting from gfxContext. r=gfx-reviewers,lsalzman
Depends on D170367

Differential Revision: https://phabricator.services.mozilla.com/D170369
2023-02-21 07:28:24 +00:00
Makoto Kato a81830ccdb Bug 1812938 - Part 1. GetWidgetScreen returns Screen instead of nsIScreen. r=emilio,geckoview-reviewers,owlish
`nsIWidget` isn't scriptable, so it is unnecessary to return `nsIScreen` for
`GetWidgetScreen`.

Differential Revision: https://phabricator.services.mozilla.com/D168029
2023-02-06 04:51:26 +00:00
Nika Layzell 1cbf30fe37 Bug 1812156 - Part 1: Fix some IPDL statements to use fully qualified names, r=necko-reviewers,valentin
These types were used in IPDL but were not fully qualified.

Differential Revision: https://phabricator.services.mozilla.com/D168877
2023-02-04 10:44:24 +00:00
sotaro d55f5ec846 Bug 1810097 - Support AHardwareBuffer of out-of-process WebGL on Android r=lsalzman,gfx-reviewers
Modify AHardwareBuffer implementation as to support gl::SharedSurface of out-of-process WebGL. And remove unused AHardwareBuffer implementation.

By limiting AHardwareBuffer only in GPU process, AHardwareBuffer implementation becomes simpler. We do not need to handle cross process AHardwareBuffer delivery and cross process android Fence delivery.

Differential Revision: https://phabricator.services.mozilla.com/D167911
2023-01-27 21:35:26 +00:00
sotaro 53393b26d4 Bug 1811160 - Disable out-of-process WebGL and accelerated canvas when GPU process does not exists on android r=gfx-reviewers,lsalzman
On Android, GPU process exists by default. When GPU process does not exist, an error should disable GPU process.

On Android, WebGL handling process could easily crash. The crash could trigger disable GPU process. Current out-of-process WebGL implementation creates WebGLParent in parent process. Then a crash in parent process could be triggered by WebGL. Then it seems better to disable out-of-process WebGL when GPU process does not exist.

And it seems also better to disable accelerated canvas, since it uses WebGL for acceleration.

Differential Revision: https://phabricator.services.mozilla.com/D167512
2023-01-24 06:05:13 +00:00
Erich Gubler efa9189ed6 Bug 1753349 (6/9): fix: increase `CanvasRendererThread` stack size to 4k r=jgilbert,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167037
2023-01-19 04:47:53 +00:00
Stanca Serban cee760ed88 Backed out 9 changesets (bug 1753349) for causing failures in PoolAlloc.cpp. CLOSED TREE
Backed out changeset 84a5f26fe60b (bug 1753349)
Backed out changeset 28e0175becf4 (bug 1753349)
Backed out changeset 0ffcaedc8046 (bug 1753349)
Backed out changeset 2043cc15deec (bug 1753349)
Backed out changeset 556557955d59 (bug 1753349)
Backed out changeset cbb9e6545343 (bug 1753349)
Backed out changeset bed90cd9beb6 (bug 1753349)
Backed out changeset 1b71f995ae95 (bug 1753349)
Backed out changeset 1ad75c8ea7a4 (bug 1753349)
2023-01-18 23:58:22 +02:00
Erich Gubler 03452bbfc6 Bug 1753349 (6/9): fix: increase `CanvasRendererThread` stack size to 4k r=jgilbert,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167037
2023-01-18 20:56:10 +00:00
sotaro 954c16acec Bug 1805209 - Use RemoteTexture for WebGPU r=gfx-reviewers,lsalzman
WebGPU uses CompositableInProcessManager to push TextureHost directly from WebGPUParent to WebRender. But CompositableInProcessManager plumbing has a problem and caused Bug 1805209.

gecko already has a similar mechanism, called RemoteTextureMap. It is used in oop WebGL. If WebGPU uses RemoteTextureMap instead of CompositableInProcessManager, both WebGPU and oop WebGL use same mechanism.

WebGPUParent pushes a new texture to RemoteTextureMap. The RemoteTextureMap notifies the pushed texture to WebRenderImageHost.

Before the change, only one TextureHost is used for one swap chain. With the change, multiple TextureHosts are used for one swap chain with recycling.

The changes are followings.

- Use RemoteTextureMap instead of CompositableInProcessManager.
- Use RemoteTextureOwnerId instead of CompositableHandle.
- Use WebRenderCanvasData instead of WebRenderInProcessImageData.
- Add remote texture pushed callback functionality to RemoteTextureMap. With it, RemoteTextureMap notifies a new pushed remote texture to WebRenderImageHost.
- Remove CompositableInProcessManager.

Differential Revision: https://phabricator.services.mozilla.com/D164890
2022-12-23 20:41:02 +00:00
Nika Layzell 9e65358787 Bug 1799222 - Part 1: Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-16 17:09:16 +00:00
Botond Ballo 76348a974d Bug 1804457 - Restore branch in ClassifyCompositorOptionsChange() to support APZ enablement change on a best-effort basis. r=dlrobertson
Depends on D164162

Differential Revision: https://phabricator.services.mozilla.com/D164163
2022-12-08 04:13:18 +00:00
Botond Ballo bfce1c7657 Bug 1804457 - Add missing field to CompositorOptions::operator==. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D164162
2022-12-08 04:13:18 +00:00
Cristian Tuns 77f27d96b0 Backed out changeset 42315c023471 (bug 1799222) for causing multiple failures CLOSED TREE 2022-12-06 16:35:58 -05:00
Nika Layzell 40a3a64aee Bug 1799222 - Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-06 20:44:15 +00:00
Andrew Osmond 8471c103b9 Bug 1799016 - Ensure gfxVar updates are applied to GPU process before recreating compositor sessions. r=jnicol
When we fallback without recreating the GPU process, we should ensure
that the gfxVar updates have been processed before recreating the
compositor sessions. This is achieved by blocking on the sync
PGPU::SendDeviceStatus IPDL message. This additional sync message only
happens during fallback and thus should be fairly cheap.

Differential Revision: https://phabricator.services.mozilla.com/D162020
2022-11-15 14:28:30 +00:00
Florian Queze ea6e6f4fa1 Bug 1671490 - Mark the GPU process as being in the foreground whenever the parent process is in the foreground to make their priorities (and priority boosts) match, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D161065
2022-11-14 16:05:34 +00:00
Razvan Cojocaru 1629218702 Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
2022-11-04 18:29:35 +00:00
Jens Stutte 4e74c37f21 Bug 1798298 - Use nsThread::Shutdown to shut down the CanvasRenderThread. r=gfx-reviewers,sotaro
Differential Revision: https://phabricator.services.mozilla.com/D160799
2022-11-01 10:11:27 +00:00
Jens Stutte c2ea4a2af8 Bug 1797980 - Adjust CanvasRenderThread BHM and Task name, correct typo. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D160780
2022-10-31 12:23:51 +00:00
Andrew Osmond 9d245b8325 Bug 1794722 - Part 2. Remove all uses of gfxVars::UseWebRender(). r=jrmuizel,media-playback-reviewers,alwu
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160121
2022-10-28 12:36:06 +00:00
Cristian Tuns 1303ee58d8 Backed out 3 changesets (bug 1794722) for causing multiple failures on RemoteProcessMonitor CLOSED TREE
Backed out changeset 0217af5b1aa6 (bug 1794722)
Backed out changeset d7805be9dfb3 (bug 1794722)
Backed out changeset 0093f071f1a5 (bug 1794722)
2022-10-27 20:52:36 -04:00
Andrew Osmond 93abf26cbc Bug 1794722 - Part 2. Remove all uses of gfxVars::UseWebRender(). r=jrmuizel,media-playback-reviewers,alwu
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160121
2022-10-28 00:08:03 +00:00
Andreas Pehrson c7b43afeaa Bug 1795542 - s/GetCurrentSerialEventTarget/GetMainThreadSerialEventTarget/ in CrossProcessPaint. r=tnikkel
This lets us set up CrossProcessPaint from a TaskQueue on top of main thread.

Prior to this patch if such a TaskQueue was shut down with a pending
CrossProcessPaint in flight, we'd fail MozPromise assertions because of the
failed dispatch when resolving the CrossProcessPaint::ResolvePromise.

Differential Revision: https://phabricator.services.mozilla.com/D159603
2022-10-26 13:53:08 +00:00
sotaro fc8d330fb5 Bug 1797029 - Expose DXGISwapChain tearing support to about:support r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D160177
2022-10-26 05:42:49 +00:00
Jamie Nicol 4e75ea7392 Bug 1797068 - Ensure GPU process gets disabled after certain number of unstable launch attempts. r=aosmond
This was accidentally broken in bug 1768197.

Depends on D160042

Differential Revision: https://phabricator.services.mozilla.com/D160043
2022-10-24 14:53:41 +00:00
Nika Layzell f6ee20b0fd Bug 1783240 - Part 1: Remove unnecessary `Log` methods from ParamTraits impls, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,mccr8,alwu
These aren't used anywhere, so can be removed, simplifying some things.

Differential Revision: https://phabricator.services.mozilla.com/D153802
2022-09-28 19:25:12 +00:00
Kelsey Gilbert a32dfd5297 Bug 1785925 - Add LUT and Colorspace support to GLBlitHelper. r=lsalzman,media-playback-reviewers,alwu
This code was originally developed in bug 1771374, but here we omit the
DCLayerTree changes for later.

Differential Revision: https://phabricator.services.mozilla.com/D155027
2022-09-13 17:40:43 +00:00