Jonathan Kew
21e094be9a
Bug 1856035 - Backed out changeset 57fec34232bd for regression behavior on macOS 11 and 12.
...
Not sure why the new implementation doesn't work on older OS versions,
but these APIs are inadequately documented and liable to change behavior
between releases. So just go with what works, as shown by testing.
Differential Revision: https://phabricator.services.mozilla.com/D190500
2023-10-09 18:53:01 +00:00
Jonathan Kew
ff399246f1
Bug 1856035 - Rework the management of font variation settings across CoreGraphics and CoreText font instances. r=gfx-reviewers,lsalzman
...
It appears that when a Core Text font is instantiated from a CGFont or from a font descriptor,
its optical-size setting now always gets assigned according to the font size being created,
overriding any 'opsz' variation that was already specified on the CGFont or the CTFontDescriptor.
(This seems to be a behavior change compared to older macOS versions.)
To get the desired 'opsz' setting on the Core Text font, it seems to be necessary to use
CTFontCreateCopyWithAttributes to get a modified copy of an already-existing CTFont.
Differential Revision: https://phabricator.services.mozilla.com/D190389
2023-10-08 11:56:49 +00:00
Butkovits Atila
dc4f0dd2a4
Backed out 3 changesets (bug 1803406) for causing WR bustages. CLOSED TREE
...
Backed out changeset 91f12411aff1 (bug 1803406)
Backed out changeset edb458dfa8b8 (bug 1803406)
Backed out changeset 9c4a875ec67d (bug 1803406)
2023-09-29 21:33:03 +03:00
Jonathan Kew
d7baedb599
Bug 1803406 - Ensure consistent font lists across macOS processes, and use the kCTFontOptionsPreferSystemFont option when instantiating Core Text fonts. r=gfx-reviewers,lsalzman
...
This aims to avoid conflicts with user-installed fonts that shadow system fonts,
where there is a risk that different processes end up using different, incompatible
versions of "the same" font (i.e. they resolve the same font descriptor to different
resources).
Differential Revision: https://phabricator.services.mozilla.com/D170286
2023-09-29 17:58:17 +00:00
Bob Owen
324c055150
Bug 1850983: Add check for correct format in DrawTarget::IntoLuminanceSource. r=jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D187561
2023-09-15 17:48:14 +00:00
Bob Owen
033ddf773e
Bug 1850180: Release assert on too many PopLayers in DrawTargetSkia and DrawTargetCairo. r=jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D187470
2023-09-15 17:47:30 +00:00
Masatoshi Kimura
0f09dfdb3e
Bug 1852806 - Remove macros for older Windows SDK from gfx/. r=gfx-reviewers,lsalzman
...
Depends on D188022
Differential Revision: https://phabricator.services.mozilla.com/D188023
2023-09-15 03:19:26 +00:00
Cosmin Sabou
f8c16a8f94
Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_power_telemetry.html. CLOSED TREE
...
Backed out changeset faea1f4cb9a9 (bug 1852806)
Backed out changeset 4db93c374f9b (bug 1852806)
Backed out changeset 7e40e0e04921 (bug 1852806)
Backed out changeset b0a66c4269ce (bug 1852806)
Backed out changeset 4ff3545936f9 (bug 1852806)
Backed out changeset 02c0a8eb3fd6 (bug 1852806)
Backed out changeset ae2c7b33acfb (bug 1852806)
Backed out changeset 2b89ba254a1a (bug 1852806)
Backed out changeset dfa4f73fc548 (bug 1852806)
Backed out changeset daffcc4c1877 (bug 1852806)
Backed out changeset 33855bcdf15e (bug 1852806)
Backed out changeset 694f29707f3e (bug 1852806)
Backed out changeset 1891eda22a59 (bug 1852806)
Backed out changeset 1b854941389c (bug 1852806)
Backed out changeset 2f7cfe04be59 (bug 1852806)
2023-09-15 09:48:27 +03:00
Masatoshi Kimura
f9d563c0c9
Bug 1852806 - Remove macros for older Windows SDK from gfx/. r=gfx-reviewers,lsalzman
...
Depends on D188022
Differential Revision: https://phabricator.services.mozilla.com/D188023
2023-09-15 03:19:26 +00:00
Razvan Cojocaru
7904413197
Bug 1843954 - Have Coord * Primitive
and Coord / Primitive
return Coord
. r=botond
...
While at it, improve the readability of the enable_if
IntCoordTyped constructor.
Differential Revision: https://phabricator.services.mozilla.com/D184573
2023-09-14 00:37:04 +00:00
Bob Owen
6cee752c49
Bug 1850072: Initialize RecordedDrawTargetCreation::mHasExistingData. r=jrmuizel
...
This also specializes ElementStreamFormat for bool.
Differential Revision: https://phabricator.services.mozilla.com/D187794
2023-09-12 11:51:11 +00:00
Brad Werth
bd88b9118f
Bug 1851861 Part 2: Add a null-check at another callsite of CreateOffsetDrawTarget. r=gfx-reviewers,lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D187730
2023-09-08 15:14:45 +00:00
Chris Peterson
468401c1af
Bug 1850883 - Remove always-true OnHighSierraOrLater() and OnCatalinaOrLater() version checks. r=gfx-reviewers,lsalzman
...
And stop including nsCocoaFeatures.h where it's no longer needed.
Firefox versions >= 116 only support macOS >= 10.15. High Sierra is macOS 10.13. Catalina is macOS 10.15.
Differential Revision: https://phabricator.services.mozilla.com/D187645
2023-09-07 23:07:57 +00:00
Brad Werth
fa097e4d1e
Bug 1851861: Null-check more calls that attempt to create a DrawTarget. r=gfx-reviewers,lsalzman
...
Most of our calls that create a DrawTarget are null-checked. This patch
fixes up the few that were not already checked.
Differential Revision: https://phabricator.services.mozilla.com/D187586
2023-09-06 20:13:22 +00:00
Bob Owen
c1c73dc306
Bug 1846686: Remove DataSourceSurfaces when adding SourceSurfaces to CanvasTranslator. r=jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D186171
2023-09-03 10:49:49 +00:00
Bob Owen
d3e6d914c9
Bug 1846685
: Add PathOps::CheckedStreamToSink and use for event playback. r=jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D186161
2023-09-02 16:13:30 +00:00
Bob Owen
06eb6baba2
Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D186148
2023-09-02 12:22:22 +00:00
Markus Stange
e4ba2c2700
Bug 1850357 - Use nsTHashMap in DrawEventRecorder instead of unordered_map. r=jrmuizel
...
On Windows, unordered_map appears to allocate memory for empty sets.
Differential Revision: https://phabricator.services.mozilla.com/D186959
2023-08-28 23:11:04 +00:00
Markus Stange
2e9dce4692
Bug 1850357 - Use nsTHashSet in DrawEventRecorder instead of unordered_set. r=jrmuizel
...
On Windows, unordered_set appears to allocate memory for empty sets.
Differential Revision: https://phabricator.services.mozilla.com/D186958
2023-08-28 23:11:04 +00:00
Masatoshi Kimura
1791eb68d0
Bug 1850034 - Remove pre-Win10-specific codepath from gfx/. r=gfx-reviewers,lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D186809
2023-08-26 23:44:57 +00:00
Jeff Muizelaar
603d8416af
Bug 1849458. Fix the order of beginPoint/currentPoint. r=gfx-reviewers,aosmond
...
I don't quite understand why this fixes the problem but it's
obviously more correct.
Differential Revision: https://phabricator.services.mozilla.com/D186869
2023-08-25 20:38:13 +00:00
Brad Werth
967de2ef02
Bug 1846694: Additional validation in RecordedSourceSurfaceCreation. r=gfx-reviewers,jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D185354
2023-08-10 18:37:08 +00:00
Bas Schouten
7b32e3d1ea
Bug 1848050: Optimize individual line drawing in canvas recording backend. r=jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D185870
2023-08-10 14:49:50 +00:00
Timothy Nikkel
1a15b46e51
Bug 1847149. Make PathBuilderD2D::Arc handle all start and end angles properly. r=lsalzman
...
This steals some code from ArcToBezier https://searchfox.org/mozilla-central/rev/fb43eb3bdf5b51000bc7dfe3474cbe56ca2ab63c/gfx/2d/PathHelpers.h#127 so that the start and end angle are within 2*Pi and so that they are in the correct numerical order depending if we are sweeping clockwise or anticlockwise. This makes calculations easier. Specifically it makes the determination of arc size (more or less than Pi) work below. This replaces some code which tried to do something similar but did not account for all cases.
Differential Revision: https://phabricator.services.mozilla.com/D185517
2023-08-07 02:05:30 +00:00
Jonathan Kew
bee329b01d
Bug 1845813 - Null-check the variation tag dictionary before trying to apply it to the font. r=gfx-reviewers,lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D185268
2023-08-03 13:29:32 +00:00
Jeff Muizelaar
eb40f86c43
Bug 1846613. Use ArcToBezier for D2D until the D2D Arc bugs are fixed. r=ahale
...
This should roughly approximate the behaviour we had prior to bug 1839470
Differential Revision: https://phabricator.services.mozilla.com/D185217
2023-08-02 22:06:26 +00:00
Chris Peterson
29300d010e
Bug 1846113 - Remove some always-true macOS version checks now that Firefox only supports macOS >= 10.15. r=gfx-reviewers,jgilbert
...
Also remove mNeedsFakeNoStencil_UserFBs code in WebGLContext.h/cpp that was only needed on Intel macOS <= 10.11.
Differential Revision: https://phabricator.services.mozilla.com/D184880
2023-08-01 05:05:48 +00:00
Lee Salzman
b2d67698b9
Bug 1846079 - Ensure pruned point begins first sub-path if necessary. r=aosmond
...
The Canvas2D specification says that if a path has no active sub-paths, and a
primitive is drawn, that the first point of that primitive becomes the start of
the newly created sub-path that will be created for it.
So if we prune a point when a path has no active sub-paths, and then a new
primitive comes in that does not start with that same point, we risk not
installing the pruned point as the start of that new sub-path.
To solve this, we need to detect if a path has no active sub-paths while
we are building it. This adds PathBuilder::IsActive() to help with that.
Then before we go to add a primitive, we check if there is a pruned point
on a path that is not active yet, and if so, install the correct start
point with a MoveTo.
This also makes IsActive and IsEmpty required so to ensure all our path
implementations behave consistently rather than having any surprising
unimplemented behavior.
Differential Revision: https://phabricator.services.mozilla.com/D184891
2023-07-30 14:31:09 +00:00
Razvan Cojocaru
89781782f2
Bug 1844406 - Remove struct CommonType and use automatic return type deduction in Coord.h. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D184026
2023-07-21 02:17:43 +00:00
Razvan Cojocaru
d198960808
Bug 1841729 - Change the return type of BaseMargin::{LeftRight,TopBottom}() to Coord. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D183570
2023-07-17 21:18:17 +00:00
Razvan Cojocaru
90f7a9440b
Bug 1841728 - Change the parameter types of BaseMargin::SizeTo() to Coord. r=dlrobertson
...
Differential Revision: https://phabricator.services.mozilla.com/D183185
2023-07-13 14:24:05 +00:00
Razvan Cojocaru
679740122d
No bug - Remove unreachable return in BasePoint::IsFinite(). r=dlrobertson
...
Differential Revision: https://phabricator.services.mozilla.com/D183113
2023-07-13 14:23:35 +00:00
Razvan Cojocaru
23aa72ebf6
Bug 1841478 - Use strongly-typed coordinates in the BaseSize constructor. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D182654
2023-07-10 02:59:01 +00:00
Razvan Cojocaru
74639ffcbe
Bug 1842072 - Prevent IntCoordTyped's constructor from accepting non-integral parameters. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D182936
2023-07-08 07:45:44 +00:00
Markus Stange
47e01cd2cc
Bug 1842271 - Remove unused files QuartzSupport.h/mm. These were used for plug-in rendering. r=jrmuizel
...
Differential Revision: https://phabricator.services.mozilla.com/D183036
2023-07-07 19:07:37 +00:00
Botond Ballo
9ac8419b70
Bug 1841731 - Remove obsolete comment from description of BaseMatrix::ScaleFactors(). r=rzvncj
...
Differential Revision: https://phabricator.services.mozilla.com/D182756
2023-07-05 05:57:47 +00:00
Razvan Cojocaru
51f6032d4d
Bug 1840485 - Change the type of BaseMargin::{top,right,bottom,left} to Coord. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D182328
2023-07-01 02:23:21 +00:00
Jeff Muizelaar
429e6a1c2d
Bug 1840756 - PathRecording: Detect open and closed circles. r=lsalzman
...
This lets us detect open circles and fast path filling them while falling
back to regular stroking
Differential Revision: https://phabricator.services.mozilla.com/D182292
2023-06-29 15:55:05 +00:00
Bob Owen
f2741a022a
Bug 1838792: Add TryAddStoredObject to DrawEventRecorderPrivate and use in DrawTargetRecording. r=aosmond
...
This means we can do a combination of HasStoredObject and AddStoredObject with
only one call to ProcessPendingDeletions, which uses locking.
Differential Revision: https://phabricator.services.mozilla.com/D181963
2023-06-27 13:58:58 +00:00
Razvan Cojocaru
ebe5d60c5d
Bug 1838107 - Use strongly-typed coordinates in the BaseMargin constructor. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D180835
2023-06-23 20:24:53 +00:00
Jeff Muizelaar
b0be30319d
Bug 1839782 - Only serialize dashOfffset if we have a dashPattern. r=lsalzman
...
This should save a little bit of serialization space on SP3
Differential Revision: https://phabricator.services.mozilla.com/D181718
2023-06-22 13:32:56 +00:00
Jeff Muizelaar
60eb91527f
Bug 1839490 - Add FillCircle to DrawTarget. r=lsalzman
...
This detects and forwards circles in DrawTargetRecording and also implements
StrokeCircle and FillCircle in D2D.
Differential Revision: https://phabricator.services.mozilla.com/D181559
2023-06-22 00:11:10 +00:00
Jeff Muizelaar
8150b93bc2
Bug 1839482 - Detect circles in DrawTargetRecording and substitute StrokeCircle. r=lsalzman
...
It's common when using canvas to create circles using the arc() function.
This lets us detect those cases and stroke them directly.
Differential Revision: https://phabricator.services.mozilla.com/D181550
2023-06-21 20:44:27 +00:00
Cristina Horotan
787f7fb3f8
Backed out changeset 0385fd58acfe (bug 1839482) for causing mochitest failures at PathRecording.cpp CLOSED TREE
2023-06-21 19:15:46 +03:00
Jeff Muizelaar
b43c763ffc
Bug 1839482 - Detect circles in DrawTargetRecording and substitute StrokeCircle. r=lsalzman
...
It's common when using canvas to create circles using the arc() function.
This lets us detect those cases and stroke them directly.
Differential Revision: https://phabricator.services.mozilla.com/D181550
2023-06-21 14:54:40 +00:00
Jeff Muizelaar
2c84305426
Bug 1839474 - Add support for directly stroking circles to DrawTarget. r=lsalzman
...
D2D has a more efficient path when asked to stroke circles
vs. circular paths. This will let us use that.
Differential Revision: https://phabricator.services.mozilla.com/D181545
2023-06-20 19:28:48 +00:00
Jeff Muizelaar
066cf0ea29
Bug 1838762 - Use a uint8_t for EventType. r=lsalzman
...
This reduces the serialization size a little.
Differential Revision: https://phabricator.services.mozilla.com/D181177
2023-06-17 03:06:29 +00:00
Thiago Marques
f3e0985c12
Bug 1837832 - Change parameter types from T to Coord where appropriate in the remainder of the BasePoint interface r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D180814
2023-06-16 18:04:23 +00:00
Andrew Osmond
80c7c674a6
Bug 691187 - Prune zero-length segments for canvas strokes. r=lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D179462
2023-06-02 19:06:15 +00:00
Cristian Tuns
ec6e03eda9
Backed out changeset 50707b02bc59 (bug 691187) for causing mochitest failures in test_bug1567544.html CLOSED TREE
2023-06-02 09:40:34 -04:00