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

28 Коммитов

Автор SHA1 Сообщение Дата
Kelsey Gilbert 7671a9d5a4 Bug 1801021 - Use BigBuffer for DispatchCommands. r=gfx-reviewers,lsalzman
Using ipc::Shmem causes unbounded shmem use growth until e.g. a Worker
yields to the event loop. If a Worker never yields, Shmems sent to WebGLParent
are never released.

Specifically the manager (PCanvasManager) for WebGLParent calls
DestroySharedMemory, which sends/enqueues for WebGLChild's manager a
matching call to ShmemDestroyed. However, while WebGLChild refuses to spin its
event loop (such as a no-return WASM Worker), the ShmemDestroyed events
will just pile up. Closing e.g. the tab frees the shmems, but they accumulate
unbounded until the Worker yields to the event loop.

This is true for other users of ipc::Shmem (or RaiiShmem) as well, but
entrypoints other than DispatchCommands are rarer and can be handled
later similarly.

Differential Revision: https://phabricator.services.mozilla.com/D162946
2022-11-25 22:20:38 +00:00
Marian-Vasile Laza 04d15c479b Backed out changeset fa04ef087c24 (bug 1801021) for causing bustages on WebGLChild.cpp. CLOSED TREE 2022-11-25 20:38:32 +02:00
Kelsey Gilbert cfebc1bd3c Bug 1801021 - Use BigBuffer for DispatchCommands. r=gfx-reviewers,lsalzman
Using ipc::Shmem causes unbounded shmem use growth until e.g. a Worker
yields to the event loop. If a Worker never yields, Shmems sent to WebGLParent
are never released.

Specifically the manager (PCanvasManager) for WebGLParent calls
DestroySharedMemory, which sends/enqueues for WebGLChild's manager a
matching call to ShmemDestroyed. However, while WebGLChild refuses to spin its
event loop (such as a no-return WASM Worker), the ShmemDestroyed events
will just pile up. Closing e.g. the tab frees the shmems, but they accumulate
unbounded until the Worker yields to the event loop.

This is true for other users of ipc::Shmem (or RaiiShmem) as well, but
entrypoints other than DispatchCommands are rarer and can be handled
later similarly.

Differential Revision: https://phabricator.services.mozilla.com/D162946
2022-11-25 15:46:53 +00:00
Kelsey Gilbert 2e7f5f28e7 Bug 1798703 - Enforce alignment for UniformData via union rather than overalignment. r=lsalzman
Reverts the overalignment from bug 1794237.

Differential Revision: https://phabricator.services.mozilla.com/D161360
2022-11-07 07:24:43 +00:00
Jim Blandy 2f5eb12516 Bug 1777656: Delete mozilla::ipc::SharedMemory::SharedMemorytype. r=nika,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D150852
2022-07-05 20:08:31 +00:00
Jeff Gilbert 998c436108 Bug 1699201 - Pretty-print Deserialize failure func name and badArgId. r=lsalzman
+ Assert initial shmem alignments match expectation.

Differential Revision: https://phabricator.services.mozilla.com/D112460
2021-04-17 03:45:10 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
unknown 7f28f17f33 Bug 1665280 - For RawBuffer reads, return a view into the shmem. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D90354
2020-09-16 07:16:48 +00:00
unknown 456d695946 Bug 1665289 - Convert WebGLChild's kDefaultCmdsShmemSize to a pref. r=lsalzman
Also reduce it from 100KB to 10KB, since we want more concurrency.

Differential Revision: https://phabricator.services.mozilla.com/D90358
2020-09-16 15:22:22 +00:00
unknown 639957d2c4 Bug 1665277 - Put "[WebGLChild] Flushed N bytes" behind GLContext::ShouldSpew. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D90352
2020-09-16 07:05:01 +00:00
Jeff Gilbert 79587135ae Bug 1661328 - Enable Mac webgl-ipc tests on Central. r=jmaher,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D89038
2020-09-01 23:29:01 +00:00
David Parks df6398ff5c Bug 1659523: Free WebGL command shmem when actor is destroyed r=jgilbert
Using the Shmem after our actor has lost IPC capability (say, because the other endpoint crashed) will cause the content process to also crash.  ActorDestroy is where we detect that condition.

Differential Revision: https://phabricator.services.mozilla.com/D87352
2020-08-25 21:33:15 +00:00
Jeff Gilbert f25a4cdbe8 Bug 1607940 - IPC TexImage. r=lsalzman,nika,handyman
Differential Revision: https://phabricator.services.mozilla.com/D83291
2020-07-21 22:57:01 +00:00
Jeff Gilbert 35f892e782 Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj
* Use clearer pref names.
* Default (and only support) IPDL dispatching.
* Make DispatchCommands async-only.
* Sync ipdl command per sync webgl entrypoint.
  * Eat the boilerplate cost, since there's not too many.
* Run SerializedSize off same path as Serialize.
* All shmem uploads go through normal DispatchCommands.
* Defer pruning of dead code for now so we can iterate quickly.
* Use Read/Write(begin,end) instead of (begin,size).
  * This would have prevented a bug where we read/wrote N*sizeof(T)*sizeof(T).

