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

609 Коммитов

Автор SHA1 Сообщение Дата
Dan Minor 522eefbe31 Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-06 18:15:50 +00:00
Butkovits Atila 56c46d06a1 Backed out 3 changesets (bug 1719554) for causing bustages complaining about gfxTextRun.cpp.
Backed out changeset 6181e40d4da1 (bug 1719554)
Backed out changeset c261ede6ae81 (bug 1719554)
Backed out changeset 221ec418475c (bug 1719554)
2021-12-04 00:58:15 +02:00
Dan Minor 30ad309163 Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-03 20:49:32 +00:00
Lee Salzman 3c994f8afd Bug 1739448 - Implement a prototype WebGL-backed Canvas2D. r=gfx-reviewers,nical,jrmuizel
This mainly provides DrawTargetWebgl, which implements the subset of the DrawTarget
API necessary for integration with CanvasRenderingContext2D. It translates them to
suitable commands for its internal ClientWebGLContext, which then manages remoting
WebGL requests to the parent/GPU process.

Currently two shaders are used for drawing Canvas2D primitives, but can be expanded
in the future. These are an image shader and a solid color shader.

The core of this implementation revolves around TexturePacker and TextureHandle,
which cope with the necessity of frequently uploading SourceSurfaces for use with
WebGL. TexturePacker implements a bin-packing algorithm for packing these uploads
into texture pages, which can either be SharedTextures if they are reasonably small,
or StandaloneTextures if they are too big to pack in a SharedTexture. Each upload
is assigned a TextureHandle which is used to manage it in a move-to-front cache,
so that we can easily eject TextureHandles from the back of the cache if we have
too many. These TextureHandles are associated with the SourceSurface that spawned
them to more easily manage their lifetimes.

There are further dependent caches for dealing with blurred shadows and with text.
Shadows are cached in an uploaded texture bound to the SourceSurface that generated
them. Text is handled by caching entire runs in the GlyphCache (keyed by both their
rendering parameters and their glyphs). The text is first rasterized to a surface
and then uploaded to a texture in the GlyphCache which can be reused should the
text be encountered again.

To deal with commands we can't accelerate, a separate internal DrawTargetSkia is
also maintained. The content of the WebGL framebuffer is copied into it so that
drawing can then proceed in software from there. It remains in this fallover state
until the next frame, when it resets back to using the WebGL framebuffer again.

This acceleration is disabled by default. To enable it, you must toggle the pref
"gfx.canvas.accelerated" to true. This should be suitably different from the naming
of the previous SkiaGL prefs to not alias with them. There are a few dependent prefs
that follow from the previous SkiaGL prefs for setting the size limitations for
acceleration and also limitations for the internal texture cache.

Differential Revision: https://phabricator.services.mozilla.com/D130388
2021-11-11 07:16:58 +00:00
Marian-Vasile Laza 748933bf4b Backed out 2 changesets (bug 1739448) for causing geckoview failures on 1246775-1.html. CLOSED TREE
Backed out changeset 7b82837e2f56 (bug 1739448)
Backed out changeset feac99f1dae3 (bug 1739448)
2021-11-11 07:39:10 +02:00
Lee Salzman c3d10f0f9e Bug 1739448 - Implement a prototype WebGL-backed Canvas2D. r=gfx-reviewers,nical,jrmuizel
This mainly provides DrawTargetWebgl, which implements the subset of the DrawTarget
API necessary for integration with CanvasRenderingContext2D. It translates them to
suitable commands for its internal ClientWebGLContext, which then manages remoting
WebGL requests to the parent/GPU process.

Currently two shaders are used for drawing Canvas2D primitives, but can be expanded
in the future. These are an image shader and a solid color shader.

The core of this implementation revolves around TexturePacker and TextureHandle,
which cope with the necessity of frequently uploading SourceSurfaces for use with
WebGL. TexturePacker implements a bin-packing algorithm for packing these uploads
into texture pages, which can either be SharedTextures if they are reasonably small,
or StandaloneTextures if they are too big to pack in a SharedTexture. Each upload
is assigned a TextureHandle which is used to manage it in a move-to-front cache,
so that we can easily eject TextureHandles from the back of the cache if we have
too many. These TextureHandles are associated with the SourceSurface that spawned
them to more easily manage their lifetimes.

