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

2781 Коммитов

Автор SHA1 Сообщение Дата
Bob Owen 75f69ba6de Bug 1644208: Change RecordSourceSurfaceDestruction to take a void* not SourceSurface* to avoid AddRef during destructor. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D78770
2020-06-09 14:21:31 +00:00
Lee Salzman f84ee8c3dc Bug 1604357 - handle divide by zero in bezier inflection approximation range. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D77392
2020-05-29 10:54:28 +00:00
Lee Salzman 4b7890460b Bug 1640247 - silence UBSan recorded font warnings. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D77385
2020-05-29 10:51:07 +00:00
Bob Owen c6e63b484f Bug 1641578: Avoid crashing when Recorded surface or font storage fail to allocate. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D77271
2020-05-28 18:05:53 +00:00
Sylvestre Ledru 615c83d723 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +00:00
Timothy Nikkel cfedff2d38 Bug 1636273. Fix calculation of scroll position in AsyncPanZoomController::HandleDragEvent. r=kats,botond
The scroll position and scrollable rect are inside the zoom boundary so we need to use the composisted size inside the zoom boundary as well.

Differential Revision: https://phabricator.services.mozilla.com/D76089
2020-05-21 02:41:41 +00:00
Bob Owen bf951b6e5a Bug 1637339: Only validate constrained values when element read succeeded. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75570
2020-05-22 18:22:07 +00:00
Bob Owen df6bcdc9c5 Bug 1633791 part 3: Check that sizes have been read correctly from stream before allocation. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76450
2020-05-22 18:22:04 +00:00
Nicolas Silva 6c9aadb836 Bug 1239292 - Remove the multi-threaded job scheduler. r=jrmuizel
CLOSED TREE

Differential Revision: https://phabricator.services.mozilla.com/D76027
2020-05-20 20:04:05 +00:00
Lee Salzman e97b3d4035 Bug 1639563 - sanitize WR fonts. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76360
2020-05-22 15:48:55 +00:00
Mihai Alexandru Michis 21be705de1 Backed out changeset 8999f97966d2 (bug 1239292) for causing rs bustages.
CLOSED TREE
2020-05-22 20:05:24 +03:00
Nicolas Silva 77f659bffc Bug 1239292 - Remove the multi-threaded job scheduler. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76027
2020-05-20 20:04:05 +00:00
Lee Salzman c452d01a0d Bug 1639385 - add memory reporter for NativeFontResource data. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76259
2020-05-21 20:32:10 +00:00
Jeff Gilbert 5c34bc916d Bug 1639062 - Support RGBA in DrawTargetD2D1::OptimizeSourceSurface. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75882
2020-05-21 18:07:07 +00:00
Jeff Muizelaar 881b06790a Bug 1638331 - Expand the conditions for crashing in GetDWriteSystemFonts. r=jfkthame
We're not seeing any crashes so let's look for a null systemFonts
as well.

Differential Revision: https://phabricator.services.mozilla.com/D75546
2020-05-15 17:00:03 +00:00
Bob Owen ba603ff7e1 Bug 1607630: Use ScaledFonts to track the recording lifetime of UnscaledFonts. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D73873
2020-05-19 16:09:43 +00:00
Simon Giesecke 2e6385ca34 Bug 1626570 - Improve handling of copying arrays in gfx/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D73635
2020-05-05 12:55:27 +00:00
Lee Salzman cb7f18181e Bug 1627689 - check for valid surfaces in DrawTargetCairo::DrawSurfaceWithShadow. r=jrmuizel
This just duplicates some error checking we already do in DrawSurface to this case.

Differential Revision: https://phabricator.services.mozilla.com/D71209
2020-04-17 22:17:18 +00:00
Bob Owen 261ddce4a8 Bug 1630521: Allow CanvasDrawEventRecorder to control surface destruction recording, so it can be done on the main thread. r=jrmuizel
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
2020-04-16 17:13:16 +00:00
Joshua Gahan 3521ab2e07 Bug 1622655 - Replaced !mInvalidationListeners.size() with mInvalidationListeners.empty(). r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D70464

--HG--
extra : moz-landing-system : lando
2020-04-11 16:16:10 +00:00
Andrew Osmond 1a32712543 Bug 1622220 - Add UnpremultiplyRow and extend SwizzleRow. r=lsalzman
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
2020-04-08 12:50:40 +00:00
Ting-Yu Lin af15e4dfe8 Bug 1627398 Part 2 - Support printing frame tree in CSS pixels. r=heycam
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
2020-04-08 00:18:52 +00:00
Ting-Yu Lin 5a44b5df11 Bug 1624684 Part 3 - Let BaseMargin::ApplySkipSides return a reference to itself, and convert some callers. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D69759

--HG--
extra : moz-landing-system : lando
2020-04-07 18:43:51 +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
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
Botond Ballo bb18e79768 Bug 1627480 - Fix non-unified build errors in gfx/2d. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69729

