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

2976 Коммитов

Автор SHA1 Сообщение Дата
Imanol Fernandez d5b80b872a Bug 1633725 - Improve WebXR Garbage Collection. Respect XRRigidTransform.inverse and XRView.transform [SameObject] requirements. r=kip,daoshengmu,jgilbert
- Lazily create XRRigidTransform DOMPoints
- Reuse XRRigidTransform inverse (SameObject in the spec)
- Reuse XRView transform (SameObject in the spec)
- Reuse XRWebGLLayer viewport instances
- Pool XRViewerPose instances
- Pool XRFrame instances

Differential Revision: https://phabricator.services.mozilla.com/D73071
2020-05-01 01:42:39 +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
David Parks 180f310d81 Bug 1621762: Part 6 - Add and define IpdlQueue for WebGL IPC r=jgilbert
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
2020-04-30 22:24:00 +00:00
David Parks b18b3bfd97 Bug 1621762: Part 5 - Change PWebGL alloc+constructor to Initialize message r=jgilbert,jld
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
2020-04-30 22:23:48 +00:00
David Parks 7ac7bc9be6 Bug 1621762: Part 4 - Move some code from ProducerConsumerQueue.h to QueueParamTraits.h r=jgilbert
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
2020-04-30 22:23:10 +00:00
David Parks 8bd91e6a36 Bug 1621762: Part 3 - Make some classes generic to support multiple remote WebGL implementations r=jgilbert
* 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
2020-04-30 22:23:02 +00:00
David Parks fa401253a4 Bug 1621762 - Part 2: Refactor WebGL MethodDispatcher code used in remoting r=jgilbert
* 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
2020-04-30 22:22:52 +00:00
David Parks ac84c81927 Bug 1621762 - Part 1: Basic refactoring of ProducerConsumerQueue & CommandQueue r=jgilbert
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
2020-04-30 22:21:45 +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
David Parks d83a9ffcc2 Bug 1621762: Part 6 - Add and define IpdlQueue for WebGL IPC r=jgilbert
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
2020-04-30 01:03:51 +00:00
David Parks c917376c04 Bug 1621762: Part 5 - Change PWebGL alloc+constructor to Initialize message r=jgilbert,jld
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
2020-04-30 01:30:08 +00:00
David Parks 7b22a25f49 Bug 1621762: Part 4 - Move some code from ProducerConsumerQueue.h to QueueParamTraits.h r=jgilbert
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
2020-04-30 01:02:58 +00:00
David Parks b360387b15 Bug 1621762: Part 3 - Make some classes generic to support multiple remote WebGL implementations r=jgilbert
* 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
2020-04-30 01:25:27 +00:00
David Parks 85dde34bb1 Bug 1621762 - Part 2: Refactor WebGL MethodDispatcher code used in remoting r=jgilbert
* 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
2020-04-30 01:19:36 +00:00
David Parks 97aef305f8 Bug 1621762 - Part 1: Basic refactoring of ProducerConsumerQueue & CommandQueue r=jgilbert
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
2020-04-30 01:19:33 +00:00
Imanol Fernandez 0806eab98a Bug 1631823 - Disable XRWebGLLayer antialias by default on WebGL 2. Add support to enable behind a pref. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D71782
2020-04-27 18:03:03 +00:00
Coroiu Cristina 43be71277d Backed out 2 changesets (bug 1625500) for multiple failures on a CLOSED TREE
Backed out changeset 7d80233bcfcd (bug 1625500)
Backed out changeset 0a35b13dfcde (bug 1625500)
2020-04-17 15:36:05 +03:00
Gijs Kruitbosch cc39a339a0 Bug 1625500 - fix use of .then(x, x) in the tree, r=marionette-reviewers,Standard8,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D68614
2020-04-17 11:41:49 +00:00
Imanol Fernandez 025f4b6335 Bug 1630170 - Delete XRWebGLLayer Framebuffer on XRSession presentation end r=kip,jgilbert,daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D71063

--HG--
extra : moz-landing-system : lando
2020-04-15 21:58:13 +00:00
nicolaspacheco 9ac972aca4 Bug 1626776 - Delete redundant return statement at the end of a function with a void return type. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D70144

--HG--
extra : moz-landing-system : lando
2020-04-08 03:36:00 +00:00
Imanol Fernandez 9035f18d3a Bug 1614499 - Implement XRWebGLLayer r=jgilbert,daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D62809

