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

42983 Коммитов

Автор SHA1 Сообщение Дата
Glenn Watson 02aa3d190d Bug 1766501 - Make backdrop-filter blurs use Duplicate for edgeMode r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D145682
2022-05-08 21:06:26 +00:00
Lee Salzman aa265c6016 Bug 1767207 - Handle shared font keys in WR captures. r=gw
This patch tries to duplicate the font data that is stored in WR captures.
The font data is then de-duplicated on load. This prevents having to predict
or store the complicated font key maps.

Differential Revision: https://phabricator.services.mozilla.com/D145409
2022-05-07 23:47:11 +00:00
Jonathan Kew 65fe462eef Bug 1765093 - patch 3 - Also use the new gfxTextRun::GetLineHeightMetrics to optimize GetAscentAndDescentInAppUnits. r=emilio
This accelerates web-exposed SVG APIs such as getExtentOfChar() by avoiding the expensive
MeasureText() call when we're just getting the line-height metrics.

Differential Revision: https://phabricator.services.mozilla.com/D145717
2022-05-07 13:12:00 +00:00
Jonathan Kew 267dd5e273 Bug 1765093 - patch 2 - Make ShrinkToLigatureBoundaries return whether any adjustment was made, so callers can skip redundant calls to partial-ligature code. r=gfx-reviewers,lsalzman
This allows a number of callers to skip calling partial-ligature functions
altogether if the ranges are known to be empty, which should be a minor win.

Depends on D145631

Differential Revision: https://phabricator.services.mozilla.com/D145632
2022-05-07 13:11:59 +00:00
Jonathan Kew f4644e4220 Bug 1765093 - patch 1 - Avoid measuring entire textrun in SVGTextFrame's GetBaselinePosition function. r=dholbert
This aims to prevent an O(n^2) performance situation when per-glyph
positioning is in use.

This reduces the time to load the testcase here from around 70s to 17s
in my local build. Still not great, but at least it's less of a disaster.

Differential Revision: https://phabricator.services.mozilla.com/D145631
2022-05-07 13:11:59 +00:00
Emilio Cobos Álvarez 31d3fcdb9b Bug 1767172 - Remove custom screen info handling from GfxInfo, use ScreenManager for that. r=jrmuizel,handyman,stransky
This removes a bunch of custom code from GfxInfo to obtain screen
information, and instead collects that screen information in
ScreenManager.

This, apart of removing duplicated code, has the extra benefit of
reporting multi-monitor information on GTK (and potentially in the
future reporting scale and refresh rate properly as well, I've kept the
telemetry as it was on that regard).

Differential Revision: https://phabricator.services.mozilla.com/D145178
2022-05-06 23:37:25 +00:00
Razvan Cojocaru 0ec612c35b Bug 1659124 - Avoid passing non-CSS points to IsZero as it may return false when it should return true. r=botond
IsZero() is changed to take a CSSPoint parameter instead of any
point type, to avoid accidentally re-introducing the issue.

Differential Revision: https://phabricator.services.mozilla.com/D145173
2022-05-06 21:59:44 +00:00
Cosmin Sabou 705c1e4a55 Merge mozilla-central to autoland. CLOSED TREE 2022-05-07 01:35:24 +03:00
Cosmin Sabou 4ddcb34203 Backed out changeset b2bea8e0b400 (bug 1767172) for causing startup crashes (Bug 1768260). a=backout 2022-05-07 01:28:53 +03:00
Cristian Tuns f1a3cc8348 Backed out 4 changesets (bug 1765093) for causing web-platform-test failures on boundary-shaping-010.html CLOSED TREE
Backed out changeset 4f24833ac254 (bug 1765093)
Backed out changeset 6e5b336588d1 (bug 1765093)
Backed out changeset 17d5218d84b7 (bug 1765093)
Backed out changeset bbc194412080 (bug 1765093)
2022-05-06 17:08:52 -04:00
Dan Robertson 56871a5205 Bug 1760986 - Modify APZ mochitest coordinatesRelativeToScreen callers to use await. r=tnikkel
Make the APZ mochitests use coor coordinatesRelativeToScreen and its callers
properly. When was made async not everything was made to await properly.

