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

103 Коммитов

Автор SHA1 Сообщение Дата
Marian-Vasile Laza ddac1da17c Backed out changeset 12f866a5b267 (bug 1587094) for wrench bustages on synthetic-bold.yaml . CLOSED TREE 2022-02-03 22:23:07 +02:00
Lee Salzman 36c0803568 Bug 1587094 - Support MULTISTRIKE_BOLD font instance flag for WebRender. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D137725
2022-02-03 18:53:13 +00:00
Lee Salzman 9bd2203649 Bug 1738589 - Let Gecko decide if WR Mac font has color glyphs. r=jfkthame
WR tries to normalize Mac FontInstances so that regardless of the font color
we only need to generate one version of the glyph in the cache. This strategy
backfires for fonts with color glyphs that are nominally supposed to ignore
the font color, but may choose to opt-in to the font color per-glyph based
on table data.

This determination is problematic to do in WR itself, but Gecko knows whether
a font has color glyphs ahead of time. So we let Gecko pass this data into
ScaledFonts which can then transmit the knowledge of whether the font has
color glyphs to the WR Mac font backend, which will then take appropriate
action.

Differential Revision: https://phabricator.services.mozilla.com/D130819
2021-11-10 22:16:13 +00:00
Marian-Vasile Laza a84123836e Backed out changeset fd38093162bc (bug 1738589) for causing reftest failures on svg-glyph-invalid.html. CLOSED TREE 2021-11-10 20:50:54 +02:00
Lee Salzman 233a9f9899 Bug 1738589 - Let Gecko decide if WR Mac font has color glyphs. r=jfkthame
WR tries to normalize Mac FontInstances so that regardless of the font color
we only need to generate one version of the glyph in the cache. This strategy
backfires for fonts with color glyphs that are nominally supposed to ignore
the font color, but may choose to opt-in to the font color per-glyph based
on table data.

This determination is problematic to do in WR itself, but Gecko knows whether
a font has color glyphs ahead of time. So we let Gecko pass this data into
ScaledFonts which can then transmit the knowledge of whether the font has
color glyphs to the WR Mac font backend, which will then take appropriate
action.

Differential Revision: https://phabricator.services.mozilla.com/D130819
2021-11-10 16:09:00 +00:00
Jonathan Kew e29954ec04 Bug 1732629 - [gfx/2d] Get non-localized variation axis names from CoreGraphics in ScaledFontMac, so that we set up the CGFont correctly with variation values. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D129576
2021-10-27 14:15:12 +00:00
Butkovits Atila 1f01e97274 Backed out 2 changesets (bug 1732629) for causing build bustages. CLOSED TREE
Backed out changeset d67d7024d557 (bug 1732629)
Backed out changeset 59cc3481c534 (bug 1732629)
2021-10-27 16:55:53 +03:00
Jonathan Kew e6fbe7eb13 Bug 1732629 - [gfx/2d] Get non-localized variation axis names from CoreGraphics in ScaledFontMac, so that we set up the CGFont correctly with variation values. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D129576
2021-10-27 13:35:04 +00:00
Jonathan Kew 1da61536b7 Bug 1735612 - Don't assert if CreateCGFontWithVariations is called with no variations; just return null and let the caller handle fallback. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D128489
2021-10-15 07:27:05 +00:00
Mike Hommey 3282e2080d Bug 1722454 - Remove USE_SKIA. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D120935
2021-07-29 23:29:44 +00:00
Jeff Muizelaar 691f75ddb4 Bug 1690235. Fix creating variation CTFonts. r=lsalzman
This is an alternate approach to aadbc6deca05.

CTFontCreateWithGraphicsFont seems to give "LastResort" when used on a
system CGFont with variation applied on 10.12-10.14. We can avoid that
by using CTFontCreateWithGraphicsFont with a variation descriptor.

I'm only applying this approach to cairo for now to mimimize the risk
of this breaking something or causing the crashes that we were seeing
before.

See https://github.com/servo/core-foundation-rs/pull/439 for
a standalone test case.