There are further dependent caches for dealing with blurred shadows and with text.
Shadows are cached in an uploaded texture bound to the SourceSurface that generated
them. Text is handled by caching entire runs in the GlyphCache (keyed by both their
rendering parameters and their glyphs). The text is first rasterized to a surface
and then uploaded to a texture in the GlyphCache which can be reused should the
text be encountered again.

To deal with commands we can't accelerate, a separate internal DrawTargetSkia is
also maintained. The content of the WebGL framebuffer is copied into it so that
drawing can then proceed in software from there. It remains in this fallover state
until the next frame, when it resets back to using the WebGL framebuffer again.

This acceleration is disabled by default. To enable it, you must toggle the pref
"gfx.canvas.accelerated" to true. This should be suitably different from the naming
of the previous SkiaGL prefs to not alias with them. There are a few dependent prefs
that follow from the previous SkiaGL prefs for setting the size limitations for
acceleration and also limitations for the internal texture cache.

Differential Revision: https://phabricator.services.mozilla.com/D130388
2021-11-11 04:33:50 +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
sotaro d0f572a6ea Bug 1734505 - Add Feature::WINDOW_OCCLUSION r=gfx-reviewers,nical
With Feature::WINDOW_OCCLUSION, about:support could show if window occlusion is enabled. And Feature::WINDOW_OCCLUSION could be used to override windows occlusion setting. It could be used for Bug 1733955.

Differential Revision: https://phabricator.services.mozilla.com/D127752
2021-10-08 13:11:52 +00:00
stransky ac3b9d1e54 Bug 1729656 [Wayland] Don't use gfxPlatform to configure DMABuf, r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D126821
2021-09-28 20:16:17 +00:00
Emilio Cobos Álvarez e37caecb95 Bug 1730456 - InitPlatformFontList should reframe. r=jfkthame
I don't know why it didn't broadcast the reflow request to child
processes... Perhaps it doesn't have to?

Differential Revision: https://phabricator.services.mozilla.com/D126128
2021-09-23 16:35:32 +00:00
Tetsuharu Ohzeki e53074ff5f Bug 1729826 - Remove unused gfxPlatform::BufferRotationEnabled(). r=gfx-reviewers,mattwoodrow
This also remove layers.bufferrotation.enabled pref.

Differential Revision: https://phabricator.services.mozilla.com/D125022
2021-09-09 05:00:21 +00:00
Tetsuharu Ohzeki 34efa74406 Bug 1729816 - part 1: Remove unused gfxPlatform::GetLayerDiagnosticTypes() and related prefs. r=gfx-reviewers,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D125003
2021-09-09 02:02:10 +00:00
Jonathan Kew bfa1d70def Bug 1715501 - patch 2 - Pass the presContext to platform font lookup methods so they can query it for font visibility. r=emilio
This does not in itself change user-visible behavior, but is a foundation for bug
1715507 where we will make the behavior per-context instead of global. This is basically
just plumbing, passing a pointer to the presContext that's asking for fonts to be
resolved all the way down to the gfx code that handles the font list and looks up
fonts.

For the immediate goal of making font visibility work per-context, it would be
sufficient to pass the desired visibility level in to the font-selection methods.
However, passing the actual presContext down (and not just its visibility level)
will enable us to report back via the dev console when a font is blocked (see bug
1715537), so the approach here provides the basis for that upcoming enhancement.

Depends on D124194

Differential Revision: https://phabricator.services.mozilla.com/D124195
2021-09-08 12:18:17 +00:00
Cristian Tuns 9e1718d5a5 Backed out 4 changesets (bug 1715537, bug 1715507, bug 1715501) for causing mochitest failures on test_bug418986-2.html. CLOSED TREE
Backed out changeset fff777ea5637 (bug 1715537)
Backed out changeset 240308eb514d (bug 1715507)
Backed out changeset e3f8526e0e2a (bug 1715501)
Backed out changeset cfdd1c5d8d3f (bug 1715501)
2021-09-08 07:48:51 -04:00
Jonathan Kew 20585f15c0 Bug 1715501 - patch 2 - Pass the presContext to platform font lookup methods so they can query it for font visibility. r=emilio
This does not in itself change user-visible behavior, but is a foundation for bug
1715507 where we will make the behavior per-context instead of global. This is basically
just plumbing, passing a pointer to the presContext that's asking for fonts to be
resolved all the way down to the gfx code that handles the font list and looks up
fonts.