Differential Revision: https://phabricator.services.mozilla.com/D144756
2022-05-06 18:21:15 +00:00
Jonathan Kew e7bef911d2 Bug 1765093 - patch 3 - Also use the new gfxTextRun::GetLineHeightMetrics to optimize GetAscentAndDescentInAppUnits. r=emilio
This accelerates web-exposed SVG APIs such as getExtentOfChar() by avoiding the expensive
MeasureText() call when we're just getting the line-height metrics.

Differential Revision: https://phabricator.services.mozilla.com/D145717
2022-05-06 17:47:23 +00:00
Jonathan Kew 6e0eb71134 Bug 1765093 - patch 2 - Make ShrinkToLigatureBoundaries return whether any adjustment was made, so callers can skip redundant calls to partial-ligature code. r=gfx-reviewers,lsalzman
This allows a number of callers to skip calling partial-ligature functions
altogether if the ranges are known to be empty, which should be a minor win.

Depends on D145631

Differential Revision: https://phabricator.services.mozilla.com/D145632
2022-05-06 17:47:23 +00:00
Jonathan Kew a29c0bcdbe Bug 1765093 - patch 1 - Avoid measuring entire textrun in SVGTextFrame's GetBaselinePosition function. r=dholbert
This aims to prevent an O(n^2) performance situation when per-glyph
positioning is in use.

This reduces the time to load the testcase here from around 70s to 17s
in my local build. Still not great, but at least it's less of a disaster.

Differential Revision: https://phabricator.services.mozilla.com/D145631
2022-05-06 17:47:22 +00:00
sotaro 417b6e90df Bug 1766203 - Release all IMFSamples before destroying video MFTDecoder r=media-playback-reviewers,gfx-reviewers,jrmuizel,alwu
Crashes of Bug 1764753 seemed to happen during closing video MFTDecoder or closing IMFSample after closing video MFTDecoder. We might need to release all IMFSamples before destroying video MFTDecoder.

Differential Revision: https://phabricator.services.mozilla.com/D144537
2022-05-06 15:22:41 +00:00
Glenn Watson 4626506ead Bug 1765862 - Skip backdrop-filter if `nsIFrame` reports not visible for painting r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D145526
2022-05-06 01:12:05 +00:00
Dan Robertson 51b0ecb0cb Bug 1766926 Part 1 - Fix ambiguous overload of ScaleFactors2D multiplication operator. r=botond
Fix a possible ambiguous overload of the multiplication operator for
ScaleFactors2D.

Differential Revision: https://phabricator.services.mozilla.com/D145277
2022-05-05 23:19:18 +00:00
Glenn Watson 69f64e70de Bug 1766498 - Disable raster root adjustment for backdrop-filters r=gfx-reviewers,lsalzman
This breaks an assumption that the surface spatial node for the
resolve surface matches that of the backdrop root. In future we
might be able to support snapping in this use case, but I'm not
convinced it's actually useful to have that anyway yet.

Differential Revision: https://phabricator.services.mozilla.com/D145504
2022-05-05 21:22:21 +00:00
Noemi Erli 6cd762c806 Backed out changeset c94246f87e84 (bug 1659124) for causing multiple failures CLOSED TREE 2022-05-06 01:08:19 +03:00
Razvan Cojocaru a057ee947b Bug 1659124 - Avoid passing non-CSS points to IsZero as it may return false when it should return true. r=botond
IsZero() is changed to take a CSSPoint parameter instead of any
point type, to avoid accidentally re-introducing the issue.

Differential Revision: https://phabricator.services.mozilla.com/D145173
2022-05-05 20:35:48 +00:00
Emilio Cobos Álvarez 9d430bf4ed Bug 1767172 - Remove custom screen info handling from GfxInfo, use ScreenManager for that. r=jrmuizel,handyman,stransky
This removes a bunch of custom code from GfxInfo to obtain screen
information, and instead collects that screen information in
ScreenManager.

