Commit Graph

8960 Commits

Author SHA1 Message Date
Robert Mader
067d78ddef Bug 1711224 - Add Wayland support for RenderCompositorNativeSWGL,
In order to do that, move buffer type specific code into
`NativeSurfaceWayland` and create subclasses for SHM and EGL
buffers.

This should help identify bugs, improve the code structure for
additional buffer types (e.g. YUV) and makes us get closer
to the CA backend.

Also includes some minor unrelated cleanups.

Differential Revision: https://phabricator.services.mozilla.com/D115938
2021-05-25 21:14:39 +00:00
stransky
42c1875739 Bug 1710958 [Linux] Delay DMABuf initialization when it's really needed, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D115480
2021-05-25 10:21:56 +00:00
Jonathan Kew
c840efe013 Bug 1712165 - Reorder conditions to avoid a possible race between the InitFontList thread and main thread accessing gfxPlatformFontList. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D115690
2021-05-21 16:39:17 +00:00
Jonathan Kew
cf297d803f Bug 1708768 - Make InitFontList safe to call off-main-thread on macOS, and run font-list initialization on a separate thread during startup. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D115295
2021-05-18 11:10:43 +00:00
Jonathan Kew
137c757143 Bug 1708768 - Create a pref to defer gfxPlatformFontList initialization until first use, and enable this on macOS. r=lsalzman
This gives the RegisterFonts thread more time to complete its work, so that
the main thread doesn't have to wait for it in InitFontList.

In the worst case, where the registration thread still hasn't finished
by the time we call gfxPlatformFontList::PlatformFontList() the first time,
it's still no worse than previously, it just reorders some of the work
that has to be done before we can render any content.

Depends on D114863

Differential Revision: https://phabricator.services.mozilla.com/D114865
2021-05-18 11:10:43 +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
0e23ebf8cd Bug 1708768 - Create a pref to defer gfxPlatformFontList initialization until first use, and enable this on macOS. r=lsalzman
This gives the RegisterFonts thread more time to complete its work, so that
the main thread doesn't have to wait for it in InitFontList.

In the worst case, where the registration thread still hasn't finished
by the time we call gfxPlatformFontList::PlatformFontList() the first time,
it's still no worse than previously, it just reorders some of the work
that has to be done before we can render any content.

Differential Revision: https://phabricator.services.mozilla.com/D114865
2021-05-14 18:05:44 +00: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
Andrew Osmond
05d9f058fd Bug 1711118 - Part 3. Allow D3D11 compositing with Software WebRender in release. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D115081
2021-05-14 13:01:22 +00:00
Jonathan Kew
83fcb74e81 Bug 1704812 - Broadcast newly-added FontList shm blocks to Content Processes instead of waiting and doing sync IPC. r=emilio,jld
Differential Revision: https://phabricator.services.mozilla.com/D112666
2021-05-13 14:30:09 +00:00
Csoregi Natalia
1697facf08 Backed out changeset 221d5494188c (bug 1704812) for thread sanitizer issues in SharedFontList. DONTBUILD CLOSED TREE 2021-05-13 15:16:00 +03:00
Jonathan Kew
0ba5a52a62 Bug 1704812 - Broadcast newly-added FontList shm blocks to Content Processes instead of waiting and doing sync IPC. r=emilio,jld
Differential Revision: https://phabricator.services.mozilla.com/D112666
2021-05-13 11:45:48 +00:00
Csoregi Natalia
ba272367cd Backed out changeset 80c9125cfac0 (bug 1704812) for assertion failures on gfxPlatformFontList.cpp. CLOSED TREE 2021-05-13 12:26:03 +03:00
Jonathan Kew
40e823046b Bug 1704812 - Broadcast newly-added FontList shm blocks to Content Processes instead of waiting and doing sync IPC. r=emilio,jld
Differential Revision: https://phabricator.services.mozilla.com/D112666
2021-05-13 08:57:42 +00:00
Robert Mader
89349d8182 Bug 1699985 - Implement basic native Wayland compositor backend, r=stransky,mstange,aosmond
This implements a mostly working native backend for Wayland. It can
be enabled via `gfx.webrender.compositor.force-enabled`.

