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

1196 Коммитов

Автор SHA1 Сообщение Дата
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
Marian-Vasile Laza 7ec7dec6f1 Backed out changeset f1e6746037f7 (bug 1785925) for causing reftest failures on DCLayerTree.cpp. CLOSED TREE 2022-09-06 23:35:51 +03:00
Kelsey Gilbert 24a9bc97bb 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-06 18:36:34 +00:00
alwu 3d1bc29d56 Bug 1785738 - part4 : run media engine in the new utility process. r=gerard-majax,azebrowski
This patch moves the media engine from the RDD process to the new
utility process, and create video bridge between the new utility process
and the GPU process in order to share the texture.

Differential Revision: https://phabricator.services.mozilla.com/D155901
2022-09-03 00:53:59 +00:00
Cristian Tuns 3d56a1da28 Backed out changeset b14b975aa6d7 (bug 1785925) for causing build bustages on GLBlitHelper.cpp CLOSED TREE 2022-09-02 20:12:33 -04:00
Kelsey Gilbert 75cccdd5cb 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-02 22:15:58 +00:00
sotaro 7e5059e7a3 Bug 1783923 - Ensure WebRenderImageHost::OnReleased() is called during WebRenderBridgeParent shutdown r=gfx-reviewers,lsalzman
If WebRenderImageHost::OnReleased()  is called on all WebRenderImageHosts before RemoteTextureMap::Shutdown(), RemoteTextureMap does not own a reference of WebRenderImageHost during the shutdown.

On current gecko, when WebRenderImageHost is released by WebRenderBridgeParent::Destroy(), WebRenderImageHost::OnReleased() is not called. It needs to be addressed.

And RemoteTextureMap::Shutdown() need to be called after CompositorThreadHolder::Shutdown(). By it, we could expect that WebRenderBridgeParent::Destroy() is called on all WebRenderBridgeParents.

Differential Revision: https://phabricator.services.mozilla.com/D155673
2022-08-26 23:20:55 +00:00
Nika Layzell 45397cbfdd Bug 1779792 - Part 4: Deduplicate ProcessChild subclass constructors, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,alwu,mccr8
These constructors are unnecessary and can be defined with a `using` statement,
making it easier to change all constructors simultaneously.

Differential Revision: https://phabricator.services.mozilla.com/D153620
2022-08-10 14:55:23 +00:00
Nika Layzell 2ac29a461a Bug 1779792 - Part 3: Use an endpoint to bind the initial actor in parent processes, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,alwu,mccr8
This improves consistency with the child process case, and will make it easier
to attach additional state without needing to thread it through every child
process callsite manually.

Differential Revision: https://phabricator.services.mozilla.com/D153619
2022-08-10 14:55:22 +00:00
Nika Layzell d45df271ec Bug 1779792 - Part 2: Use an Endpoint to bind the initial actor in child processes, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,mccr8,alwu
This type is also used in other places to start non-initial actors, and will
allow us to attach additional state more easily without needing to thread it
through every child process callsite manually.

Differential Revision: https://phabricator.services.mozilla.com/D153618
2022-08-10 14:55:22 +00:00