Differential Revision: https://phabricator.services.mozilla.com/D104581
2021-02-09 22:27:33 +00:00
Jonathan Kew 248af00296 Bug 1690235 - Don't use a font descriptor for variation fonts on systems before macOS 10.15. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D103916
2021-02-03 17:25:19 +00:00
Brad Werth d1844db20a Bug 1675854 Part 2: Use AutoRelease in ScaledFontMac::GetFontDescriptor. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D96456
2020-11-09 20:38:11 +00:00
Brad Werth 5d00ad647a Bug 1675854: Make ScaledFontMac::GetFontDescriptor release the psname reference before returning. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D96260
2020-11-06 21:36:08 +00:00
tobar2018 d7a64d8211 Bug 1673051 - Remove OnYosemiteOrLater(), OnElCapitanOrLater(), and OnSierraOrLater(). r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D95304
2020-11-02 16:25:18 +00:00
Jeff Muizelaar ab92c3225f Bug 1672088. Avoid creating CTFonts from CGFonts when using NativeFontResourceMac. r=lsalzman
This has the same motivation as bug 1672088.

Differential Revision: https://phabricator.services.mozilla.com/D94062
2020-10-20 15:48:26 +00:00
Jeff Muizelaar 2909b283eb Bug 1671967 - Rely on mCTFont being set. r=lsalzman
Now that we always use CTFontDrawGlyphs we can just
rely on having a CTFont.

Differential Revision: https://phabricator.services.mozilla.com/D94032
2020-10-19 16:29:47 +00:00
Jeff Muizelaar 0440c26f3d Bug 1671963 - Always use CTFontDrawGlyphs. r=lsalzman
CTFontDrawGlyphs has been around since 10.7

Differential Revision: https://phabricator.services.mozilla.com/D94029
2020-10-19 15:59:02 +00:00
Lee Salzman 88e30d29c4 Bug 1669575 - experimental backout of macOS 11 CoreText crash workaround in bug 1657440. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D92666
2020-10-06 20:37:27 +00:00
Lee Salzman 811a48a03b Bug 1657440 - avoid letting Skia query style information for Mac fonts. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D86492
2020-08-17 06:48:00 +00:00
Jonathan Kew b12c5b9ea0 Bug 1657892 - Cache variation axes in the UnscaledFontMac to accelerate font instantiations. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D86475
2020-08-09 07:23:42 +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
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
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
Jonathan Kew e9e88c90ab Bug 1602391 - Handle possible failure to get font table data in UnscaledFontMac. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D56359

--HG--
extra : moz-landing-system : lando
2019-12-09 19:03:17 +00:00
Emilio Cobos Álvarez e94a6fe8af Bug 1602317 - Switch WR bindings to use associated-constants-in-body. r=jrmuizel
Now that we have C++17, and thus inline const, we can do this.

Depends on D56306

Differential Revision: https://phabricator.services.mozilla.com/D56307

--HG--
extra : moz-landing-system : lando
2019-12-08 21:09:37 +00:00
Lee Salzman d7ccbd0261 Bug 1591996 - miscellaneous Gecko fixes for Skia m79 update. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50825

--HG--
extra : moz-landing-system : lando
2019-10-28 21:42:48 +00:00
Lee Salzman 2b03a82ba0 Bug 1584268 - only instantiate Cairo fonts when drawing to Cairo target. r=jfkthame
This removes a lot of old cruft in thebes to instantiate Cairo scaled fonts.
Instead, we only instantiate the Cairo scaled font inside Moz2D when we actually
need it for DrawTargetCairo. This thus gets rid of the duplicated code we had
inside both Moz2D and thebes to deal with Cairo scaled fonts.

Differential Revision: https://phabricator.services.mozilla.com/D47297

--HG--
extra : moz-landing-system : lando
2019-10-01 21:56:30 +00:00
Lee Salzman 4f2be9076e Bug 1547063 - implement recording instance data for ScaledFontMac. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44495

--HG--
extra : moz-landing-system : lando
2019-09-16 16:45:26 +00:00
Lee Salzman 2d38529fad Bug 1547063 - add SharedFTFace abstraction of FT_Face. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44491