For the immediate goal of making font visibility work per-context, it would be
sufficient to pass the desired visibility level in to the font-selection methods.
However, passing the actual presContext down (and not just its visibility level)
will enable us to report back via the dev console when a font is blocked (see bug
1715537), so the approach here provides the basis for that upcoming enhancement.

Depends on D124194

Differential Revision: https://phabricator.services.mozilla.com/D124195
2021-09-08 09:35:17 +00:00
Tetsuharu Ohzeki cc4be149b9 Bug 1729570 - part 3: Remove unused gfxPlatform::GetAcceleratedCompositorBackends(). r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124862
2021-09-08 00:32:09 +00:00
Tetsuharu Ohzeki 52196aec67 Bug 1729570 - part 2: Remove unused gfxPlatform::GetCompositorBackends(). r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124861
2021-09-08 00:32:09 +00:00
Jeff Muizelaar dd567d92b7 Bug 1728414 - Remove unused ScreenReferenceSurface() function. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D124113
2021-09-02 14:02:42 +00:00
Andrew Osmond 2e216306b0 Bug 1728466 - Remove unused allowlisting members in gfxPlatform. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124135
2021-09-01 01:15:03 +00:00
Jonathan Kew c7fdc790cc Bug 1725297 - Remove expiring font telemetry probes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124051
2021-08-31 13:48:51 +00:00
Andrew Osmond b3def22e3d Bug 1728240 - Remove DrawTargetWrapAndRecord and gfx.2d.recording pref. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124000
2021-08-31 02:03:58 +00:00
Andrew Osmond ac49f09199 Bug 1728113 - Remove DrawTargetCapture and related code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123953
2021-08-30 16:35:50 +00:00
Emilio Cobos Álvarez cfca657d9c Bug 1722487 - Avoid some work for font list updates. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D123363
2021-08-26 23:17:54 +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
Andrew Osmond 50d789dd6a Bug 1724936 - Remove XRender support. r=jrmuizel
This has been deprecated for a long time, and it doesn't work in
conjuction with WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D122368
2021-08-25 19:35:23 +00:00
Butkovits Atila 073981c0e2 Backed out changeset f767bc7e5cd8 (bug 1724936) for causing build bustages on nsLookAndFeel.cpp. CLOSED TREE 2021-08-25 21:21:59 +03:00
Andrew Osmond ec43a845c8 Bug 1724936 - Remove XRender support. r=jrmuizel
This has been deprecated for a long time, and it doesn't work in
conjuction with WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D122368
2021-08-25 17:45:04 +00:00
Matt Woodrow 56768f11a4 Bug 1726562 - Remove option to disable software webrender for popups. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123159
2021-08-24 04:06:34 +00:00
Jeff Muizelaar bc83bb5886 Bug 1726672 - Remove PaintThread. r=mattwoodrow
Basically just rm PaintThread.cpp and get things to build.

Differential Revision: https://phabricator.services.mozilla.com/D123170
2021-08-20 13:20:44 +00:00
Andrew Osmond ddabc1b810 Bug 1725388 - Remove pref/envvars that can disable WebRender. r=jrmuizel
MOZ_WEBRENDER=0 now does nothing -- you will either get HW-WR or SW-WR
depending on the platform configuration. The pref
gfx.webrender.force-legacy-layers is removed. This leaves no
configuration option to disable WebRender.

MOZ_WEBRENDER=1 will continue to force WR on, which will ensure in CI we
get HW-WR unless gfx.webrender.software is true.

Differential Revision: https://phabricator.services.mozilla.com/D122474
2021-08-12 20:28:53 +00:00
Iulian Moraru 68dacf122d Backed out 2 changesets (bug 1725388) for causing multiple failures. CLOSED TREE
Backed out changeset cb961c255c8c (bug 1725388)
Backed out changeset 4ee9abeebd43 (bug 1725388)
2021-08-12 19:21:05 +03:00
Andrew Osmond 43a2a6d05e Bug 1725388 - Remove pref/envvars that can disable WebRender. r=jrmuizel
MOZ_WEBRENDER=0 now does nothing -- you will either get HW-WR or SW-WR
depending on the platform configuration. The pref
gfx.webrender.force-legacy-layers is removed. This leaves no
configuration option to disable WebRender.

