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

225 Коммитов

Автор SHA1 Сообщение Дата
Matthew Finkel 2028fd222a Bug 1732360 - Add headers needed by MOZ_BUNDLED_FONTS. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D126817
2021-10-28 16:51:52 +00:00
Timothy Nikkel 35a0a509c6 Bug 1734571. Remove old unused layers tiling left over code bits. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D127787
2021-10-19 10:12:25 +00:00
Andrew Osmond aa22206ca2 Bug 1727603 - Remove gfxVars::UseOMTP. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123676
2021-08-25 19:56:01 +00:00
Jonathan Kew 18310539bf Bug 1708768 - Preliminary cleanup of gfxPlatformFontList creation/initialization code; no functional change. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D114863
2021-05-18 11:10:42 +00:00
Iulian Moraru b6ba6af634 Backed out 3 changesets (bug 1708768) for causing font related crashes (bug 1711332). a=backout DONTBUILD
Backed out changeset fa037550d6e8 (bug 1708768)
Backed out changeset 10b30c8d4b86 (bug 1708768)
Backed out changeset c03c7df7cd61 (bug 1708768)
2021-05-16 11:46:34 +03:00
Jonathan Kew 11b9b22a55 Bug 1708768 - Preliminary cleanup of gfxPlatformFontList creation/initialization code; no functional change. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D114863
2021-05-14 18:05:44 +00:00
Jonathan Kew 1af33c039b Bug 1708821 - On pre-10.15 macOS versions, don't do off-main-thread font registration in content processes. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D114484
2021-05-10 21:04:53 +00:00
Emilio Cobos Álvarez e2df872ab8 Bug 1708285 - Pass default font settings from parent to child processes. r=jfkthame
Instead of relying on GTK to be initialized in the child process.

Differential Revision: https://phabricator.services.mozilla.com/D113784
2021-05-01 20:00:31 +00:00
Jonathan Kew e579136e87 Bug 1707655 - Move the activation of supplemental fonts on macOS to a separate thread and try to get it started earlier. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D113552
2021-04-30 13:50:47 +00:00
Jonathan Kew 43390b8361 Bug 1704255 - Include STIXGeneral ahead of Apple Symbols in common fallbacks for symbol characters on macOS. r=m_kato
The glyphs in Apple Symbols tend to be visually quite small relative to common text fonts,
so preferring STIXGeneral will give a less jarring appearance in some cases.

Differential Revision: https://phabricator.services.mozilla.com/D111534
2021-04-14 16:29:20 +00:00
Markus Stange 5fa51b58e4 Bug 1682713 - Recreate the CVDisplayLink after display reconfigurations. r=mattwoodrow
On M1 machines, the fix from bug 1422855 was not effective; stopping and starting the
CVDisplayLink is not enough to cause it to switch to an active display. So we create
a new display link, which will pick an active display.

This patch is written to be minimum impact and easy to uplift. More cleanup is needed in the future.

Differential Revision: https://phabricator.services.mozilla.com/D106744
2021-03-01 20:56:25 +00:00
Markus Stange 796dac2920 Bug 1422855 - Tickle the CVDisplayLink after display reconfigurations, to help it get unstuck. r=mattwoodrow
This fixes a problem where the callback just wouldn't be called for the duration
of about a minute after fast user switching. I'm hoping it'll also help with a
similar problem after screen lock and after sleep (bug 1682713).

The documentation for CVDisplayLinkStop says the following:

> In macOS 10.4 and later, the display link thread is automatically stopped if
> the user employs Fast User Switching. The display link is restarted when
> switching back to the original user.