This, apart of removing duplicated code, has the extra benefit of
reporting multi-monitor information on GTK (and potentially in the
future reporting scale and refresh rate properly as well, I've kept the
telemetry as it was on that regard).

Differential Revision: https://phabricator.services.mozilla.com/D145178
2022-05-05 15:07:03 +00:00
Emilio Cobos Álvarez 2ee4fc0f24 Bug 1757929 - Remove a bunch of IPC headers from gfxFont and co. r=jfkthame,layout-reviewers
Removing the whole chromium IPC config is not possible because
gfxPlatformFontList uses base::*, but this should speed up builds a
little so seems worth landing regardless.

Differential Revision: https://phabricator.services.mozilla.com/D143371
2022-05-05 11:37:51 +00:00
Markus Stange 29c1a5d22e Bug 1765399 - Don't create a new SoftwareVsyncSource instance when layout.frame_rate is changed to a different value. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144378
2022-05-05 02:15:19 +00:00
Markus Stange 1714c056dd Bug 1765399 - Add SoftwareVsyncSource::SetVsyncRate and make XrandrSoftwareVsyncSource vsync rate adjustment threadsafe. r=smaug
XrandrSoftwareVsyncSource changes the rate on the main thread but reads it on the software vsync thread.

Differential Revision: https://phabricator.services.mozilla.com/D144377
2022-05-05 02:15:18 +00:00
Markus Stange d53e3d4836 Bug 1765399 - Move SoftwareVsyncSource into the mozilla::gfx namespace. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144376
2022-05-05 02:15:18 +00:00
Markus Stange 2d423f22c5 Bug 1765399 - Invert the relationship between VsyncSource and VsyncDispatcher: The VsyncDispatcher now owns the source. r=smaug
This makes vsync source swapping much more natural.

The VsyncSource now only has a reference to the VsyncDispatcher for the duration
during which the dispatcher is listening to vsync. Whenever the dispatcher is
not listening to vsync, the source has no reference to the dispatcher and there
is no cycle.

This patch also adds the ability to register multiple dispatchers with the same
source. This ability is not used yet; a vsync source always has zero or one
dispatchers at the moment. It is in preparation for a future patch where there
will be one dispatcher per widget.

Furthermore, nothing uses gfxPlatform::GetGlobalVsync anymore, so it is removed.

Differential Revision: https://phabricator.services.mozilla.com/D144375
2022-05-05 02:15:18 +00:00
Markus Stange 06766c211b Bug 1765399 - Rename Get/CreateHardwareVsync to GetGlobalVsync, CreateGlobalHardwareVsync and CreateSoftwareVsync. r=smaug
This draws a clearer line between hardware vsync and software vsync.

Differential Revision: https://phabricator.services.mozilla.com/D144373
2022-05-05 02:15:17 +00:00
Markus Stange fe5f80f73c Bug 1765399 - Move a few more things to GetGlobalVsyncDispatcher. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144372
2022-05-05 02:15:16 +00:00
Markus Stange 46f08c5128 Bug 1765399 - Move main thread observers to the vsync dispatcher. r=smaug
Main thread observers (previously "generic" observers) are only used
by Windows touchpad scrolling so far.

Differential Revision: https://phabricator.services.mozilla.com/D144371
2022-05-05 02:15:16 +00:00
Markus Stange 8a3a14adde Bug 1765399 - Make VsyncParent use VsyncDispatcher instead of VsyncSource. r=smaug
This doesn't change much; VsyncParent was already only using mVsyncSource
to obtain the VsyncDispatcher. (And to get the vsync rate, which it can
now get directly from the dispatcher.)

Differential Revision: https://phabricator.services.mozilla.com/D144370
2022-05-05 02:15:16 +00:00
Markus Stange 2f1ab8e716 Bug 1765399 - Add gfxPlatform::GetGlobalVsyncDispatcher(). r=smaug
Now gfxPlatform and gfxPlatform::mVsyncSource have shared ownership of the VsyncDispatcher.
This is in preparation for reversing the ownership relationship between VsyncSource and VsyncDispatcher.

