Now that most calls to `profiler_thread_is_being_profiled` have been updated, the `ThreadProfilingFeatures` can be made compulsory, to force callers to think about what they really want to know about the current profiling state.
Differential Revision: https://phabricator.services.mozilla.com/D130010
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.
Differential Revision: https://phabricator.services.mozilla.com/D130009
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.
This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.
Differential Revision: https://phabricator.services.mozilla.com/D126564
Now that WebGL runs on the Renderer thread in the compositor process
when OOP, we can now lift the threadsafe condition on Linux preventing
WebGL OOP. Regardless of webgl.out-of-process's setting, we should
always prefer by default to run worker WebGL contexts OOP to avoid
similar threadsafe conflicts in the content process.
Differential Revision: https://phabricator.services.mozilla.com/D129896
This patch causes us to move WebGL execution in the compositor process
from the Compositor thread to the Renderer thread. This has the
advantage of keeping all of our GL calls on the same thread, which makes
us work more like a typical application. This makes the drivers happy,
especially on Linux, and may allow us to move forward with OOP WebGL on
Linux.
Differential Revision: https://phabricator.services.mozilla.com/D127903
This patch adds the necessary IPDL plumbing to allow us to create WebGL
instances off the main thread in the content process, and to execute
them on the Renderer thread in the compositor process.
Differential Revision: https://phabricator.services.mozilla.com/D127839
IsAccelAngleSupported would always indicate ANGLE support on Windows but
we have a specific variant of GLLibraryEGL::CreateDisplay for use with
ANGLE which bypasses this check for the WebRender compositor. It is
otherwise only used for WebGL and non-Windows, so we can skip the
assertions here.
Differential Revision: https://phabricator.services.mozilla.com/D129895
The default size on most platforms is 256*256 which corresponds to the default blob tile size. I didn't check on android so I set it to 512*512 above which we never batch the upload so that the behavior is unchanged, but I suspect that a smaller threshold like 256*256 would also work better there.
On Windows with heavy blob image workloads, not batching gives a 20%-30% improvement to the time spent in update_texture_cache.
Differential Revision: https://phabricator.services.mozilla.com/D129516
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event. Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.
If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls. I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.
Differential Revision: https://phabricator.services.mozilla.com/D129781
For tests that actually test margin handling I've just removed the default
margin by adding:
<?xml-stylesheet href="data:text/css,menupopup{margin: 0}" type="text/css"?>
The other tests I've just fixed by accounting for the margins.
Differential Revision: https://phabricator.services.mozilla.com/D129866