This probably works for display links that were created before fast user
switching. However, we sometimes create a new CVDisplayLink while our user is
"in the background", and this new display link happily keeps running while we're
in the background. Then, when switching back to the original user, *that's* when
the display link is stopped. And then it eventually starts again. I'm not sure
what causes it to re-start.
Creating a CVDisplayLink while the machine is fast user switched to a different
user is probably not a well-excercised codepath. Things might work more reliably
if we keep reusing the same CVDisplayLink instance and just stop and start it
as needed. But that's a more risky change that I don't want to uplift.
Also, starting to listen for vsync while a different user is the "current" user
is probably a mistake anyway. We should find out if there's a way to suspend
compositing and drawing in that state. However, it seems that the window doesn't
enter the occluded state during this time, because in that case we would
de-activate the content docshell and not run requestAnimationFrame callbacks.
But the profiler clearly shows rAF running during the switched-away time.

I'm seeing the following display reconfiguration callbacks during fast user
switching, 2077750265 being the display link's current display:

```
[1] DisplayReconfiguration for 2077750265: BeginConfiguration
[2] DisplayReconfiguration for 1104977158: BeginConfiguration
[3] DisplayReconfiguration for 2077750265: Remove Disabled
[4] DisplayReconfiguration for 1104977158: Moved SetMain SetMode Add Enabled

[5] DisplayReconfiguration for 1104977158: BeginConfiguration
[6] DisplayReconfiguration for 2077750265: BeginConfiguration
[7] DisplayReconfiguration for 1104977158: Remove Disabled DesktopShapeChanged
[8] DisplayReconfiguration for 2077750265: Moved SetMain SetMode Add Enabled DesktopShapeChanged
```

With this patch, we restart the display link at notification 4 and 8.

In the future, we should switch to per-monitor (or per-window) vsync rather than
global vsync, and clean this whole situation up a little.

Differential Revision: https://phabricator.services.mozilla.com/D105868
2021-02-22 02:31:58 +00:00
Jonathan Kew feb7e5627e Bug 1687622 - Rewrite macOS version of GetCommonFallbackFonts to handle a lot more language fonts that ship with the OS. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D102820
2021-02-01 20:55:44 +00:00
Mihai Alexandru Michis f13eee1faa Backed out 2 changesets (bug 1687622) for causing Bug 1688804.
Backed out changeset 4d42ff607081 (bug 1687622)
Backed out changeset f7fc57b92765 (bug 1687622)
2021-01-26 14:02:52 +02:00
Jonathan Kew 743c0a6871 Bug 1687622 - Rewrite macOS version of GetCommonFallbackFonts to handle a lot more language fonts that ship with the OS. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D102820
2021-01-25 17:19:23 +00:00
Jonathan Kew 67674b78cb Bug 1661570 - Allow webfonts to be used for emoji-default codepoints even if they don't provide color glyphs. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D88578
2020-09-01 07:43:53 +00:00
Jonathan Kew 3c2cb7fd1a Bug 1371386 - Take account of requirements for emoji-style or text-style presentation during font selection & fallback. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D87304
2020-08-26 09:31:58 +00:00
Mihai Alexandru Michis b162701621 Backed out changeset 0cad1ef724ee (bug 1371386) for causing failures in emoji-fallback-3.html
CLOSED TREE
2020-08-24 21:02:10 +03:00
Jonathan Kew ba87878325 Bug 1371386 - Take account of requirements for emoji-style or text-style presentation during font selection & fallback. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D87304
2020-08-24 14:24:12 +00:00
Jonathan Kew 1fb489dfe7 Bug 1654470 - Improve font selection heuristics for character sequences that should get emoji-style presentation. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D84703
2020-07-28 07:40:54 +00:00
Markus Stange ccdf0c3561 Bug 1653737 - Add output time to VsyncEvent. r=nical
This timestamp is provided by the system on macOS, and estimated as "the next
vsync" on all other platforms.

On macOS, the output time increments in very consistent amounts. The timestamp
is independent of when exactly the vsync callback ends up running, so it is less
vulnerable to unfortunate thread scheduling.
This makes it a more reliable source for picking video frames, for example.