Differential Revision: https://phabricator.services.mozilla.com/D144368
2022-05-05 02:15:15 +00:00
Markus Stange 107d6dbd85 Bug 1765399 - Register CompositorVsyncDispatcher with VsyncDispatcher instead of directly with the VsyncSource. r=smaug
This makes it so that the VsyncSource doesn't need to keep track of the compositor vsync dispatchers.
And the moving-between-sources logic needs to be handled only for the VsyncDispatcher.

Once we have one VsyncDispatcher per window, we can probably eliminate CompositorVsyncDispatcher.

Differential Revision: https://phabricator.services.mozilla.com/D144366
2022-05-05 02:15:14 +00:00
Markus Stange 5011140bec Bug 1765399 - Rename mRefreshTimerNeedsVsync and NotifyRefreshTimerVsyncStatus. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144364
2022-05-05 02:15:13 +00:00
Markus Stange 5ef3c929f4 Bug 1765399 - Rename RefreshTimerVsyncDispatcher to VsyncDispatcher. r=smaug
RefreshTimerVsyncDispatcher manages a lot more than just the
RefreshDriverVsyncTimer these days.

Differential Revision: https://phabricator.services.mozilla.com/D144363
2022-05-05 02:15:13 +00:00
Marian-Vasile Laza 45f00cd7b7 Backed out changeset adf2b25deb64 (bug 1760986) for causing mochitest fis test failures. CLOSED TREE 2022-05-05 06:08:47 +03:00
Narcis Beleuzu 5a745d370c Backed out changeset 048e4e27783d (bug 1659124) for mochitest crashes on test_group_bug1534549.html . CLOSED TREE 2022-05-05 04:14:54 +03:00
Narcis Beleuzu 609a0387b8 Backed out changeset bcc1a29ee9c8 (bug 1765525) for wr failure on backdrop-filter-svg-foreignObject.html 2022-05-05 03:42:35 +03:00
Razvan Cojocaru d0d119f806 Bug 1659124 - Avoid passing non-CSS points to IsZero as it may return false when it should return true. r=botond
IsZero() is changed to take a CSSPoint parameter instead of any
point type, to avoid accidentally re-introducing the issue.

Differential Revision: https://phabricator.services.mozilla.com/D145173
2022-05-04 21:51:57 +00:00
Dan Robertson 1342c04686 Bug 1760986 - Modify APZ mochitest coordinatesRelativeToScreen callers to use await. r=tnikkel
Make the APZ mochitests use coor coordinatesRelativeToScreen and its callers
properly. When was made async not everything was made to await properly.

Differential Revision: https://phabricator.services.mozilla.com/D144756
2022-05-04 21:41:58 +00:00
Glenn Watson 7dfd66fe8a Bug 1765525 - Fix gecko DL creation for backdrop-filters with clips r=gfx-reviewers,lsalzman
Change to derive from nsDisplayEffectsBase, since the backdrop-filter
can still have a visual bounds (and effect) even if the child
stacking context has no items. Also use the same approach to get
the bounding rect and implement GetBounds as nsDisplayFilters uses.