Differential Revision: https://phabricator.services.mozilla.com/D81495
2020-07-21 22:56:52 +00:00
David Parks 744a8b7f58 Bug 1635956: Part 3 - Implement Shmem functionality in WebGL ProducerConsumerQueue r=jgilbert
Implements LookupSharedMemory and AllocShmem in ProducerConsumerQueue (and fixes a few minor build issues).  To be used in construction of a ProducerConsumerQueue, an actor has to subclass IPcqActor.

Differential Revision: https://phabricator.services.mozilla.com/D74974
2020-06-02 06:18:52 +00:00
David Parks 66aa1517ba Bug 1632283 : Part 1 - Extend IpdlQueue to allow caching async messages r=jgilbert
IpdlQueue currently sends an async Ipdl message for every async WebGL call.  This is a lot of overhead.  This patch buffers those calls so that they can be send in large batches when either a synchronous call happens or the client calls FlushAsyncCache.  The commands are then sent and processed in-order.

Differential Revision: https://phabricator.services.mozilla.com/D72047
2020-06-01 22:33:00 +00:00
Razvan Maries 6ed9617381 Backed out 2 changesets (bug 1632283) for build buistages on IpdlQueue.h CLOSED TREE
Backed out changeset bad8fd79458d (bug 1632283)
Backed out changeset 8cfbadcbe2e8 (bug 1632283)
2020-06-01 22:24:31 +03:00
David Parks 919d391caf Bug 1632283 : Part 1 - Extend IpdlQueue to allow caching async messages r=jgilbert
IpdlQueue currently sends an async Ipdl message for every async WebGL call.  This is a lot of overhead.  This patch buffers those calls so that they can be send in large batches when either a synchronous call happens or the client calls FlushAsyncCache.  The commands are then sent and processed in-order.

Differential Revision: https://phabricator.services.mozilla.com/D72047
2020-05-29 20:25:35 +00:00
Narcis Beleuzu ad3d073808 Backed out changeset 7e47a8d17381 (bug 1632283) for build bustages on IpdlQueue.h . CLOSED TREE 2020-05-29 07:03:36 +03:00
David Parks 56caa29a7f Bug 1632283 : Part 1 - Extend IpdlQueue to allow caching async messages r=jgilbert
IpdlQueue currently sends an async Ipdl message for every async WebGL call.  This is a lot of overhead.  This patch buffers those calls so that they can be send in large batches when either a synchronous call happens or the client calls FlushAsyncCache.  The commands are then sent and processed in-order.

Differential Revision: https://phabricator.services.mozilla.com/D72047
2020-05-28 17:00:09 +00:00
David Parks 710d6e1015 Bug 1627305: Remove non-trivial macros from WebGL CommandQueue code r=jgilbert
Replaces DECLARE_METHOD_DISPATCHER and DEFINE_METHOD_DISPATCHER with generic classes.

Differential Revision: https://phabricator.services.mozilla.com/D69676
2020-04-30 22:25:09 +00:00
David Parks cbf4e1a5cc Bug 1621762: Part 7 - Add IpdlQueue actor traits to WebGLParent/WebGLChild r=jgilbert,jld
Adds IpdlQueue capability to PWebGL actors.  The WebGLChild, used in content processes, implements SyncProducerActor and AsyncConsumerActor because it sends (sync and async) messages and receives responses to them that it reads as async messages.  The WebGLParent, used in the compositor process, is a SyncConsumerActor and AsyncProducerActor for dual reasons.

Differential Revision: https://phabricator.services.mozilla.com/D68264
2020-04-30 22:24:44 +00:00
Daniel Varga 452acadb3b Backed out 7 changesets (bug 1621762) for causing build bustages at builds/worker/workspace/obj-build/dist/include/mozilla/dom/ProducerConsumerQueue.h
CLOSED TREE

Backed out changeset 03903e8f368e (bug 1621762)
Backed out changeset 21ef72486643 (bug 1621762)
Backed out changeset 70d103786c83 (bug 1621762)
Backed out changeset a3e1332998c3 (bug 1621762)
Backed out changeset 010f653b87d2 (bug 1621762)
Backed out changeset 0496adcb4582 (bug 1621762)
Backed out changeset 8d85420fd2e6 (bug 1621762)
2020-04-30 06:06:33 +03:00
David Parks 053f3b98ca Bug 1621762: Part 7 - Add IpdlQueue actor traits to WebGLParent/WebGLChild r=jgilbert,jld
Adds IpdlQueue capability to PWebGL actors.  The WebGLChild, used in content processes, implements SyncProducerActor and AsyncConsumerActor because it sends (sync and async) messages and receives responses to them that it reads as async messages.  The WebGLParent, used in the compositor process, is a SyncConsumerActor and AsyncProducerActor for dual reasons.

Differential Revision: https://phabricator.services.mozilla.com/D68264
2020-04-30 01:56:55 +00:00
Jeff Gilbert e1d0fe64bb Bug 1477756 - Client-side bindings mirror for precise CC, and merge similar codepaths. r=handyman
* Context loss using RAII
* Move Program reflection Client-side

Depends on D54018

Differential Revision: https://phabricator.services.mozilla.com/D54019

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:16 +00:00
David Parks 198fa063c2 Bug 1477756 - Initial out-of-process WebGL implementation. r=mccr8,handyman
Splits WebGLContext into ClientWebGLContext and HostWebGLContext.  The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process.  At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.

Differential Revision: https://phabricator.services.mozilla.com/D54018

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:14 +00:00