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
The IpdlQueue (de)serializes types into arrays that are then passed to another process via IPDL messages. This means much less bloat than generating IPDL routines for each of the commands we send with WebGL. This IPDL queue is fairly basic -- it simply sends "async" commands through an async IPDL message and sync commands through a sync message. Future extensions, such as a facility for buffering async messages to be sent in bulk, are planned.
The IpdlQueue uses an existing actor to send messages. That actor should derive from one of the provided base classes and implement any needed IPDL message. For example, if the actor is used as the comsumer for sync messages then it should subclass SyncConsumerActor and should Recv (via IPDL) the ExchangeIpdlQueueData message -- the handler method for which is defined in the SyncProducerActor base class.
Differential Revision: https://phabricator.services.mozilla.com/D68263
We need to separate WebGL actor construction and initialization since IpdlQueue initialization needs the actor to already exist.
Differential Revision: https://phabricator.services.mozilla.com/D68262
Move QueueParamTraits, which are common between PCQ and IpdlQueue, to a file they both include. This also changes the namespace of a handful of the classes, like the Marshaller.
Differential Revision: https://phabricator.services.mozilla.com/D68260
* Templatize ProducerView/ConsumerView/(Sync)CommandSource/(Sync)CommandSink to allow both Pcq and Ipdl versions, as the client code is identical.
* Rename Producer/Consumer -> PcqProducer/PcqConsumer.
Differential Revision: https://phabricator.services.mozilla.com/D68259
* Remove CommandSink from WebGLMethodDispatcher. The parameter is unneeded.
* Make MethodDispatcher code simpler. This removes a layer of complexity (CommandDispatchDriver) involved in finding the correct method for a given ID number.
* Require WebGL methods whose signatures don't allow them to be remoted to directly call on the host object. They are: ReadPixels, GetVRFrame, GetInternalFormatParameter, GetBufferSubData, GetLinkResult and TexImage.
* Fix a bunch of compilation issues with busted PcqParamTraits.
* implement PcqParamTraits for some missing types
Differential Revision: https://phabricator.services.mozilla.com/D68257
A lot of simple changes to prepare for later patches in the series:
* PcqCommand -> QueueCommand, PcqStatus -> QueueStatus, PcqParamTraits -> QueueParamTraits
* Consolidate BasicSink/Source into CommandSink/Source
* SyncCommandSource::mConsumer -> mResponseSink, SyncCommandSink::mProducer -> mResponseSource, CommandSource::mProducer -> mSource, CommandSink::mConsumer -> mSink
* Rename WebGLPcqParamTraits.h to WebGLQueueParamTraits.h
* ProducerConsumerQueue struct -> class.
* ProducerConsumerQueue::mProducer/mConsumer access -> ProducerConsumerQueue::TakeProducer/TakeConsumer
* Rename QueueStatus enum elements to follow style convention.
* Rename Status() to GetStatus() in ProducerView and ConsumerView to appease Linux.
* Rename CommandResult enum values to fit convention (and avoid Linux conflict with Success).
Differential Revision: https://phabricator.services.mozilla.com/D68256
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
The IpdlQueue (de)serializes types into arrays that are then passed to another process via IPDL messages. This means much less bloat than generating IPDL routines for each of the commands we send with WebGL. This IPDL queue is fairly basic -- it simply sends "async" commands through an async IPDL message and sync commands through a sync message. Future extensions, such as a facility for buffering async messages to be sent in bulk, are planned.
The IpdlQueue uses an existing actor to send messages. That actor should derive from one of the provided base classes and implement any needed IPDL message. For example, if the actor is used as the comsumer for sync messages then it should subclass SyncConsumerActor and should Recv (via IPDL) the ExchangeIpdlQueueData message -- the handler method for which is defined in the SyncProducerActor base class.
Differential Revision: https://phabricator.services.mozilla.com/D68263
We need to separate WebGL actor construction and initialization since IpdlQueue initialization needs the actor to already exist.
Differential Revision: https://phabricator.services.mozilla.com/D68262
Move QueueParamTraits, which are common between PCQ and IpdlQueue, to a file they both include. This also changes the namespace of a handful of the classes, like the Marshaller.
Differential Revision: https://phabricator.services.mozilla.com/D68260
* Templatize ProducerView/ConsumerView/(Sync)CommandSource/(Sync)CommandSink to allow both Pcq and Ipdl versions, as the client code is identical.
* Rename Producer/Consumer -> PcqProducer/PcqConsumer.
Differential Revision: https://phabricator.services.mozilla.com/D68259
* Remove CommandSink from WebGLMethodDispatcher. The parameter is unneeded.
* Make MethodDispatcher code simpler. This removes a layer of complexity (CommandDispatchDriver) involved in finding the correct method for a given ID number.
* Require WebGL methods whose signatures don't allow them to be remoted to directly call on the host object. They are: ReadPixels, GetVRFrame, GetInternalFormatParameter, GetBufferSubData, GetLinkResult and TexImage.
* Fix a bunch of compilation issues with busted PcqParamTraits.
* implement PcqParamTraits for some missing types
Differential Revision: https://phabricator.services.mozilla.com/D68257
A lot of simple changes to prepare for later patches in the series:
* PcqCommand -> QueueCommand, PcqStatus -> QueueStatus, PcqParamTraits -> QueueParamTraits
* Consolidate BasicSink/Source into CommandSink/Source
* SyncCommandSource::mConsumer -> mResponseSink, SyncCommandSink::mProducer -> mResponseSource, CommandSource::mProducer -> mSource, CommandSink::mConsumer -> mSink
* Rename WebGLPcqParamTraits.h to WebGLQueueParamTraits.h
* ProducerConsumerQueue struct -> class.
* ProducerConsumerQueue::mProducer/mConsumer access -> ProducerConsumerQueue::TakeProducer/TakeConsumer
* Rename QueueStatus enum elements to follow style convention.
* Rename Status() to GetStatus() in ProducerView and ConsumerView to appease Linux.
* Rename CommandResult enum values to fit convention (and avoid Linux conflict with Success).
Differential Revision: https://phabricator.services.mozilla.com/D68256
This patch also tries to remove the event target entirely if it would
default to the main thread on a null event target.
Depends on D67634
Differential Revision: https://phabricator.services.mozilla.com/D67635
--HG--
extra : moz-landing-system : lando
This change adds support for CanvasContext presenting WebGPU via CPU readback.
The presentation is handled mostly on GPU process side by managing a list of staging buffers
and copying the contents into a WR external image (backed by an external buffer).
Differential Revision: https://phabricator.services.mozilla.com/D68032
--HG--
extra : moz-landing-system : lando
This change adds support for CanvasContext presenting WebGPU via CPU readback.
The presentation is handled mostly on GPU process side by managing a list of staging buffers
and copying the contents into a WR external image (backed by an external buffer).
Differential Revision: https://phabricator.services.mozilla.com/D68032
--HG--
extra : moz-landing-system : lando
Implement DOM interfaces for the WebXR Core Module. Additional work to implement the WebXR Core Module are marked with TODO (Bug #) comments within the patch and must be landed before enabling the dom.vr.webxr.enabled flag.
Differential Revision: https://phabricator.services.mozilla.com/D62369
--HG--
extra : moz-landing-system : lando
This change adds support for CanvasContext presenting WebGPU via CPU readback.
The presentation is handled mostly on GPU process side by managing a list of staging buffers
and copying the contents into a WR external image (backed by an external buffer).
Differential Revision: https://phabricator.services.mozilla.com/D68032
--HG--
extra : moz-landing-system : lando
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.
Differential Revision: https://phabricator.services.mozilla.com/D68561
--HG--
extra : moz-landing-system : lando