Differential Revision: https://phabricator.services.mozilla.com/D83828
2020-07-18 05:34:35 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kartikaya Gupta 688791ad90 Bug 1630912. Add a simple way to observe vsync on the mainthread. r=jrmuizel
I had to mess with the refcounting of Display (and hence destructors) because we create a NewRunnableMethod inside Display that holds a pointer to |this|. There are versions of NewRunnableMethod that don't take a ref but I'm not sure of the lifetime of Display, so easier to just take a ref since several of the subclasses are already refcounted.

Differential Revision: https://phabricator.services.mozilla.com/D71303
2020-05-08 23:19:31 +00:00
Razvan Maries 2632be905a Backed out 6 changesets (bug 1630912) for build bustages on gfxAndroidPlatform.cpp. CLOSED TREE
Backed out changeset 21dc02bc12b9 (bug 1630912)
Backed out changeset 08a6a1f1c4c7 (bug 1630912)
Backed out changeset 108b1a07929b (bug 1630912)
Backed out changeset e202ddeb4e40 (bug 1630912)
Backed out changeset f7d9852a3d09 (bug 1630912)
Backed out changeset e6cd2ceab183 (bug 1630912)
2020-05-05 09:04:37 +03:00
Kartikaya Gupta 7908209483 Bug 1630912. Add a simple way to observe vsync on the mainthread. r=jrmuizel
I had to mess with the refcounting of Display (and hence destructors) because we create a NewRunnableMethod inside Display that holds a pointer to |this|. There are versions of NewRunnableMethod that don't take a ref but I'm not sure of the lifetime of Display, so easier to just take a ref since several of the subclasses are already refcounted.

Differential Revision: https://phabricator.services.mozilla.com/D71303
2020-05-01 23:32:30 +00:00
Chris Martin 64e1fb7a45 Bug 1540776 - Have parent send color profile to child during launch r=aosmond,jld,jfkthame,florian
For Win32k lockdown, we need to remove the content processes' ability to
call GetICMProfileW(). Since it needs this to retrieve the output color
profile, a new synchronous call is added that allows it to request the
parent process to read this file on its behalf.

The contents of the file are now being cached as well, as this should help
ease some of the increased parent process I/O caused by the children not
being able to do this in their process anymore.

For performance reasons, during launch this information is passed directly
to the child through the SetXPCOMProcessAttributes call

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

--HG--
extra : moz-landing-system : lando
2020-04-02 15:42:15 +00:00
Jonathan Kew db5bae5fe8 Bug 1626844 - Prefer Helvetica over Menlo as fallback font for Georgian on macOS. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D69334

--HG--
extra : moz-landing-system : lando
2020-04-02 16:44:26 +00:00
Dorel Luca ed4bab52bc Backed out changeset b9b3d4f3f430 (bug 1626844) for WR failures in marker-text-matches-georgian.html. CLOSED TREE
--HG--
extra : amend_source : ad81e149675bf77a253fb94c66d1a47bdd066c2a
2020-04-02 19:03:15 +03:00
Jonathan Kew 128000c5eb Bug 1626844 - Prefer Helvetica over Menlo as fallback font for Georgian on macOS. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D69334

--HG--
extra : moz-landing-system : lando
2020-04-02 12:55:05 +00:00
Jonathan Kew c8c463d812 Bug 1621232 - Devirtualize and merge CreateFontGroup implementations, as there is no longer any platform dependency. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D66197

--HG--
extra : moz-landing-system : lando
2020-03-10 13:20:37 +00:00
Chris Martin 726cba0bb5 Bug 1540776 - Change CMSOutputProfile functions to return nsArray r=gcp
Currently, the GetCMSOutputProfile() and related methods pass their output
using the old C-style "ptr, len" parameters. This makes them more difficult
to deal with later in this change when they need to be safely passed over IPC.

This refactors them to return nsTArray<uint8_t> results instead. I also
removed some old cruft and refactored the existing code.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 21:27:53 +00:00
Timothy Nikkel f3312286c6 Bug 1577507. Disable GPU process on mac even if prefs try to enable it. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D63537