--HG--
extra : moz-landing-system : lando
2019-09-16 17:03:04 +00:00
Cosmin Sabou 8113720646 Backed out 8 changesets (bug 1547063) for causing bug 1581466. a=backout
Backed out changeset c969a93b0ca7 (bug 1547063)
Backed out changeset 003f5a79c6a7 (bug 1547063)
Backed out changeset 2c7032b4d022 (bug 1547063)
Backed out changeset 23892ecc6ef8 (bug 1547063)
Backed out changeset af6e6807ece7 (bug 1547063)
Backed out changeset ebc71e607938 (bug 1547063)
Backed out changeset 772c3427c791 (bug 1547063)
Backed out changeset e74a67e2afe3 (bug 1547063)
2019-09-16 10:44:20 +03:00
Lee Salzman b8b94ba41a Bug 1547063 - implement recording instance data for ScaledFontMac. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44495

--HG--
extra : moz-landing-system : lando
2019-09-15 03:00:44 +00:00
Lee Salzman d5010d11ca Bug 1547063 - add SharedFTFace abstraction of FT_Face. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44491

--HG--
extra : moz-landing-system : lando
2019-09-15 02:59:44 +00:00
Jean-Yves Avenard 11ac9e9cf8 Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel
* Remove redundant virtual keywords
* Mark all destructors of inheriting classes as virtual for clarity
* Mark all classes without virtual destructor as final (exposed errors)
* Make destructor virtual where it needed to be (some were missing)
* Replace empty ({}) code declaration in header with = default
* Remove virtual unused methods

I probably missed some, it quickly became a rabbit hole.

Differential Revision: https://phabricator.services.mozilla.com/D26060

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:51 +00:00
Emilio Cobos Álvarez cb19991fd7 Bug 1533142 - Use more cbindgen features. r=kats
We can get back the fancy flag syntax as soon as we get C++17 inline variables,
which I sent an email to dev-platform@ about, with no reply.

Differential Revision: https://phabricator.services.mozilla.com/D22382

--HG--
extra : moz-landing-system : lando
2019-03-06 23:01:11 +00:00
Chris Peterson e77882620f Bug 1528881 - Part 4: gfx/2d: Make some global functions static. r=lsalzman
And #include "BufferUnrotate.h" in BufferUnrotate.cpp for BufferUnrotate() function prototype.

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

gfx/2d/BufferUnrotate.cpp:17:6 [-Wmissing-prototypes] no previous prototype for function 'BufferUnrotate'
gfx/2d/DrawTargetCairo.cpp:195:6 [-Wmissing-prototypes] no previous prototype for function 'ReleaseData'
gfx/2d/DrawTargetCairo.cpp:201:18 [-Wmissing-prototypes] no previous prototype for function 'CopyToImageSurface'
gfx/2d/DrawTargetCairo.cpp:239:18 [-Wmissing-prototypes] no previous prototype for function 'GetAsImageSurface'
gfx/2d/DrawTargetCairo.cpp:251:18 [-Wmissing-prototypes] no previous prototype for function 'CreateSubImageForData'
gfx/2d/DrawTargetCairo.cpp:272:18 [-Wmissing-prototypes] no previous prototype for function 'ExtractSubImage'
gfx/2d/DrawTargetCairo.cpp:308:18 [-Wmissing-prototypes] no previous prototype for function 'GetCairoSurfaceForSourceSurface'
gfx/2d/DrawTargetRecording.cpp:26:6 [-Wmissing-prototypes] no previous prototype for function 'RecordingSourceSurfaceUserDataFunc'
gfx/2d/DrawTargetRecording.cpp:272:6 [-Wmissing-prototypes] no previous prototype for function 'RecordingFontUserDataDestroyFunc'
gfx/2d/DrawTargetWrapAndRecord.cpp:26:6 [-Wmissing-prototypes] no previous prototype for function 'WrapAndRecordSourceSurfaceUserDataFunc'
gfx/2d/DrawTargetWrapAndRecord.cpp:358:6 [-Wmissing-prototypes] no previous prototype for function 'WrapAndRecordFontUserDataDestroyFunc'
gfx/2d/FilterNodeSoftware.cpp:1816:6 [-Wmissing-prototypes] no previous prototype for function 'IsAllZero'
gfx/2d/FilterNodeSoftware.cpp:183:37 [-Wmissing-prototypes] no previous prototype for function 'CloneAligned'
gfx/2d/MacIOSurface.cpp:442:6 [-Wmissing-prototypes] no previous prototype for function 'MacIOSurfaceBufferDeallocator'
gfx/2d/QuartzSupport.mm:38:6 [-Wmissing-prototypes] no previous prototype for function 'cgdata_release_callback'
gfx/2d/ScaledFontMac.cpp:191:10 [-Wmissing-prototypes] no previous prototype for function 'CalcTableChecksum'
gfx/2d/ScaledFontMac.cpp:224:5 [-Wmissing-prototypes] no previous prototype for function 'maxPow2LessThan'
gfx/2d/unittest/TestCairo.cpp:12:6 [-Wmissing-prototypes] no previous prototype for function 'TryCircle'