The focus here was to get a basic structure in place while mini-
mising changes in shared code.

Known issues and limitations:
 - No readback - this will likely require an internal compositor
   again, as Wayland doesn't allow easily allow readback of the
   composited image, at least not without asking for permission.
   Alternatively, a new Wayland extension could be written for it.
 - Frame-call related issues when using a compositor that optimizes
   them (e.g. Gnome-Shell). This will be fixed in a follow-up, in
   the mean time disabling `widget.wayland.opaque-region.enabled`
   and `widget.wayland.vsync.enabled` works around the issues.
 - Only works on Weston or very recent versions of Gnome-Shell, see
   bug 1699754

Differential Revision: https://phabricator.services.mozilla.com/D111662
2021-05-11 13:38:59 +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
Andi-Bogdan Postelnicu
a1f2f7329d Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,valentin,sylvestre
Updated with clang-format version 11.0.1 (taskcluster-GI8pmG3eQ_OSXfjFfr2yFw)

Differential Revision: https://phabricator.services.mozilla.com/D114618
2021-05-10 07:15:06 +00:00
Andrew Osmond
c46e4b35ef Bug 1709476 - Allow falling back to Software WebRender from D3D11/WebRender in release. r=jrmuizel
If a user is able to get D3D11, and Software WebRender hasn't been
forced on (either by the Fission experiment or our pref), then we prefer
D3D11 in late beta and release. This will allow users who start with
D3D11 in the GPU process, to fallback to Software WebRender in the GPU
process.

Differential Revision: https://phabricator.services.mozilla.com/D114286
2021-05-05 14:31:46 +00:00
Jonathan Kew
5347f125e1 Bug 1708797 - Try to make font fallback code more robust against DWrite failures. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D114225
2021-05-04 14:33:51 +00:00
Iulian Moraru
360e9d9cec Backed out changeset c5b7b613ed52 (bug 1708798) for landing with wrong bug. CLOSED TREE 2021-05-04 17:12:50 +03:00
Jonathan Kew
7b1e3093a7 Bug 1708798 - Try to make font fallback code more robust against DWrite failures. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D114225
2021-05-04 13:44:23 +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
c55581cbc3 Bug 739096 - Merge some Mozilla extensions to cairo-quartz-surface. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112591
2021-04-29 14:33:36 +00:00
Jonathan Kew
98cc55ba62 Bug 739096 - Merge some Mozilla additions for DirectWrite support. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112590
2021-04-29 14:33:36 +00:00
Jonathan Kew
3f563bce7e Bug 739096 - Remove support for CGLayer-backed cairo quartz surface. r=jrmuizel
This was a performance optimization that we no longer care about.
Removing it will avoid the need to merge the additions into the new
cairo-quartz-surface code from upstream.

Differential Revision: https://phabricator.services.mozilla.com/D112556
2021-04-29 14:33:29 +00:00
Robert Mader
10d2da5900 Bug 1707943 - Fix warnings and apply suggestions form static analysis, r=stransky
Some more small cleanups to stop the review bot from complaining in
patches touching these files.