MOZ_WEBRENDER=1 will continue to force WR on, which will ensure in CI we
get HW-WR unless gfx.webrender.software is true.

Differential Revision: https://phabricator.services.mozilla.com/D122474
2021-08-12 13:54:25 +00:00
Alexandre Lissy d46f7366f0 Bug 1719668 - Do not force XFlush() on XRender r=jrmuizel,nical
Differential Revision: https://phabricator.services.mozilla.com/D119557
2021-07-15 08:56:20 +00:00
Emilio Cobos Álvarez fb069248c0 Bug 1716045 - Unify font-family storage. r=mats,jfkthame
This changes font-family storage to reuse the rust types, removing a
bunch of code while at it. This allows us to, for example, use a single
static font family for -moz-bullet and clone it, rather than creating a
lot of expensive copies.

Differential Revision: https://phabricator.services.mozilla.com/D118011
2021-06-18 19:35:50 +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
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
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
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
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
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
Andrew Osmond 1c682d57a9 Bug 1697195 - Force enable Software WebRender if Fission and experiment are enabled. r=jrmuizel
Fission without WebRender is an unsupported configuration and enrolls
users based on their compositor. However because of our own rollout of
WebRender, a user might start in early beta with WebRender and lose it
in late beta, while they remain enrolled in the Fission experiment.
Also, a user could lose WebRender because of crashes or device reset,
and we may fall back to Basic.

This patch forces Software WebRender as available (but does not override
Hardware WebRender) if Fission is enabled for users enrolled in the
Fission experiment. It also prevents fallback to Basic layers when
disabling acceleration due to crashes and runtime errors, so the user
will be stuck with Software WebRender at a minimum. It also enables
Software WebRender for Windows popups with transparency.

Differential Revision: https://phabricator.services.mozilla.com/D107661
2021-03-12 15:52:40 +00:00
Emilio Cobos Álvarez ec2e64fa12 Bug 1678487 - Ensure CMS is initialized all at once on the main thread, have thread-safe accessors for the various transforms. r=aosmond,jrmuizel
Well, mostly thread-safe, in the sense that on shutdown we might free
them, but that is pre-existing and can't happen for the code-path that
I'm about to touch.

We could probably just avoid freeing these transforms if we wanted...

Differential Revision: https://phabricator.services.mozilla.com/D104946
2021-03-08 18:12:06 +00:00
Bogdan Tara 544268f5a4 Backed out 2 changesets (bug 1678487) for static gfxPlatform::InitializeCMS crashes CLOSED TREE
Backed out changeset af0927300d51 (bug 1678487)
Backed out changeset 9ed081f10e63 (bug 1678487)
2021-03-08 04:47:16 +02:00
Emilio Cobos Álvarez 4b0411a401 Bug 1678487 - Ensure CMS is initialized all at once on the main thread, have thread-safe accessors for the various transforms. r=aosmond
Well, mostly thread-safe, in the sense that on shutdown we might free
them, but that is pre-existing and can't happen for the code-path that
I'm about to touch.

We could probably just avoid freeing these transforms if we wanted...

Differential Revision: https://phabricator.services.mozilla.com/D104946
2021-03-08 01:18:18 +00:00
Bob Owen be799e35a1 Bug 1692894 p1: Don't create devices for canvas when remote canvas is in use. r=jrmuizel
This also adds related DLLs to be delay loaded to xul's moz.build. This means
that if we don't create the devices they are not loaded at all.

Differential Revision: https://phabricator.services.mozilla.com/D105630
2021-02-25 15:10:57 +00:00
Emilio Cobos Álvarez 3f5561a2f7 Bug 1678487 - Make CMSMode an enum class. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D104945
2021-02-13 03:59:23 +00:00
Emilio Cobos Álvarez 675578aca4 Bug 1678487 - Remove SRGBOverrideObserver, and make gfx.color_management.force_srgb a static pref. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D104944
2021-02-13 03:59:22 +00:00