--HG--
extra : moz-landing-system : lando
2020-04-04 23:48:48 +00:00
Nicolas Silva ca77a08ff3 Bug 1581475 - Don't attempt to draw if PreapreForDrawing fails. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D68844

--HG--
extra : moz-landing-system : lando
2020-04-02 18:27:35 +00:00
Markus Stange 04fd0b27d7 Bug 1626111 - Fix two variable names in Matrix4x4TypedFlagged::TransformAndClipBounds. r=bas
Differential Revision: https://phabricator.services.mozilla.com/D68930

--HG--
extra : moz-landing-system : lando
2020-04-02 04:01:01 +00:00
Markus Stange d00525a3a9 Bug 1626113 - Use mozilla::Span in TransformAndClipRect and do some refactoring. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D68929

--HG--
extra : moz-landing-system : lando
2020-04-02 04:01:01 +00:00
Markus Stange 6b7047492f Bug 1595038 - Make sure that TransformAndClipBounds returns an empty clipped rect when the clip itself is already empty. r=kip
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
2020-04-02 04:00:53 +00:00
Markus Stange 70151209d3 Bug 1595038 - Stop normalizing the plane normals, in order reduce error from floating point inaccuracies. r=kip
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
2020-04-01 01:06:23 +00:00
Markus Stange c1f3167506 Bug 1595038 - Add a planeNormal variable so that it's clear that the same plane is used for the entire inner loop. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D68702

--HG--
extra : moz-landing-system : lando
2020-04-02 02:42:17 +00:00
Jeff Muizelaar 44a1d84d88 Bug 1617708. Make ClippedDrawTarget use destination DT. a=reland
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
2020-03-27 03:15:05 +00:00
Sebastian Hengst 4a470594ac Backed out changeset 0e08a1d7fb07 (bug 1617708) for likely causing performance regression bug 1625071.
--HG--
extra : rebase_source : f912c901608e5783abb93607f963d29b035e5c84
2020-03-30 17:30:44 +02: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 62ab594247 Bug 1625138 - Part 39: Replace mozilla::IsSame with std::is_same in gfx/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68558

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +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 1be056677a Bug 1625138 - Part 26: Replace mozilla::Conditional with std::conditional. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68381

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:18 +00:00
Jeff Muizelaar b5242e1d14 Bug 1617708. Make ClippedDrawTarget use destination DT.
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
2020-03-27 03:15:05 +00:00
Chris Peterson b994ab8896 Bug 1624789 - Replace MOZ_MUST_USE with [[nodiscard]] in gfx. r=gfx-reviewers,nical
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
2020-03-25 10:35:04 +00:00
Lee Salzman e7163f076c Bug 1611467 - unify UnscaledFont::GetFontDescriptor and GetWRFontDescriptor implementations. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D68284

--HG--
extra : moz-landing-system : lando
2020-03-26 16:11:00 +00:00
Botond Ballo 6a4407c26e Bug 1621803 - Fix additional bugs in Matrix4x4Flagged::operator*(Matrix4x4). r=bas
Differential Revision: https://phabricator.services.mozilla.com/D66505

--HG--
extra : moz-landing-system : lando
2020-03-25 15:22:14 +00:00
Emilio Cobos Álvarez 575d8d016a Bug 1622113 - Ensure the skip rect end is aligned to a 4-byte boundary. r=mstange
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
2020-03-21 00:19:23 +00:00
sotaro b7a705dcef Bug 1623254 - Re-create DrawTarget of CanvasRenderingContext2D when the DrawTarget becomes invalid r=nical
Differential Revision: https://phabricator.services.mozilla.com/D67274

--HG--
extra : moz-landing-system : lando
2020-03-18 10:38:32 +00:00
Mihai Alexandru Michis b0060ff6a8 Backed out changeset 70b7dcfea394 (bug 1622220) for causing failures in gfx/2d/Swizzle.cpp
CLOSED TREE
2020-03-13 15:07:13 +02:00
Andrew Osmond acdd6810d2 Bug 1622220 - Add UnpremultiplyRow and extend SwizzleRow. r=lsalzman
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
2020-03-13 11:35:12 +00:00
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
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
2020-03-09 14:16:17 +00:00
Tim Nguyen 6cec94d9be Bug 1620328 - Set conic-gradient angle range on Skia. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D65910

--HG--
extra : moz-landing-system : lando
2020-03-08 21:46:06 +00:00
Andrew Osmond 4831a6bd0e Bug 1616030 - Fix SwizzleRow for big endian systems. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D65797

--HG--
extra : moz-landing-system : lando
2020-03-06 20:04:18 +00:00
Jeff Muizelaar c7fe1a2838 Bug 1619978. Crash sometimes if we fail to get the SystemFontCollection. r=jfkthame
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
2020-03-04 17:47:23 +00:00