Differential Revision: https://phabricator.services.mozilla.com/D113721
2021-04-29 10:43:17 +00:00
Brindusan Cristian
a15a62d8e3 Backed out 15 changesets (bug 739096) for causing valgrind bustages. CLOSED TREE
Backed out changeset 75e6eca97890 (bug 739096)
Backed out changeset fb2b5f607015 (bug 739096)
Backed out changeset d4ffa7c2db22 (bug 739096)
Backed out changeset 46598f67b43a (bug 739096)
Backed out changeset 08c8584cadbb (bug 739096)
Backed out changeset 6c67d3e98e1e (bug 739096)
Backed out changeset 566742bad252 (bug 739096)
Backed out changeset 67d7ab4394ab (bug 739096)
Backed out changeset 1675a980f8f3 (bug 739096)
Backed out changeset df4fd9df9d67 (bug 739096)
Backed out changeset 1dfadbc743b9 (bug 739096)
Backed out changeset 2623ebd24944 (bug 739096)
Backed out changeset e80fbceb9023 (bug 739096)
Backed out changeset d058e7c043e6 (bug 739096)
Backed out changeset dbb07ebff6b6 (bug 739096)
2021-04-29 00:25:44 +03:00
Jonathan Kew
7d766bce37 Bug 739096 - Merge some Mozilla extensions to cairo-quartz-surface. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112591
2021-04-28 18:06:53 +00:00
Jonathan Kew
bcf8277c61 Bug 739096 - Merge some Mozilla additions for DirectWrite support. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112590
2021-04-28 18:06:53 +00:00
Jonathan Kew
902db97567 Bug 739096 - Remove support for CGLayer-backed cairo quartz surface. r=jrmuizel
This was a performance optimization that we no longer care about.
Removing it will avoid the need to merge the additions into the new
cairo-quartz-surface code from upstream.

Differential Revision: https://phabricator.services.mozilla.com/D112556
2021-04-28 18:06:37 +00:00
sotaro
04324c5a92 Bug 1707814 - Add pointer size check to RemoveShaderCacheFromDiskIfNecessary() r=jrmuizel,gfx-reviewers
32bit build Firefox and 64bit Firefox could have same build ID. Pointer size check could be used to recognize if build is different.

Differential Revision: https://phabricator.services.mozilla.com/D113467
2021-04-27 22:04:25 +00:00
Chris Martin
e8085e7ecb Bug 1698732 - Change reftest-content to get Azure info without Win32k APIs r=bas,emilio
Currently, reftest-content uses GfxInfo::GetInfo() to obtain information about
the Azure backend. GetInfo() uses Win32k APIs, and therefore will mostly
return garbage in content processes.

This adds a new way to obtain the same information directly from GfxInfo
without using Win32k APIs.

Differential Revision: https://phabricator.services.mozilla.com/D111890
2021-04-27 15:17:12 +00:00
Jamie Nicol
e0f7687773 Bug 1704842 - Expose gecko version at time compositor is initialized to geckoview_streaming telemetry. r=janerik
On Fenix we see many users with a value of opengl for the
gfx_status_compositor telemetry probe, despite the fact they are
running versions of gecko for which webrender should be enabled on
their device.

The theory is that although gecko is being initialized the user has
not opened a tab, and therefore initialized a compositor, since they
have been updated to a version which should be running webrender by
default. To verify that this is the case, this patch adds a new probe
gfx_status_last_compositor_gecko_version, which reports the gecko
version at the time a compositor is initialized. This will be used to
confirm that the users whose compositor unexpectedly reports opengl
have indeed not initialized a compositor in a while.

Differential Revision: https://phabricator.services.mozilla.com/D112339
2021-04-26 16:26:38 +00:00
Bob Owen
b911da878c Bug 1695725 p1: Use mSoftwareBackend if we don't have a fallback canvas backend. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D112963
2021-04-21 16:48:12 +00:00
Emilio Cobos Álvarez
ae22a9903e Bug 1704466 - Make sure to preserve face order from fontconfig when appropriate. r=jfkthame
This seems to help: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=158613f137b8fe9409f19a3b6abbe5ce773a7b4f&newProject=try&newRevision=c87de791fbfc5d269d0f2071dc8a6dd28707bebc&framework=13

My patch reversed the ordering of faces with different weight / style /
etc for a single font (which shouldn't matter for correctness, but seems
to have some perf implications).

Based on logging, fontconfig on automation returns "regular" faces first
and "bold / semibold / italic / etc" later.

My guess is that putting the regular faces later (which are more
commonly used) affected performance of these test-cases.

This patch should address it and restore the original order, by tweaking
the prioritization code to stop doing "insert to front" / "insert to
back", but instead moving aliases to the end.