--HG--
extra : moz-landing-system : lando
2020-04-07 18:48:13 +00:00
Andreas Farre f2fa2e633c Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika
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
2020-04-07 15:17:07 +00:00
Dzmitry Malyshau 3021defc28 Bug 1602133 - WebGPU presentation r=jgilbert,webidl,smaug,aosmond
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
2020-04-06 22:29:18 +00:00
Cosmin Sabou 2f4d9af7d3 Backed out changeset bc6b2b003c6e (bug 1602133) for causing build bustages on CanvasRenderingContextHelper.cpp.
--HG--
extra : histedit_source : 917f3627a3e3f8dab0d806b69fc716bfd9f1d483
2020-04-06 23:46:51 +03:00
Dzmitry Malyshau 5004affc0e Bug 1602133 - WebGPU presentation r=jgilbert,webidl,smaug,aosmond
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
2020-04-06 20:10:03 +00:00
Kearwood Gilbert 9136ce65cf Bug 1614496 - Implement WebXR Core Module DOM Interfaces r=jgilbert,daoshengmu,webidl,smaug,baku,imanol
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
2020-04-06 19:33:32 +00:00
Bogdan Tara 7f7cc68c64 Backed out changeset 377a757c583d (bug 1602133) for webgpu related bustages CLOSED TREE 2020-04-06 21:59:57 +03:00
Dzmitry Malyshau 4c3a924336 Bug 1602133 - WebGPU presentation r=jgilbert,webidl,smaug,aosmond
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
2020-04-02 19:55:01 +00:00
Sylvestre Ledru 0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Eric Rahm cbe7fbed12 Bug 1626444 - Remove nsAutoPtr usage from dom/canvas. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D69115

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:21 +00:00
Jonathan Kew 9ae6c0bed1 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787

--HG--
extra : moz-landing-system : lando
2020-04-02 01:38:18 +00:00
Ciure Andrei e1cb0f1e21 Backed out 4 changesets (bug 1619349, bug 1619350) for causing test_font_whitelist.html to fail CLOSED TREE
Backed out changeset ba16b09b5da0 (bug 1619349)
Backed out changeset f8ca02252dfc (bug 1619349)
Backed out changeset 01a2a527aa1a (bug 1619350)
Backed out changeset 67ee13868a44 (bug 1619350)
2020-04-02 04:34:31 +03:00
Jonathan Kew 82984492e6 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787

--HG--
extra : moz-landing-system : lando
2020-04-01 21:42:36 +00:00
Yannan Tuo ytuo 0a38e0ba85 Bug 1622654 - update while(mCaches.size()) to use .empty() r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D68677

--HG--
extra : moz-landing-system : lando
2020-04-01 21:32:54 +00:00
Jeff Gilbert cd6049bac5 Bug 1625404 - webgl.copyTexSubImage should lazily-initialize unwritten destination pixels. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D68938

--HG--
extra : moz-landing-system : lando
2020-03-31 01:00:50 +00:00
Daniel Varga dda7e26657 Backed out changeset 8717adb8b05b (bug 1625404) for causing node debugger failures
CLOSED TREE
2020-03-30 22:39:10 +03:00
Jeff Gilbert bab92087d4 Bug 1625404 - webgl.copyTexSubImage should not preserve existing dest rect contents. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D68516

--HG--
extra : moz-landing-system : lando
2020-03-30 18:50:30 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
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
2020-03-28 16:00:09 +00:00
André Bargull 2712714d84 Bug 1625138 - Part 35: Replace mozilla::TrueType with std::true_type. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68554

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:20 +00:00
André Bargull 9de017ffb8 Bug 1625138 - Part 33: Replace mozilla::IntegralConstant with std::integral_constant. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68552

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:19 +00:00
André Bargull cf0b1e89e9 Bug 1625138 - Part 30: Replace mozilla::RemoveCV with std::remove_cv. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68547

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:18 +00:00
André Bargull cae4e1fdbc Bug 1606962: Replace mozilla::EnableIf with std::enable_if. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68401

--HG--
extra : moz-landing-system : lando
2020-03-28 13:35:31 +00:00
André Bargull 3ee851a1a5 Bug 1625138 - Part 25: Replace mozilla::RemoveReference with std::remove_reference. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68380

--HG--
extra : moz-landing-system : lando
2020-03-28 14:16:19 +00:00
Simon Giesecke 0cc5c6e63f Bug 1052940 - Make Maybe<T> only declare copy/move operations if T is copyable/movable. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68172

--HG--
extra : moz-landing-system : lando
2020-03-27 14:10:45 +00:00
Jeff Gilbert 0e2a962631 Bug 1624944 - Uniform data uploads should accept SharedArrayBuffers. r=webidl,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D68508

--HG--
extra : moz-landing-system : lando
2020-03-27 08:37:28 +00:00
Jeff Gilbert b672f22f08 Bug 1624768 - Forbid multisampled unsized DEPTH_STENCIL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D68135

--HG--
extra : moz-landing-system : lando
2020-03-25 05:40:54 +00:00
Brindusan Cristian 4d9cd18676 Backed out changeset 58d155b0b54a (bug 1624768) for mochitest failures at test_2_conformance2__renderbuffers__multisampled-depth-renderbuffer-initialization.html. 2020-03-25 06:00:00 +02:00
Jeff Gilbert 0e9c40e7e2 Bug 1624768 - Forbid multisampled unsized DEPTH_STENCIL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D68135

--HG--
extra : moz-landing-system : lando
2020-03-25 01:40:41 +00:00