The recording by CanvasDrawEventRecorder into the ring buffer is not thread-safe
and so must all occur on the same (main) thread.
In addition to that it sometimes needs to send IPC messages via the PCanvas
protocol, which also can only be done on the main thread.
Differential Revision: https://phabricator.services.mozilla.com/D71174
UnpremultiplyRow will be used in the image encoders to reverse
premultiplication. SwizzleRow needs to support copying (no swizzling)
and swapping RGB/BGR.
Differential Revision: https://phabricator.services.mozilla.com/D66743
--HG--
extra : moz-landing-system : lando
Audit all the types related to app units [1] printed in
nsIFrame::List (and all the methods that override it), and use
ConvertToString to convert their printing format to CSS pixels if
needed.
In addition, add operator<< to BaseCoord so that it can cooperate with
mozilla::ToString, which is needed by ConvertToString.
[1] The types include nsRect, nsSize, nscoord, LogicalRect, and
LogicalSize.
Differential Revision: https://phabricator.services.mozilla.com/D69915
--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
The test added in this changeset is already fixed by the no-normalization change, but there are probably cases that require the explicit check that this patch adds.
When we were still normalizing the plane normals, the TransformAndClipBounds call in the added test was returning (1023.999878, 1023.999878, 0.000061, 0.000122).
Depends on D68703
Differential Revision: https://phabricator.services.mozilla.com/D68704
--HG--
extra : moz-landing-system : lando
For example, if the clipping rectangle has aClip.X() == 1024, then the normal for the clipping plane induced by the left edge of the clip will now be (1, 0, 0, -1024) rather than (0.0009765620343390458, 0, 0, -0.9999995231631829).
This change is mathematically valid:
- The dot products computed from these vectors become multiplied by planeNormal.Length() (compared to before this patch).
- The sign of the dot products is not affected, so the "intersection with plane" check is not affected:
`if ((nextDot >= 0.0) != (prevDot >= 0.0)) {`
- The value of the dot products is only used to compute `t`, as follows:
`F t = -prevDot / (nextDot - prevDot);`
Here, the length now appears both in the numerator and in the denominator, canceling itself out.
As a result from this change, the existing tests no longer require integer nudging in order to pass.
Depends on D68702
Differential Revision: https://phabricator.services.mozilla.com/D68703
--HG--
extra : moz-landing-system : lando
By using the destination DT we will use the correct offset
during playback instead of the offset of the reference target.
Differential Revision: https://phabricator.services.mozilla.com/D68495
--HG--
extra : rebase_source : cff20f1a467138e0d9fe3e22772bb3edbb409318
extra : source : 0e08a1d7fb078cc36882b737f00da2f48f9349a6
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
By using the destination DT we will use the correct offset
during playback instead of the offset of the reference target.
Differential Revision: https://phabricator.services.mozilla.com/D68495
--HG--
extra : moz-landing-system : lando
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.
Differential Revision: https://phabricator.services.mozilla.com/D68152
--HG--
extra : moz-landing-system : lando
So that accesses that use mSkipRect.XMost() - 4 or - 16 are aligned to a 4-byte
boundary. Not doing so would crash on some architectures due to a SIGBUS.
Differential Revision: https://phabricator.services.mozilla.com/D66748
--HG--
extra : moz-landing-system : lando
UnpremultiplyRow will be used in the image encoders to reverse
premultiplication. SwizzleRow needs to support copying (no swizzling)
and swapping RGB/BGR.
Differential Revision: https://phabricator.services.mozilla.com/D66743
--HG--
extra : moz-landing-system : lando
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.
This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.
There will be a follow up patch to enable color management everywhere by
default on all supported platforms.
Differential Revision: https://phabricator.services.mozilla.com/D64771
--HG--
extra : moz-landing-system : lando
WebRender won't support GDI fonts so we need to figure out what to do
with the users that are currently using them. This should help give us
better diagnostics on what's going wrong.
gfxCriticalError only crashes on Nightly and Beta builds
Differential Revision: https://phabricator.services.mozilla.com/D65342
--HG--
extra : moz-landing-system : lando
In DrawTargetRecording::CreateSimilarDrawTarget, we would originally
create a new DrawTargetRecording. For resources that are shared, such as
SVG patterns, we would do the same work for each blob image tile. This
can get expensive if the pattern is large. Now we check a size
threshold, and if passed, we create a DrawTargetSkia backed by a
SourceSurfaceSharedData. When we want a snapshot, we now try to get the
shared surface instead if available. The recording infrastructure
already knows how to handle the lifetimes and use of external IDs for
shared surfaces, so now we rasterize the pattern once for all the blob
tiles. In an ideal world we would do this in the compositor process
once, but that requires more changes, and this is useful as a stopgap in
the meantime.
Differential Revision: https://phabricator.services.mozilla.com/D63903
--HG--
extra : moz-landing-system : lando
This is generally around object creation failures and their subsequent lookup,
which can happen, for example, during device reset.
Differential Revision: https://phabricator.services.mozilla.com/D60888
--HG--
extra : moz-landing-system : lando