--HG--
extra : moz-landing-system : lando
2020-02-21 11:40:31 +00:00
Jonathan Kew 1a33263ff8 Bug 1607672 - Improve font fallback for Dingbats block on macOS. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D59312

--HG--
extra : moz-landing-system : lando
2020-01-09 12:53:15 +00:00
Markus Stange 0f70058b6f Bug 1592044 - Reduce the frequency of IOSurface and framebuffer creation and destruction with the help of a surface pool. r=jgilbert
There are multiple SurfacePools: Main thread painting and the non-WebRender compositors create a new pool per window, and WebRender creates one shared pool across all windows. The non-WebRender users set the pool size limit to zero, i.e. no recycling across paints. This preserves the pre-existing behavior.
WebRender's pool size is configurable with the gfx.webrender.compositor.surface-pool-size pref.
Every window holds on to a SurfacePoolHandle. A SurfacePoolHandle has an owning reference to the pool, via a surface pool wrapper. Once all handles are gone, the surface pool goes away, too.
The SurfacePool holds on to IOSurfaces and MozFramebuffers. Both are created on demand, independently, but are associated with each other.
A given NativeLayer uses only one surface pool handle during its lifetime. The native layer no longer influences which GLContext its framebuffers are created for; the GL context is now managed by the surface pool handle.
As a result, a NativeLayer can no longer change which GLContext its framebuffers are created by.
So in the future, if we ever need to migrate a window frome one GLContext to another, we will need to recreate the NativeLayers inside it. I think that's ok.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 21:01:51 +00:00
Jonathan Kew 411f10a849 Bug 1586218 - Use a better default fallback font for Mongolian on macOS. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D49780

--HG--
extra : moz-landing-system : lando
2019-10-21 20:34:43 +00:00
Steven Michaud a57ff23303 Bug 1201401 - Work around a crash in CVCGDisplayLink::getDisplayTimes. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D45426

--HG--
extra : moz-landing-system : lando
2019-09-11 16:49:45 +00:00
Steven Michaud 574a2cd354 Bug 1201401 - Work around a crash in CVCGDisplayLink::getDisplayTimes. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D44525

--HG--
extra : moz-landing-system : lando
2019-09-05 15:49:21 +00:00
Markus Stange 979634bacb Bug 1565717 - Remove all dynamic loading of IOSurface functions. r=mattwoodrow
These functions were made public in 10.6. The oldest version we support is 10.9.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 11:06:22 +00:00
Barret Rennie 06f829cc25 Bug 1289211 - Rename InfallibleTArray to nsTArray in gfx/thebes/ r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D36955

--HG--
extra : moz-landing-system : lando
2019-07-10 03:29:40 +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
Ryan Hunt 85ff4bdc33 Bug 1523969 part 8 - Move method definition inline comments to new line in 'gfx/'. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21108

--HG--
extra : rebase_source : 48a4586f507891f3a2f0f970e9b9a0b15f0f3d61
2019-02-25 16:07:19 -06:00
Emilio Cobos Álvarez 323b5be77a Bug 1526294 - Should not need a pres context to get a system font. r=jfkthame
The only caller wants CSS pixels, no need to go back and forth.

This is the last dependency on the pres context, I think, from the style system
font code.

Differential Revision: https://phabricator.services.mozilla.com/D19147
2019-02-15 01:35:13 +01:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09: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
Jonathan Kew 6f42f167fb Bug 1490402 - Use UTF-8 strings (in place of UTF-16) for font family/face names in the system font list, to reduce memory footprint. r=lsalzman 2018-09-12 20:34:57 +01:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jonathan Kew 1171052be1 Bug 1425812 - Rely on native Core Text support for COLR/CPAL fonts on High Sierra. r=lsalzman 2018-05-29 17:07:48 +01:00