Differential Revision: https://phabricator.services.mozilla.com/D145295
2022-05-04 19:08:31 +00:00
Marian-Vasile Laza 3309e86b5d Backed out changeset 52db7558a4da (bug 1757929) for causing build bustages Unified_cpp_image0.obj. CLOSED TREE 2022-05-05 00:41:56 +03:00
Marian-Vasile Laza 1cd0ac703f Backed out 16 changesets (bug 1765399) for causing build bustages on RefPtr.h.
Backed out changeset 8ff5e213e351 (bug 1765399)
Backed out changeset bd164f5cc8b3 (bug 1765399)
Backed out changeset 939b577eee05 (bug 1765399)
Backed out changeset ee00e3583f42 (bug 1765399)
Backed out changeset e5001537e536 (bug 1765399)
Backed out changeset d5a4004a2955 (bug 1765399)
Backed out changeset d3c1f6c420e3 (bug 1765399)
Backed out changeset d21fca656853 (bug 1765399)
Backed out changeset 5e5a29a99c9e (bug 1765399)
Backed out changeset ce326de1e107 (bug 1765399)
Backed out changeset 3890e83660b0 (bug 1765399)
Backed out changeset 2f3ceca7aefe (bug 1765399)
Backed out changeset 40c47c498858 (bug 1765399)
Backed out changeset 3a3a2aa6de9b (bug 1765399)
Backed out changeset 4a30a4b3d30d (bug 1765399)
Backed out changeset a9115d9d648e (bug 1765399)
2022-05-05 00:30:06 +03:00
Jonathan Kew c94c08270b Bug 1759686 - patch 5 - Adapt canvas2d text methods to allow use from worker threads without a Document or PresShell. r=aosmond
This enables an offscreen-canvas Worker to do text rendering, but only with system-installed fonts
because we don't yet have a FontFaceSet available in the Worker. (That's bug 1758946.)

Differential Revision: https://phabricator.services.mozilla.com/D144188
2022-05-04 17:13:16 +00:00
Emilio Cobos Álvarez 335ea6af87 Bug 1757929 - Remove a bunch of IPC headers from gfxFont and co. r=jfkthame,layout-reviewers
Removing the whole chromium IPC config is not possible because
gfxPlatformFontList uses base::*, but this should speed up builds a
little so seems worth landing regardless.

Differential Revision: https://phabricator.services.mozilla.com/D143371
2022-05-04 16:41:43 +00:00
Markus Stange 5d919a3c2e Bug 1765399 - Don't create a new SoftwareVsyncSource instance when layout.frame_rate is changed to a different value. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144378
2022-05-04 16:13:40 +00:00
Markus Stange c6833dc477 Bug 1765399 - Add SoftwareVsyncSource::SetVsyncRate and make XrandrSoftwareVsyncSource vsync rate adjustment threadsafe. r=smaug
XrandrSoftwareVsyncSource changes the rate on the main thread but reads it on the software vsync thread.

Differential Revision: https://phabricator.services.mozilla.com/D144377
2022-05-04 16:13:39 +00:00
Markus Stange 3a12d9aaf2 Bug 1765399 - Move SoftwareVsyncSource into the mozilla::gfx namespace. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144376
2022-05-04 16:13:39 +00:00
Markus Stange 43cb4a509e Bug 1765399 - Invert the relationship between VsyncSource and VsyncDispatcher: The VsyncDispatcher now owns the source. r=smaug
This makes vsync source swapping much more natural.

The VsyncSource now only has a reference to the VsyncDispatcher for the duration
during which the dispatcher is listening to vsync. Whenever the dispatcher is
not listening to vsync, the source has no reference to the dispatcher and there
is no cycle.

This patch also adds the ability to register multiple dispatchers with the same
source. This ability is not used yet; a vsync source always has zero or one
dispatchers at the moment. It is in preparation for a future patch where there
will be one dispatcher per widget.

Furthermore, nothing uses gfxPlatform::GetGlobalVsync anymore, so it is removed.

Differential Revision: https://phabricator.services.mozilla.com/D144375
2022-05-04 16:13:39 +00:00
Markus Stange abdaca76a5 Bug 1765399 - Rename Get/CreateHardwareVsync to GetGlobalVsync, CreateGlobalHardwareVsync and CreateSoftwareVsync. r=smaug
This draws a clearer line between hardware vsync and software vsync.

Differential Revision: https://phabricator.services.mozilla.com/D144373
2022-05-04 16:13:38 +00:00
Markus Stange 4270b96734 Bug 1765399 - Move a few more things to GetGlobalVsyncDispatcher. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144372
2022-05-04 16:13:37 +00:00