Differential Revision: https://phabricator.services.mozilla.com/D20263

--HG--
extra : rebase_source : b42bce33ed899caeb89e462d99a5cde29a9bb559
extra : intermediate-source : 7923cc86a6394bcd2fb3b7e38f458a5180d31e11
extra : source : 02388f2454e8842d2c023bf9f9fab222d8130093
2019-02-16 18:08:30 -08:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Lee Salzman 5285c599ca Bug 1485712 - set SkTypeface atomically in ScaledFonts. r=rhunt 2018-08-23 14:58:21 -04:00
Lee Salzman 864930c221 Bug 1479010 - don't populate a ScaledFont's cairo scaled font unless targeting cairo. r=jrmuizel 2018-08-03 00:56:06 -04:00
Lee Salzman e251ecb952 Bug 1460259 - Send synthetic oblique angle to WR. r=jfkthame 2018-07-04 10:56:40 -04:00
Kartikaya Gupta 8e203673f1 Bug 1463416 - use new WR subpixel positioning API from WR PR 2738. r=Gankro
Patch originally developed on bug 1458921 but needs to land with the WR update.

MozReview-Commit-ID: 82BYyNWBAfn

--HG--
extra : rebase_source : e6bca2f446c019fd41a37c2c28db73bbe1cfc216
2018-05-26 11:09:21 -04:00
Jonathan Kew 4b2b2d4c9f Bug 1455569 - Handle variation settings of system-installed variation fonts when creating CTFont from CGFont on High Sierra. r=lsalzman 2018-04-20 17:18:03 +01:00
Jonathan Kew 8cc9d24a4f Bug 1454094 - Explicitly copy font variation settings from CGFont when creating a CTFont only on macOS Sierra; on HighSierra, rely on Core Text to automatically propagate the required settings. r=lsalzman 2018-04-18 22:08:41 +01:00
Lee Salzman 1a23b6eab1 Bug 1400384 - support text writing modes with WebRender. r=gankro 2018-01-17 07:51:20 -05:00
Lee Salzman 7755d675bb Bug 1394568 - plumb synthetic italics flag through thebes and Moz2D into WebRender. r=gankro 2018-01-09 10:37:49 -05:00
Lee Salzman 6dc1932292 Bug 1394570 - request synthetic bold for Mac fonts with WR. r=gankro
MozReview-Commit-ID: JAmWZM9SOe0
2017-12-05 22:18:53 -05:00
Lee Salzman 03a6e9d255 Bug 1421275 - Pass FontInstanceFlags to WebRender. r=jrmuizel
This patch was originally developed on bug 1418564.

MozReview-Commit-ID: 53oydIqjhvF

--HG--
extra : rebase_source : 8980cc947b3b8c46a75d032e7e557f39bae08b97
2017-11-28 10:25:27 -05:00
Lee Salzman 826eee8b2a Bug 1403198 - support WR font descriptors on Mac. r=jrmuizel
MozReview-Commit-ID: BqN51yY88oJ
2017-11-06 20:21:06 -05:00
Markus Stange 1f62b09715 Bug 1414157 - Supply the font smoothing background color in the webrender FontInstanceOptions. r=lsalzman
MozReview-Commit-ID: CaI4FH7GoI8

--HG--
extra : rebase_source : 08a84a0b860e2afa8c0316c459984dd49d3e9561
2017-11-02 22:21:54 -04:00