Currently SWGL stores separate copies of flat interpolants, uniforms, and samplers for vertex shaders and fragment shaders. We can just make the fragment shader inherit from the vertex shader, which allows us to only have to store one copy of these, and also obviates the need to store them out and read them back to transition from vertex shader to fragment shader per-primitive. This will help offset the performance cost of perspective checking in bug 1634447.
Differential Revision: https://phabricator.services.mozilla.com/D73299
Based on ideas discussed to solve bug 1633912, this patch implements allowing each shader to switch between no-perspective and perspective on per-primitive based on whether or not the primitive's W coordinates all match. This should be a sufficient stop-gap for now to unblock testing and development. Performance and memory usage costs of this approach will need to be evaluated before we decide whether to keep it long term.
Differential Revision: https://phabricator.services.mozilla.com/D73298
Initially, IPCInternal{Request,Response} had contained IPCStreams which would
result in unecessary copying when sending the objects over IPC. The patch
makes these streams either:
1) ParentToParentStream (just a UUID)
2) ParentToChildStream (a PIPCBlobInputStream actor, acting as a handle)
3) ChildToParentStream (a real IPCStream)
These three types are union-ed together by the BodyStreamVariant IPDL structure.
This structure replaces the IPCStream members in IPCInternal{Request,Response}
so that, depending on the particular IPDL protocol, we can avoid cloning streams
and just pass handles/IDs instead.
As a side effect, this makes file-backed Response objects cloneable. Initially,
these Responses would be backed by an nsFileInputStream, which is not cloneable
outside the parent process. They are now backed by IPCBlobInputStreams, which
are cloneable.
One thing that's not really satisfactory (IMO), is the manual management of
IPCBlobInputStreamStorage so that no streams are leaked, e.g. if we store a
stream in the IPCBlobInputStreamStorage but fail to send an IPC message and
therefore fail to remove the stream from storage on the other side of the IPC
boundary (only parent-to-parent in this case).
Differential Revision: https://phabricator.services.mozilla.com/D73173
This fixes and verifies precedence handling where system and builtin addons are updated in higher or lower precedence addon locations than other existing addons.
Differential Revision: https://phabricator.services.mozilla.com/D70060
This test checks several replaced meta viewport tags, exercising the code in
MobileViewportManager that changes resolution to maintain the proportional
amount of content visible in the display area as the viewport size changes.
It also checks the shrink-to-fit behavior of pages with user-scalable=no.
Differential Revision: https://phabricator.services.mozilla.com/D72762
To reduce intermittents in RDM tests, setTouchAndMetaViewportSupport and
spawnViewportTask now await reflow before resolving. Additionally an awaited
reflow in setViewportSizeAndAwaitReflow was changed to use the standard
method.
Differential Revision: https://phabricator.services.mozilla.com/D72969
This provides web compatability with Chrome's interpretation of the spec at
https://drafts.csswg.org/css-device-adapt/#user-zoom-desc. This changes makes
us treat "the user cannot interactively change the zoom factor" as inclusive
of ANY method of the user agent changing zoom levels, regardless of whether or
not the user initiated an action.
So, in addition to preventing things like double-tap-to-zoom and pinch-zoom,
this change prevents zoom changes to fit all content into the viewport, or to
maintain visible content proportionality if the viewport is resized dynamically.
This also adds an assert to cases where Document::GetViewportInfo returns a
viewport with a non-positive scale factor that it also sets the auto scale
flag.
This also adds a tentative web-platform test.
Differential Revision: https://phabricator.services.mozilla.com/D72004
Display the buffer size as powers of 2, using binary-friendly units (e.g., 64MiB).
Presets have been adjusted to powers of 2.
Note that the profiler still uses this number as maximum per process, but this will change when bug 1632750 lands.
Differential Revision: https://phabricator.services.mozilla.com/D73213
Changes:
Add several build types to the blacklist, so that for `try fuzzy/try chooser` users, these will not show unless `--full` is applied. For `try syntax` users, these will become non-schedulable.
Differential Revision: https://phabricator.services.mozilla.com/D72068
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
As bug 1544435, we blocked wbload.dll from being loaded in content processes.
Because that modules is injected via `user32!RegisterUserApiHook` and Windows
keeps trying to load hooking modules even if the previous attempt has failed,
blocking wbload.dll caused repetitive loading attempts in the tab process,
resulting in bad rendering performance.
This patch is to mitigate that performance issue by not calling `OpenThemeData`,
which is one of the entrypoints triggering user api hook, if the previous call
has failed. With this patch, performance is still slower than with the default
theme. We will seek out a long-term solution to solve the issue.
Differential Revision: https://phabricator.services.mozilla.com/D73344
It was generated by mixing every commit with "ignore-this-changeset" and
everything listed in .hg-annotate-ignore-revs, in topologic order.
The format was changed to:
```
# hg-sha1 - author - subject
cinnabar-sha1 # cinnabar
gecko-dev-sha1 # gecko-dev
```
The comment line corresponds to entries in .hg-annotate-ignore-revs (or
what they would look like for commits with "ignore-this-changeset").
Differential Revision: https://phabricator.services.mozilla.com/D73210
Per its definition in v-c-t, hg smart-annotate skips them in addition to
the contents of the .hg-annotate-ignore-revs file, so they don't need to
appear in the file.
Differential Revision: https://phabricator.services.mozilla.com/D73204
JSEP transceivers were previously held in a vector, in the order that they were
created. However, these could be removed, which meant that the indexing was not
stable. Under most circumstances this did not matter, however there was a
wrinkle with implicit rollback in repeated sRD. Re-applying a remote offer that
had created a transceiver would destroy that transceiver, and create a new one
to replace it. However, JS was not informed, because to PeerConnectionImpl it
looked like nothing had changed. Now, transceivers are indexed in a stable way,
which allows this bug to be fixed, and makes things a little less confusing.
Differential Revision: https://phabricator.services.mozilla.com/D70400