Differential Revision: https://phabricator.services.mozilla.com/D112674
2021-04-20 10:42:44 +00:00
Jonathan Kew
4594a5e0e2 Bug 1706077 - Move setting of 'opsz' axis from nsFont into gfxFont initialization as it depends on data from both the style and the specific gfxFontEntry. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D112631
2021-04-20 09:59:20 +00:00
Ting-Yu Lin
b87313796f Bug 1700565 - Disallow spaces to contribute to minimum advance width when line breaking is everywhere. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D112255
2021-04-20 02:32:45 +00:00
Andrew Osmond
318a486b0b Bug 1705208 - Force allow fallback to Software WebRender if fallback to Basic is disabled. r=gfx-reviewers,sotaro
Differential Revision: https://phabricator.services.mozilla.com/D112096
2021-04-15 00:12:52 +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
Jonathan Kew
9134a606cf Bug 1704273 - Activate supplemental fonts in all processes on older versions of macOS. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D111603
2021-04-12 15:53:53 +00:00
Jamie Nicol
7abb7ce304 Bug 1615574 - Disable webrender shader cache on Adreno 3xx. r=aosmond
Loading cached shaders with glProgramBinary fails consistently for all
but the most trivial of our shaders on Adreno 3xx, so caching and
attempting to load them is a waste of time. Chromium and other
projects also appear to have disabled their shader caches on Adreno
3xx due to bugs.

This patch moves the gfx.webrender.program-binary-disk pref
declaration from all.js to StaticPrefList.yaml. Rather than directly
using the value of the pref to decide whether to create the shader
cache, we now initialize a Feature in gfxConfigManager with a default
value from the pref and then configure it from the blocklist. On
Android we block the feature on Adreno 3xx devices. The pref remains
true by default on Android and Windows, and false by default on Linux
and Macos.

Differential Revision: https://phabricator.services.mozilla.com/D111427
2021-04-12 15:14:12 +00:00
Emilio Cobos Álvarez
0302792235 Bug 1703693 - Prefer faces for fonts that can only be named in one way. r=jfkthame
This produces the desired rendering here by effectively "deprioritizing"
faces from fonts that have multiple names.

Your call whether this is a good idea or not, seems reasonable off-hand
to me.

Differential Revision: https://phabricator.services.mozilla.com/D111283
2021-04-09 14:50:44 +00:00
Brad Werth
5073339ca7 WIP: Bug 1685183 Part 3: Remove remaining references to PluginInstanceChild. r=jgilbert
These references were left behind in the cleanup of the plugin code.

Differential Revision: https://phabricator.services.mozilla.com/D111197
2021-04-08 16:42:07 +00:00
Jonathan Kew
fd668cd57a Bug 1703213 - Disallow soft line break between adjacent IDEOGRAPHIC SPACE characters. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D111065
2021-04-08 09:41:48 +00:00
Butkovits Atila
1557f3a480 Backed out 3 changesets (bug 1685183) for causing build bustages. CLOSED TREE
Backed out changeset bef089a9a5fa (bug 1685183)
Backed out changeset d9e2699b32c6 (bug 1685183)
Backed out changeset 083f895fddd9 (bug 1685183)
2021-04-08 06:48:02 +03:00
Brad Werth
430c8d503c Bug 1685183 Part 3: Remove remaining references to PluginInstanceChild. r=jgilbert
These references were left behind in the cleanup of the plugin code.

Depends on D101227

Differential Revision: https://phabricator.services.mozilla.com/D111197
2021-04-08 01:39:05 +00:00
Jonathan Kew
50bf8d6384 Bug 1703614 - Check for out-of-range source index when logging a font-load failure. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D111153
2021-04-07 20:26:02 +00:00
Jonathan Kew
cbe800a6ec Bug 1703534 - Avoid risk of misaligned access in gfxSparseBitSet::Union(const SharedBitSet&) due to unaligned Block records. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D111103
2021-04-07 14:15:58 +00:00