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

44613 Коммитов

Автор SHA1 Сообщение Дата
Kelsey Gilbert 5098fc5842 Bug 1814745 - Don't require a browser restart to update dom.webgpu.enabled. r=jimb
about:support's feature table still shows blocklisting, just not whether
the pref is set.
If different from default, dom.webgpu.enabled still shows up in about:support under
"Important Modified Prefs" like normal.

Also renames "gfx.webgpu.force-enabled" to "gfx.webgpu.ignore-blocklist"
to reflect its functionality.

Differential Revision: https://phabricator.services.mozilla.com/D169007
2023-02-13 23:11:42 +00:00
sotaro 44e635d2e6 Bug 1816053 - Add log to VideoBridgeParent::ActorDestroy() r=gfx-reviewers,lsalzman
It would be helpful if VideoBridgeParent::ActorDestroy() has a log of AbnormalShutdown.

Differential Revision: https://phabricator.services.mozilla.com/D169418
2023-02-13 21:46:54 +00:00
sotaro efa263deb1 Bug 1816057 - Add GPUVideoTextureHost::NeedsDeferredDeletion() r=gfx-reviewers,lsalzman
NeedsDeferredDeletion() is not overridden in GPUVideoTextureHost.

Differential Revision: https://phabricator.services.mozilla.com/D169425
2023-02-13 21:23:11 +00:00
stransky 041cc19726 Bug 1816429 Check aFontSet in addFontSetFamilies() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169626
2023-02-13 18:45:24 +00:00
Jamie Nicol f03cafb885 Bug 1816405 - Only print source of single shader when glslopt pass fails. r=gfx-reviewers,lsalzman
If the glslopt pass fails to optimize a shader, we helpfully print the
shader source so that it is easy to find what the problem is. However,
we print this from within the build_parallel call, meaning if multiple
shaders fail to optimize we print all of their sources and they get
interleaved with each other, making it very difficult to find the
problematic line.

This patch makes us delay printing the source until the same place
where we print the error log, after we have stopped processing in
parallel. This means we will only print the source of a single
shader (the first one which fails to optimize), along with the error
log for that shader, which is much easier to debug.

This also includes a small tidy-up to handle both vertex and fragment
shaders in a loop to remove code duplication, and runs rustfmt.

Differential Revision: https://phabricator.services.mozilla.com/D169618
2023-02-13 16:30:26 +00:00
Alex Jakobi 232617570d Bug 1805851 - Add unit test for APZC::ArePointerEventsConsumable. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D167375
2023-02-13 16:26:09 +00:00
Andi-Bogdan Postelnicu 6a4cfe596b Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,webdriver-reviewers,whimboo
Updated with rustfmt 1.5.1-stable (fc594f1 2023-01-24)
# ignore-this-changeset

Depends on D168658

Differential Revision: https://phabricator.services.mozilla.com/D168659
2023-02-13 15:02:07 +00:00
Andi-Bogdan Postelnicu d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
Cristina Horotan 5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch ff1cc20bd7 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 12:55:26 +00:00
Ray Kraesig fdc007af70 Bug 1816001 - allow users to disable mitigation for bug 1638709 r=gfx-reviewers,bradwerth,ahale
Bug 1638709 describes artifacts when the webrender compositor is enabled
on certain Windows systems with NVIDIA cards and mixed monitor refresh
rates. As of bug 1704954, we currently disable DirectComposition on such
systems in Beta and Release as a mitigation.

Unfortunately, on a significant (albeit not yet fully characterized)
fraction of Windows 11 machines, the fallback compositor also has
issues, resulting in bug 1763981 (clipping of web content on first
entering fullscreen). Users experiencing this latter issue have hitherto
_not_ reported the former when testing on Nightly, suggesting that the
mitigation may be getting applied overbroadly.

Add a pref to allow disabling the mitigation in question, so that users
experiencing bug 1763981, but who are not subject to 1638709, have a
less intrusive workaround than remembering to hit F11 twice every time
they start Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D169389
2023-02-11 00:31:49 +00:00
Ashley Hale dfafa061c4 Bug 1816031 - Fix up example-compositor so it can be used for additional testing r=gw
Differential Revision: https://phabricator.services.mozilla.com/D169404
2023-02-11 00:27:00 +00:00
Jonathan Kew 07fba46d11 Bug 1815679 - Fix errors in mapping font-style:oblique values to the 'slnt' axis in variable fonts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169335
2023-02-10 09:11:01 +00:00
Jonathan Kew 6c2cb4ec55 Bug 1815679 - Account for mRangeFlags in the userfont cache key. r=emilio
This is actually a bug that pre-dates the regression here, but I haven't seen a report
of it or a specific test failure that results. However, the new WPT reftests I'm
intending to land for the slant issue do exhibit a failure until this is fixed,
so let's go ahead and do it here.

Differential Revision: https://phabricator.services.mozilla.com/D169334
2023-02-10 09:11:01 +00:00
Cristian Tuns 8335f7645c Backed out changeset fe2339f60bf1 (bug 1816001) for causing build bustages on gfxConfigManager.cpp CLOSED TREE 2023-02-09 17:48:08 -05:00
Ray Kraesig 8d967b07d5 Bug 1816001 - allow users to disable mitigation for bug 1638709 r=gfx-reviewers,bradwerth
Bug 1638709 describes artifacts when the webrender compositor is enabled
on certain Windows systems with NVIDIA cards and mixed monitor refresh
rates. As of bug 1704954, we currently disable DirectComposition on such
systems in Beta and Release as a mitigation.

Unfortunately, on a significant (albeit not yet fully characterized)
fraction of Windows 11 machines, the fallback compositor also has
issues, resulting in bug 1763981 (clipping of web content on first
entering fullscreen). Users experiencing this latter issue have hitherto
_not_ reported the former when testing on Nightly, suggesting that the
mitigation may be getting applied overbroadly.

Add a pref to allow disabling the mitigation in question, so that users
experiencing bug 1763981, but who are not subject to 1638709, have a
less intrusive workaround than remembering to hit F11 twice every time
they start Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D169389
2023-02-09 22:32:06 +00:00
Razvan Cojocaru c698be2359 Bug 1815442 - Increase fuzzing on failing perma OS X tests. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D169180
2023-02-08 18:01:20 +00:00
Nicolas Silva 452651d391 Bug 1814848 - Update wgpu to revision 41de797c745d317e93b9cf50e7446faff7f65954. r=webgpu-reviewers,jimb a=reland CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D168928
2023-02-07 18:08:29 +00:00
Csoregi Natalia 435547cbe3 Backed out 3 changesets (bug 1814848) for causing address sanitizer fails in MOZ_Crash. CLOSED TREE
Backed out changeset 38ecc5076ab3 (bug 1814848)
Backed out changeset 7dd5ce12c5f3 (bug 1814848)
Backed out changeset 5c42f3352b26 (bug 1814848)
2023-02-07 23:10:17 +02:00
Nicolas Silva e45015e278 Bug 1814848 - Update wgpu to revision 41de797c745d317e93b9cf50e7446faff7f65954. r=webgpu-reviewers,jimb
Differential Revision: https://phabricator.services.mozilla.com/D168928
2023-02-07 18:08:29 +00:00
Jamie Nicol 428ac6de51 Bug 1814344 - Disable scissored clear optimization on all Android except SWGL. r=gfx-reviewers,jrmuizel
In bug 1809738 we found that our scissored render target clear
optimization actively hurt performance on some Mali GPUs. From testing
on a variety of Android devices, we have found that it mostly makes no
difference either way, but hurts performance on some other GPUs
too. On software webrender, however, it is still a performance win.

This patch therefore disables the optimization on all Android, apart
from when using software webrender.

Differential Revision: https://phabricator.services.mozilla.com/D169062
2023-02-07 15:21:48 +00:00
Arsen Arsenović 55b688775f Bug 1811714 - Add a few missing <cstdint> includes r=gfx-reviewers,nical
GCC 13s libstdc++ reduced its dependency on some headers like <cstdint>,
so it's no longer transitively included through various headers.
Include it explicitly.

See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes

  11:16.32 .../components/telemetry/pingsender/pingsender.cpp:30:7:
                    error: unknown type name 'uint32_t'
  11:16.33 const uint32_t kConnectionTimeoutMs = 30 * 1000;
  11:16.33       ^
  11:16.33 ... /components/telemetry/pingsender/pingsender.cpp:76:9:
                    error: unknown type name 'uint32_t'
  11:16.33   const uint32_t kBufferSize = 4 * 1024 - 1;
  11:16.34         ^
  11:16.44 2 errors generated.
  (et al)

Differential Revision: https://phabricator.services.mozilla.com/D167491
2023-02-07 07:13:32 +00:00
Razvan Cojocaru 015878d5a9 Bug 1554795 - Support desktop scrollbar thumb sizing logic in APZ. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D161561
2023-02-06 23:16:59 +00:00
Botond Ballo 3783cb10b6 Bug 1554795 - Expose the currently effective visual viewport rect. r=hiro
Similar to the other GetCurrentAsync*() functions,
GetCurrentAsyncVisualViewport() takes into account the async test
attributes as well as the frame delay.

It supersedes GetCurrentAsyncScrollOffsetInCSSPixels() which can
be obtained as the the TopLeft() of the visual viewport rect.

Differential Revision: https://phabricator.services.mozilla.com/D163148
2023-02-06 23:16:58 +00:00
Norisz Fay ed1015daf1 Backed out 9 changesets (bug 1799258) for causing build bustages CLOSED TREE
Backed out changeset a48db1421c6d (bug 1799258)
Backed out changeset 7707637480e7 (bug 1799258)
Backed out changeset 0141b29bf5df (bug 1799258)
Backed out changeset cd9af26bb314 (bug 1799258)
Backed out changeset 4e68a54c6410 (bug 1799258)
Backed out changeset 52afd24d2338 (bug 1799258)
Backed out changeset b4b4977857c7 (bug 1799258)
Backed out changeset 2c23929f52f2 (bug 1799258)
Backed out changeset 83744e1e372b (bug 1799258)
2023-02-07 00:36:41 +02:00
Otto Länd 38ce5da877 Bug 1799258: apply code formatting via Lando
# ignore-this-changeset
2023-02-06 20:02:15 +00:00
Kelsey Gilbert 987b128720 Bug 1799258 - Share all-of-dcomp.h preamble, and deal with outdated mingw dcomp.h. r=gfx-reviewers,sotaro
Differential Revision: https://phabricator.services.mozilla.com/D168839
2023-02-06 19:58:56 +00:00
Kelsey Gilbert 9bf188ddc2 Bug 1799258 - Ask dcomp.h to define IDCompositionFilterEffect. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D168325
2023-02-06 19:58:55 +00:00
Kelsey Gilbert 10e1d1a8d0 Bug 1799258 - Support outByIn.size()<2 in SampleOutByIn. r=bradwerth
This makes it easier to apply transform functions, even when they are
not defined/present.

Differential Revision: https://phabricator.services.mozilla.com/D167472
2023-02-06 19:58:55 +00:00
Kelsey Gilbert 1c58e179b5 Bug 1799258 - No-op equal tfs rather than inverting. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D167471
2023-02-06 19:58:54 +00:00
Kelsey Gilbert 25d74c811d Bug 1799258 - Do color-management on Windows+DComp via IDCompositionFilterEffects. r=sotaro
+ Add gfx.color_management.rec709_gamma_as_srgb:true. :'(

In particular, rec709(16/255) -> srgb(31/255). Even though it's
technically correct, it's practically-speaking incorrect, since that's
not what Chrome does, nor what the web expected for years and years.

In practice, basically everyone expects gamma to just be completely
ignored.

What people expect:
* Pretend gamut is srgb(==rec709), but stretch this naively for the
  display. If you have a display-p3-gamut display, srgb:0.5 expects to
  be displayed as display:0.5, which will be display-p3:0.5 to the eyes.
* Pretend all content gammas (TFs) are srgb(!=rec790), and then bitcast this
  naively for the display. E.g. rec709(16/255) should
  display the same as srgb(16/255), not srgb(31/255). (Note: display-p3
  uses srgb gamma) But if your display has e.g. gamma=3.0, don't
  convert or compensate.

This is a formalization of what you get when you spend decades ignoring
color management, and people build things based on behavior-in-practice,
not behavior-in-theory.

Also:
+ gfx.color_management.native_srgb:true for Windows, so we don't use the
  display color profile, which no one else does.
+ Add rec2020_gamma_as_rec709, so we have a path towards maybe having
  rec2020 use its correct transfer function, rather than srgb (like
  rec709).

Differential Revision: https://phabricator.services.mozilla.com/D161857
2023-02-06 19:58:54 +00:00
Kelsey Gilbert a1c5ea24c5 Bug 1799258 - Add prereq Colorspaces stuff, including generic gamma->linear LUT inversion approximation. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D163664
2023-02-06 19:58:53 +00:00
Kelsey Gilbert c5cc9f1f33 Bug 1799258 - [qcms] Add query for profile data and lut tables. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D163663
2023-02-06 19:58:53 +00:00
Jonathan Kew 0569fbd9be Bug 1801463 - Use a cursor in FlattenedPath to accelerate successive calls to ComputePointAtLength for SVG text-on-a-path layout. r=gfx-reviewers,nical
This enables my local build to achieve 60fps on the js1k demo linked from the bug,
whereas without the patch I get barely 10fps.

Note: it's still possible for ComputePointAtLength would perform poorly if
the caller is iterating backwards or doing random access to a long path.
A potential mitigation for that would be to add an mLength field to FlatPathOp,
storing the length-so-far of the path, so that ComputePointAtLength could do
a binary search instead of linear accumulation. But this would add significant
memory overhead, and may not be worth doing; the low-overhead cursor here
appears to be enough to make text-on-a-path perform much better.

Differential Revision: https://phabricator.services.mozilla.com/D168937
2023-02-06 15:01:20 +00:00
Emilio Cobos Álvarez 87568139b1 Bug 1814239 - Expose Point/Size rounded-to-multiple helpers, and use them from MaybeRoundToDisplayPixels. r=tnikkel,gfx-reviewers,nical
Turns out we already had code for this in NumericTools.h, so reuse it.

I thought I was going to need this code somewhere else though I didn't
end up needing it.

While at it clean up unnecessary template params I noticed.

Differential Revision: https://phabricator.services.mozilla.com/D168460
2023-02-06 12:28:47 +00:00
sotaro 425786bd75 Bug 1813267 - Add WebRender (Software OpenGL) handling for AndroidHardwareBufferTextureHost r=gfx-reviewers,jnicol
Implementation is borrowed from RenderAndroidSurfaceTextureHost. Since Android SurfaceTexture and AndroidHardwareBuffer use same android GraphicBuffer.

Differential Revision: https://phabricator.services.mozilla.com/D168764
2023-02-06 11:27:05 +00:00
sotaro 2f26b6d07c Bug 1811456 - Fix srcOrigin of Android SurfaceTexture Blit r=gfx-reviewers,jnicol
It is short term fix. Using SurfaceTexture.getTransform() is long term fix.

Differential Revision: https://phabricator.services.mozilla.com/D168933
2023-02-06 11:23:38 +00:00
Makoto Kato 3e6ba61292 Bug 1812938 - Part 2. FindScreen returns Screen instead of nsIScreen. r=emilio
`nsDeviceContext` isn't scriptable, it is unnecessary to return `nsIScreen`
for `FindScreen`.

Differential Revision: https://phabricator.services.mozilla.com/D168030
2023-02-06 04:51:27 +00:00
Makoto Kato a81830ccdb Bug 1812938 - Part 1. GetWidgetScreen returns Screen instead of nsIScreen. r=emilio,geckoview-reviewers,owlish
`nsIWidget` isn't scriptable, so it is unnecessary to return `nsIScreen` for
`GetWidgetScreen`.

Differential Revision: https://phabricator.services.mozilla.com/D168029
2023-02-06 04:51:26 +00:00
Emilio Cobos Álvarez 3d092ba60e Bug 1775062 - Implement ipdl reads without needing default ctors. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D149743
2023-02-04 11:12:36 +00:00
Nika Layzell 1cbf30fe37 Bug 1812156 - Part 1: Fix some IPDL statements to use fully qualified names, r=necko-reviewers,valentin
These types were used in IPDL but were not fully qualified.

Differential Revision: https://phabricator.services.mozilla.com/D168877
2023-02-04 10:44:24 +00:00
Lee Salzman 4d84b490bc Bug 1814628 - Use half-spaces to select the corner of a rounded rect. r=jrmuizel,gfx-reviewers,ahale
Currently, the rounded rect shader uses the linear distance from the corner's origin
(the ellipse origin) to select which corner to evaluate ellipse distance within. However,
this metric may fail when it believes we are currently inside multiple corners, and may
select the wrong minimal distance and thus the wrong corner. Ideally, we need to actually
compute the ellipse distance for each corner and select the minimal one, but this is
prohibitively expensive.

Instead, we use the same strategy as the SWGL span shader which is to define a half-space
plane that spans the diagonal of each corner, by which we decide if we are inside a given
corner by seeing which side of the coner diagonal's half-space plane we're on. This yields
code that is about as fast as the currently broken linear distance comparison and more
closely matches the results of the SWGL span shader as a bonus.

This also cleans up the half-space varyings to be specified in a more common plane form
of normal and offset which takes up less space while being a bit cheaper to evaluate.

Differential Revision: https://phabricator.services.mozilla.com/D168769
2023-02-04 05:48:46 +00:00
sotaro 4e27043c64 Bug 1813200 - Replace EffectNV12 creation by EffectRGB in CompositorOGL::Initialize() r=gfx-reviewers,lsalzman
EffectNV12 is not used by RenderCompositorOGLSWGL/RenderCompositorLayersSWGL. EffectRGB  is used by RenderCompositorLayersSWGL.

Differential Revision: https://phabricator.services.mozilla.com/D168771
2023-02-03 23:14:12 +00:00
Andrew Osmond e63bfec092 Bug 1789693 - Refactor gfxFont and gfxFontCache expiration tracking. r=jfkthame
This patch reverts our behaviour closer to how we worked prior to bug
1780193. Parts of bug 1780193 remain because they are necessary to
ensure there are no race conditions when interacting with the cache from
multiple threads.

Now we remove fonts from the expiration tracker when there are strong
references remaining to the object. When the last strong reference is
cleared, we readd the font to the expiration tracker. A lookup will
remove it from the tracker (and creates a strong reference). If it
expires from the tracker, it is then destroy. There are several race
conditions we need to manage because the refcount can be updated without
holding the gfxFontCache mutex.

Differential Revision: https://phabricator.services.mozilla.com/D156716
2023-02-03 19:31:46 +00:00
Jonathan Kew 55ad8c60ec Bug 1322437 - Ensure that gfxFontGroup::GetDefaultFont tries the platform list's GetDefaultFontEntry() as a last resort in all cases. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D168782
2023-02-03 17:19:33 +00:00
sotaro 6f5040909c Bug 1814811 - Fix out-of-process WebGL rendering by RenderAndroidSurfaceTextureHost and WebRender (Software OpenGL) r=lsalzman,gfx-reviewers
2 problems existed.

- [1] RenderAndroidSurfaceTextureHost::GetUvCoords() was not called when RenderAndroidSurfaceTextureHost is wrapped by RenderTextureHostWrapper.
- [2] NeedsYFlip() of SurfaceTextureHost::CreateRenderTexture() uses TextureHost::mFlags. But TextureHost::mFlags was updated by RemoteTextureHostWrapper::ApplyTextureFlagsToRemoteTexture() after SurfaceTextureHost::CreateRenderTexture() call. Then RenderAndroidSurfaceTextureHost::mOriginPos became wrong.

[1] is addressed by adding RenderTextureHostWrapper::GetUvCoords()

[2] is addressed by removing RenderAndroidSurfaceTextureHost::mOriginPos. It is not necessary since Bug 1731980.

Differential Revision: https://phabricator.services.mozilla.com/D168763
2023-02-03 08:39:56 +00:00
sotaro 010e474c0f Bug 1813189 - Limit external compositing only to ImageRendering::Auto r=gw,gfx-reviewers
Disable external compositing if ImageRendering is not ImageRendering::Auto for now. It seems that we could not handle ImageRendering::Pixelated for video overlay on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D168514
2023-02-03 01:32:03 +00:00
Jonathan Kew 4b98682338 Bug 1814651 - Cherry-pick commit 85be877 from upstream harfbuzz. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D168686
2023-02-02 18:43:54 +00:00
stransky 9e2f7a799d Bug 1799747 [Linux] Don't check VA-API feature status when it's force enabled r=emilio
Depends on D168003

Differential Revision: https://phabricator.services.mozilla.com/D168004
2023-02-02 12:28:54 +00:00
stransky 9730ae163c Bug 1799747 [Linux] Switch media_ffmpeg_vaapi_enabled() to media_ffmpeg_vaapi_enabled_AtStartup() as we don't change the setup runtime r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168003
2023-02-02 12:28:53 +00:00
Neil Deakin 9c2e7458ba Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Jonathan Kew e0c4a32c6e Bug 1794298 - Improve font-selection heuristics so that Twemoji-Mozilla keycaps (in emoji style) work as expected. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168401
2023-02-01 13:25:39 +00:00
Emilio Cobos Álvarez 3a46916749 Bug 1812698 - Expose desktopEnvironment via nsIXULRuntime rather than nsIGfxInfo. r=stransky
This is:

 * An easier way for browser code to access it.
 * Avoids having a bunch of per-platform implementations.
 * We don't need to actually get graphics info for it to work.

So it should be a bit nicer over all.

Differential Revision: https://phabricator.services.mozilla.com/D168373
2023-02-01 13:14:50 +00:00
Glenn Watson 9959f39275 Bug 1813514 - Add further amount of fuzziness to new reftest r=gfx-reviewers,jgilbert
There is some edge AA fuzziness due to the differences between
the test and reference. Fuzzing them doesn't affect the test
result as when the bug occurs the rendering difference is
dramatically different.

Differential Revision: https://phabricator.services.mozilla.com/D168464
2023-01-31 20:37:20 +00:00
Jamie Nicol f40a982dd9 Bug 1809738 - Avoid using scissor rect when clearing render targets on Mali GPUs. r=gfx-reviewers,lsalzman
We currently set a scissor rect when clearing render targets, as this
was measured to be a performance win on some GPUs. On Mali, however,
it is better to perform a full, non-scissored clear of a render target
immediately after binding it, as this allows the driver to omit
reading the previous contents in to tile memory. This patch makes it
so that by default we perform the non-scissored clear on Mali, and
retain the scissor on all other GPUs. The existing
enable_clear_scissor option can be used by the embedder to override
the default value.

Of particular note, this massively improves the performance of twitter
on Mali G710 (eg Pixel 7), where the blur backdrop-filter uses several
intermediate render targets and the scissored clear causes noticable
stutter.

Differential Revision: https://phabricator.services.mozilla.com/D168465
2023-01-31 20:34:57 +00:00
Jonathan Kew 7585dcd59a Bug 1813987 - Remove direct ICU usage from gfxFontGroup; rely on intl::String API instead. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D168359
2023-01-31 18:56:53 +00:00
Nicolas Silva 6ae5da82f4 Bug 1813547 - Update wgpu to revision 48d8666de002c7bfddbe85a2596f7748b4cc18b4. r=webgpu-reviewers,jimb
Differential Revision: https://phabricator.services.mozilla.com/D168302
2023-01-31 18:29:09 +00:00
Jan-Erik Rediger 5cd8c5650a Bug 1812615 - Update to Glean v52.2.0, glean_parser 7.0.0 and UniFFI 0.23. r=chutten,markh,glandium,supply-chain-reviewers
The in-tree UniFFI bindings were regenerated with:

    ./mach uniffi generate

Differential Revision: https://phabricator.services.mozilla.com/D168060
2023-01-31 11:12:05 +00:00
Tom Schuster e1d65f08eb Bug 1811863 - Replace the remaining users of privacy_resistFingerprinting(). r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D168081
2023-01-30 21:37:04 +00:00
Glenn Watson fccecb89b3 Bug 1813514 - Add small amount of fuzziness to new reftest r=gfx-reviewers,jgilbert
There is some edge AA fuzziness due to the differences between
the test and reference. Fuzzing them doesn't affect the test
result as when the bug occurs the rendering difference is
dramatically different.

Differential Revision: https://phabricator.services.mozilla.com/D168306
2023-01-30 20:42:38 +00:00
Norisz Fay 7a9e3bbab8 Backed out changeset c2571e59e07b (bug 1811978) for causing multiple failures CLOSED TREE 2023-01-30 10:04:27 +02:00
Glenn Watson 8a92e5ca8e Bug 1811978 - Enable the new tiled rendering path, update test expectations r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D167630
2023-01-30 02:54:41 +00:00
Glenn Watson 24de73bc80 Bug 1808830 - Fix a panic from an invalid cast in euclid r=gfx-reviewers,jrmuizel
When the scale is very large, we need to adjust that before
doing the cast to integer units.

Differential Revision: https://phabricator.services.mozilla.com/D168027
2023-01-30 00:12:15 +00:00
Glenn Watson 3f7b25bf9c Bug 1800358 - Fix invalid scroll root selection in some cases. r=gfx-reviewers,jrmuizel
Reverts an optimization that can cause artifacts on some pages. We
need to do a deeper investigation at some point to find out why,
and then reenable the optimization.

Differential Revision: https://phabricator.services.mozilla.com/D168026
2023-01-29 23:57:40 +00:00
Glenn Watson 1e90b02453 Bug 1812341 - Fix 3d transforms bug with backface-visibility: hidden r=gfx-reviewers,jrmuizel
Revert the original changes from bug 1772049 for now. We don't
currently rely on that patch, having found a simpler way to
handle how that code interacts with the backdrop-filter code.

Differential Revision: https://phabricator.services.mozilla.com/D168015
2023-01-29 23:38:27 +00:00
Jonathan Kew b927eaab86 Bug 1724892 - Implement the font-synthesis-{weight,style,small-caps} longhand properties, and make font-synthesis into a shorthand. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167480
2023-01-29 13:25:31 +00:00
Emilio Cobos Álvarez 604d8268b2 Bug 1813046 - Simplify scrollbar sizing code. r=spohl
This removes the capability of having differently-sized vertical and
horizontal scrollbars (which is only potentially used in windows, and in
practice almost-never used). For that case, we choose the larger of
vertical/horizontal scrollbar sizes.

This is in order to be able to realistically expose the scrollbar size
to CSS, see blocked bug.

We make RecomputeScrollbarParams the central place where each scrollbar
style decides its sizes, and make GetDPIRatioForScrollbarPart handle the
cocoa special-case of scaling to 1 or 2, but nothing else.

Differential Revision: https://phabricator.services.mozilla.com/D168080
2023-01-28 21:35:51 +00:00
Lee Salzman 5203daccb2 Bug 1812970 - Avoid using Skia's deprecated clip ops. r=jrmuizel
Skia upstream removed deprecated clip ops that could be used to replace
the clipping stack and bypass clips. We shouldn't really need to do this
anymore, as we can work around it just using public APIs.

The only SkCanvas operation that allows us to bypass clipping is
writePixels, which still allows us to implement CopySurface/putImageData.

Other instances where we were using the replace op for DrawTargetWebgl
layering support can just be worked around by creating a separate
DrawTargetSkia pointing to the same pixel data, but on which no clipping
or transforms are applied so that we can freely do drawing operations
on it to the base layer pixel data regardless of any user-applied clipping.

Differential Revision: https://phabricator.services.mozilla.com/D168039
2023-01-28 11:24:54 +00:00
sotaro d55f5ec846 Bug 1810097 - Support AHardwareBuffer of out-of-process WebGL on Android r=lsalzman,gfx-reviewers
Modify AHardwareBuffer implementation as to support gl::SharedSurface of out-of-process WebGL. And remove unused AHardwareBuffer implementation.

By limiting AHardwareBuffer only in GPU process, AHardwareBuffer implementation becomes simpler. We do not need to handle cross process AHardwareBuffer delivery and cross process android Fence delivery.

Differential Revision: https://phabricator.services.mozilla.com/D167911
2023-01-27 21:35:26 +00:00
Jonathan Kew 2d4285c3c9 Bug 1363454 - Create a pref to list icon font families that should be used even when use_document_fonts=0, overriding the browser's font prefs. r=emilio,dholbert
Some widely-used icon fonts use ligature rules to replace icon names such as "volume_up"
or "down_arrow" with icon glyphs. If the site is designed to use such a font, but the user
disables document fonts and we use our default Latin font instead, the underlying text will
be rendered instead of the intended icon.

To enable such fonts to continue to work, we provide a list of known ligature-icon fonts
and allow them to be used even when the document-fonts setting is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D167923
2023-01-27 17:32:54 +00:00
Jonathan Kew e9adaa9c22 Bug 1812676 - Improve font-style:oblique mapping to 'slnt' variation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167989
2023-01-27 13:32:19 +00:00
Jeff Muizelaar 3a46da3d80 Bug 1803375. Use different coordinates when running on AMD. r=lsalzman,jgilbert
This updates the version wpf-gpu-raster which adds support for
GPUs/drivers that use truncation instead of rounding when converting
vertices to fixed point.

It also adds the GL vendor to InitContextResult so that we can detect
AMD on macOS and tell wpf-gpu-raster that truncation is going to happen.

Differential Revision: https://phabricator.services.mozilla.com/D167503
2023-01-27 01:45:17 +00:00
Razvan Cojocaru bdbdd444c8 Bug 1812396 - Make BasePoint::X() and Y() return Coord. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D167950
2023-01-27 00:22:28 +00:00
Glenn Watson b42594e681 Bug 1811977 - Add a new tiled primitive rendering path to webrender r=gfx-reviewers,nical
This patch adds most of the underlying infrastructure for a new
tiled (previously: segmented) rendering path to webrender. It is
initially used only by simple (non-masked) rectangles. Follow
up patches will extend this first to all rectangles and then
porting other primitives to use this new rendering path.

The new primitive is encoded in the command buffer structure,
which allows efficiently encoding arbitrary sets of commands
to be read by the batching code. The batching code for this
primitive is much simpler, and should be consistent and shared
when other primitives are ported to use this path.

Tiling is handled during the prepare pass per-primitive. It can
support edge AA tiles, different regions for clip-mask corners
(to be added in a follow up), and uniform tiling for the inner
section of the primitive (e.g. for tiled image masks).

It adds specific support for edge anti-aliasing to be considered
as part of the tiling configuration for a primitive. This both
improves performance of rotated but otherwise opaque primitives
and allows additional functionality we don't currently support
(such as applying AA along one edge of a 2d but subpixel aligned
primitive). Since SWGL provides native AA support, the patches
take account of that, and avoid the vertex shader work and extra
edge primitives when SWGL is enabled.

Follow up patches will:
 - Add clip-mask support to new rendering path
 - Port other primitives to new rendering path
 - Add SWGL shader fast-paths where profiling indicates it makes sense to
 - Remove old segment / mask rendering paths once no longer used

Other minor changes included as part of this patch:
 - Pack TransformPaletteId in 24 bits instead of 32, for better instance struct packing
 - Support prepare pass appending multiple command buffer instructions per primitive

Differential Revision: https://phabricator.services.mozilla.com/D167629
2023-01-26 20:55:32 +00:00
Jamie Nicol 33a176e4f3 Bug 1810693 - Disable robust buffer access on Adreno 620 devices. r=gfx-reviewers,nical
A long time ago we blocked this on Adreno 630 due to causing strange
shader linking errors. We have recently discovered that this can also
affect Adreno 620 devices too.

Differential Revision: https://phabricator.services.mozilla.com/D167941
2023-01-26 14:31:11 +00:00
Emilio Cobos Álvarez 6195707dcf Bug 1809430 - Make some tests account for smaller default window size on macOS. r=botond
Before these patches we were adding the titlebar height even though we
were not rendering it.

This made an apz mochitest with hardcoded heights to fail on macOS.

It also perturbed browser_html_scroll_restoration.js in a way such as
the scroll position after a resize is rounded in a different direction,
but that is harmless.

Depends on D166431

Differential Revision: https://phabricator.services.mozilla.com/D167027
2023-01-26 11:19:16 +00:00
Razvan Cojocaru d8e9d2a141 Bug 1746126 - Allow controlling zoom-to-focused-input behaviour using `touch-action`. r=botond
Rename AllowedTouchBehavior::DOUBLE_TAP_ZOOM to ANIMATING_ZOOM, and
CompositorHitTestFlags::eTouchActionDoubleTapZoomDisabled to
eTouchActionAnimatingZoomDisabled while at it.

Differential Revision: https://phabricator.services.mozilla.com/D167522
2023-01-26 01:07:58 +00:00
Hiroyuki Ikezoe 63b11934d6 Bug 1811871 - Check collapsed attribute rather than computed opacity value to tell whether which navigation ison is currently visible. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D167740
2023-01-25 21:03:55 +00:00
Erich Gubler eec73ccfa8 Bug 1812260: build(snap): re-apply forgotten `cmath` include in ANGLE codegen (sorry!) r=jgilbert,gfx-reviewers,nical
Re-apply D156577, which was forgotten in our recent rebase of ANGLE (orig. performed at 06d250c819ee
and 94699211d97b).

Differential Revision: https://phabricator.services.mozilla.com/D167815
2023-01-25 19:45:10 +00:00
Emilio Cobos Álvarez af31750cc0 Bug 1775062 - Fix various using statements to use properly qualified names. r=nika,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D167710
2023-01-25 10:52:10 +00:00
Jamie Nicol 5c4015fd4f Bug 1811929 - Fix JNI crash caused by passing incorrect jobject type. r=gfx-reviewers,nical
The function ANativeWindow_fromSurface() takes a jobject that is
supposed to be a Surface. Prior to bug 1706656 GeckoSurface was a
subclass of Surface, meaning we passed the correct type. However,
GeckoSurface no longer derives from Surface meaning we hit this JNI
crash.

To fix this, call GeckoSurface->GetSurface() to get the underlying
Surface object.

Note that this code path is only active if the user has modified the
pref gfx.use-surfacetexture-textures. So although the volume is high,
it appears to be limited to a small number of users.

Differential Revision: https://phabricator.services.mozilla.com/D167659
2023-01-24 15:31:31 +00:00
Jonathan Kew b9dbd7a04b Bug 1803154 - Back out changeset c1b0ce76a51b (bug 1801512) because it seems to have made things worse for a number of users. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D167615
2023-01-24 10:03:49 +00:00
Nicolas Silva 03eaaeceaf Bug 1811284 - Update wgpu to 24a904256e225b20b11fb30f914ef53212a2909e. r=webgpu-reviewers,ErichDonGubler,jimb
Differential Revision: https://phabricator.services.mozilla.com/D167276
2023-01-24 09:24:03 +00:00
sotaro 53393b26d4 Bug 1811160 - Disable out-of-process WebGL and accelerated canvas when GPU process does not exists on android r=gfx-reviewers,lsalzman
On Android, GPU process exists by default. When GPU process does not exist, an error should disable GPU process.

On Android, WebGL handling process could easily crash. The crash could trigger disable GPU process. Current out-of-process WebGL implementation creates WebGLParent in parent process. Then a crash in parent process could be triggered by WebGL. Then it seems better to disable out-of-process WebGL when GPU process does not exist.

And it seems also better to disable accelerated canvas, since it uses WebGL for acceleration.

Differential Revision: https://phabricator.services.mozilla.com/D167512
2023-01-24 06:05:13 +00:00
Emilio Cobos Álvarez 9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
Csoregi Natalia f822f99642 Backed out 6 changesets (bug 1799258) for failures on gfx.color_management.display_profile. CLOSED TREE
Backed out changeset 22351f36b74b (bug 1799258)
Backed out changeset 9bbbe3ed2794 (bug 1799258)
Backed out changeset e05c809f58d0 (bug 1799258)
Backed out changeset 791eeb52f034 (bug 1799258)
Backed out changeset 353ef4721bba (bug 1799258)
Backed out changeset b5157d950aa7 (bug 1799258)
2023-01-24 02:08:51 +02:00
Kelsey Gilbert 3a068f509a Bug 1799258 - Support outByIn.size()<2 in SampleOutByIn. r=bradwerth
This makes it easier to apply transform functions, even when they are
not defined/present.

Differential Revision: https://phabricator.services.mozilla.com/D167472
2023-01-23 22:13:18 +00:00
Kelsey Gilbert d27ed44f80 Bug 1799258 - No-op equal tfs rather than inverting. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D167471
2023-01-23 22:13:17 +00:00
Kelsey Gilbert 9e2d016bd4 Bug 1799258 - Do color-management on Windows+DComp via IDCompositionFilterEffects. r=sotaro
+ Add gfx.color_management.rec709_gamma_as_srgb:true. :'(

In particular, rec709(16/255) -> srgb(31/255). Even though it's
technically correct, it's practically-speaking incorrect, since that's
not what Chrome does, nor what the web expected for years and years.

In practice, basically everyone expects gamma to just be completely
ignored.

What people expect:
* Pretend gamut is srgb(==rec709), but stretch this naively for the
  display. If you have a display-p3-gamut display, srgb:0.5 expects to
  be displayed as display:0.5, which will be display-p3:0.5 to the eyes.
* Pretend all content gammas (TFs) are srgb(!=rec790), and then bitcast this
  naively for the display. E.g. rec709(16/255) should
  display the same as srgb(16/255), not srgb(31/255). (Note: display-p3
  uses srgb gamma) But if your display has e.g. gamma=3.0, don't
  convert or compensate.

This is a formalization of what you get when you spend decades ignoring
color management, and people build things based on behavior-in-practice,
not behavior-in-theory.

Also:
+ gfx.color_management.native_srgb:true for Windows, so we don't use the
  display color profile, which no one else does.
+ Add rec2020_gamma_as_rec709, so we have a path towards maybe having
  rec2020 use its correct transfer function, rather than srgb (like
  rec709).

Differential Revision: https://phabricator.services.mozilla.com/D161857
2023-01-23 22:13:17 +00:00
Kelsey Gilbert 70f8fd53cc Bug 1799258 - Add prereq Colorspaces stuff, including generic gamma->linear LUT inversion approximation. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D163664
2023-01-23 22:13:16 +00:00
Kelsey Gilbert 4d0c2f5f61 Bug 1799258 - [qcms] Add query for profile data and lut tables. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D163663
2023-01-23 22:13:16 +00:00
Razvan Cojocaru 82845f5773 No bug - Remove superfluous semicolon. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D167587
2023-01-23 19:56:01 +00:00
Mark Banner 60852a03b7 Bug 1811797 - Make Troubleshoot.snapshot an async function, rather than using a callback. r=mossop,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D167516
2023-01-23 18:09:02 +00:00
Hiroyuki Ikezoe c5eeb9f4fc Bug 1811403 - Respect "apz.disable_for_scroll_linked_effects" pref whether to set HasScrollLinkedEffect flag. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D167337
2023-01-22 21:09:40 +00:00
Chris H-C af3328afcc Bug 1765921 - Rename `fog` crate to `firefox-on-glean` r=TravisLong,supply-chain-reviewers
This matches the empty-and-published-to-crates.io crate, which should allow for
easier optional dependencies in Rust.

Differential Revision: https://phabricator.services.mozilla.com/D165317
2023-01-20 23:14:03 +00:00
Emilio Cobos Álvarez 90e1d8d837 Bug 1809126 - Remove moz-fonttable protocol. r=jfkthame,necko-reviewers
We only use it to generate a dummy URI for SVG-in-Opentype documents. We
don't really need the URIs to be unique or anything in practice.

I noticed this code while looking at the load flags set up for
bug 1809006.

Differential Revision: https://phabricator.services.mozilla.com/D166291
2023-01-20 18:41:16 +00:00
Jonathan Kew f17f8c8ec4 Bug 1811471 - Merge Hiragana and Katakana scripts for text-shaping purposes, to allow kerning across both alphabets. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167402
2023-01-20 18:26:29 +00:00
Nicolas Silva db956b65c9 Bug 1810495 - Update wgpu to fac4731288117d951d0944d96cf0b00fa006dd6c. r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D166916
2023-01-20 15:39:41 +00:00
Jan-Erik Rediger 012cbbbda2 Bug 1808586 - Upgrade to Glean v52.0.1 r=chutten,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167247
2023-01-20 12:58:07 +00:00
Butkovits Atila d9180d2428 Backed out 2 changesets (bug 1811218, bug 1808586) for causing build bustages complaining about Cargo and Glean. CLOSED TREE
Backed out changeset 94f6ca4f4103 (bug 1808586)
Backed out changeset 046b4eafd1b3 (bug 1811218)
2023-01-20 12:57:03 +02:00
Jan-Erik Rediger 2fab98bc22 Bug 1808586 - Upgrade to Glean v52.0.1 r=chutten,supply-chain-reviewers
Depends on D167245

Differential Revision: https://phabricator.services.mozilla.com/D167247
2023-01-20 09:28:30 +00:00
Butkovits Atila 6970213e8e Backed out 2 changesets (bug 1811218, bug 1808586) for causing build bustages. CLOSED TREE
Backed out changeset 076e5dd4ec05 (bug 1808586)
Backed out changeset 46676e77e0b8 (bug 1811218)
2023-01-20 12:15:42 +02:00
Jan-Erik Rediger f394193fc2 Bug 1808586 - Upgrade to Glean v52.0.1 r=chutten,supply-chain-reviewers
Depends on D167245

Differential Revision: https://phabricator.services.mozilla.com/D167247
2023-01-20 09:28:30 +00:00
Erich Gubler df566e3d3d Bug 1753349 (9/9): chore: update ANGLE to our fork's `firefox-111` branch r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D162655
2023-01-19 21:41:15 +00:00
Erich Gubler c49956c1f2 Bug 1753349 (8/9): build(gfx): update ANGLE vendoring config. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D164254
2023-01-19 21:41:15 +00:00
Hiroyuki Ikezoe 73dd945ce0 Bug 1810819 - Add NativePanHandlerForHeadless. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D167111
2023-01-19 21:07:44 +00:00
Marian-Vasile Laza ea060cc229 Backed out changeset b4dba80235dc (bug 1765921) for causing WR bustages. 2023-01-19 22:17:14 +02:00
Chris H-C 76c4c1615c Bug 1765921 - Rename `fog` crate to `firefox-on-glean` r=TravisLong,supply-chain-reviewers
This matches the empty-and-published-to-crates.io crate, which should allow for
easier optional dependencies in Rust.

Differential Revision: https://phabricator.services.mozilla.com/D165317
2023-01-19 19:55:24 +00:00
Nicolas Silva cf4d36e34d Bug 1809855 - Extract the composite shaders into another struct. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D166684
2023-01-19 15:40:50 +00:00
Nicolas Silva 6c395ff797 Bug 1808549 - Pass the WR device to Compositor methods. r=gfx-reviewers,lsalzman
This will be needed by the draw compositor which can't own the device renderer's device but needs to use it. Other implementations can just ignore the parameter.

Differential Revision: https://phabricator.services.mozilla.com/D165958
2023-01-19 15:40:50 +00:00
Nicolas Silva 434d96b95e Bug 1804920 - Stop passing tile z-index to the composite shader. r=gw
It was used for occlusion culling with the z-buffer, but we moved away from using the depth buffer in the draw compositor.

Depends on D165141

Differential Revision: https://phabricator.services.mozilla.com/D165142
2023-01-19 15:40:49 +00:00
Nicolas Silva 255a5b7c14 Bug 1804914 - Represent compositor transforms using scale-offsets instead of 4x4 matrices. r=gw
The draw compositor's occlusion culling optimization relies on the transforms preserving axis alignment.

Differential Revision: https://phabricator.services.mozilla.com/D165141
2023-01-19 15:40:49 +00:00
Dan Robertson 23e95c107a Bug 1808833 - Fix overscroll handoff warning condition. r=botond
Now that fixed position content will have the mScrollParentId set to the
null scroll parent id, the warning posted for non-root APZC's overscrolled
with a null scroll parent id should not fire for APZCs with a fixed
position parent.

Differential Revision: https://phabricator.services.mozilla.com/D166445
2023-01-19 13:36:45 +00:00
Dan Robertson 4fbf0efd95 Bug 1809574 - Use hit-testing tree to determine fixed position handoff. r=botond
Use the hit-testing tree to determine the APZC to handoff overscroll to
if the current APZC is in a fixed position subtree.

Differential Revision: https://phabricator.services.mozilla.com/D166787
2023-01-19 13:36:44 +00:00
sotaro 0bb743f94a Bug 1811170 - Make GpuProcessTextureId strongly-typed r=gfx-reviewers,lsalzman
uint64_t is used for GpuProcessTextureId. It should be strongly-typed.

Differential Revision: https://phabricator.services.mozilla.com/D167224
2023-01-19 08:19:28 +00:00
Erich Gubler 0b017316a8 Bug 1753349 (7/9): refactor(gfx): stop using `LOCAL_EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE` r=jgilbert,gfx-reviewers
Now that we're using `EGL_KHR_no_config_context`, this attribute request is no longer necessary.
Even worse, support for it already been removed by upstream ANGLE. So, let's remove it before we try
to upgrade ANGLE.

Differential Revision: https://phabricator.services.mozilla.com/D167038
2023-01-19 04:47:53 +00:00
Erich Gubler efa9189ed6 Bug 1753349 (6/9): fix: increase `CanvasRendererThread` stack size to 4k r=jgilbert,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167037
2023-01-19 04:47:53 +00:00
Erich Gubler ccf8167019 Bug 1753349 (5/9): docs: align `update-angle.py` instructions to actual usage r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D164253
2023-01-19 04:47:52 +00:00
Erich Gubler d6a6a3a83d Bug 1753349 (4/9): refactor: rename `CreateEGLPBufferOffscreenContext` to `CreateWithoutSurface` r=jgilbert
This was interesting enough that @jgilbert wanted this, so I'm including this for completeness in
the current patch stack.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166709
2023-01-19 04:47:52 +00:00
Erich Gubler 63eead4dae Bug 1753349 (3/9): feat(gfx): use `EGL_KHR_no_config_context` in `CreateEGLPBufferOffscreenContext` r=jgilbert
When available, we should use the [`EGL_KHR_no_config_context` extension] inside of
`GLContextEGL::CreateEGLPBufferOffscreenContext`. The usage of this extension will be necessary to
accommodate incoming upstream changes in ANGLE, which have [migrated away][incoming-breakage] from
[our usage of `EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE` in
`gfx/webrender_bindings/RenderCompositorANGLE.cpp`][what-will-be-broken] in favor of this standard
extension. Luckily it's forwards-compatible to start consuming it now!

This revision changes a few things that are linked:

- Separate assignment and usage of a surface context from that of a context.
- Rename `GLContextEGL::mConfig` to `mSurfaceConfig` to better reflect its usage; it's only ever
  used to create surfaces, not contexts.

Split out from @jgilbert's D164308 and D164309.

[`EGL_KHR_no_config_context` extension]: https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_no_config_context.txt
[incoming-breakage]: ad8e4d99a9
[what-will-be-broken]: https://searchfox.org/mozilla-central/rev/b19830c6b22f73758862d34d2c64f57735890e90/gfx/webrender_bindings/RenderCompositorANGLE.cpp#668

Differential Revision: https://phabricator.services.mozilla.com/D166708
2023-01-19 04:47:52 +00:00
Erich Gubler 5ae49e0bf7 Bug 1753349 (2/9): refactor: inline `size` argument to `GLContextEGL::CreateEGLPBufferOffscreenContext` r=jgilbert
This is basically an implementation detail that the existing callers doesn't really need to know.
Factor it out.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166707
2023-01-19 04:47:51 +00:00
Erich Gubler 2d888dbae4 Bug 1753349 (1/9): refactor: inline `GLContextEGL::CreateEGLPBufferOffscreenContext` into `WithUseGles` closure r=jgilbert
This lets us omit implementation details in a header, and avoid needing to pass some arguments when
only the decision to try using GLES changes.

Split out from @jgilbert's [D164308].

[D164308]: https://phabricator.services.mozilla.com/D164308

Differential Revision: https://phabricator.services.mozilla.com/D166706
2023-01-19 04:47:51 +00:00
Iulian Moraru f2db3a5e51 Backed out 2 changesets (bug 1810495) for causing rust linting failures.
Backed out changeset 8e353f0600a8 (bug 1810495)
Backed out changeset d75d527cdeee (bug 1810495)
2023-01-19 00:27:26 +02:00
Nicolas Silva 32ec025d52 Bug 1810495 - Update wgpu to fac4731288117d951d0944d96cf0b00fa006dd6c. r=webgpu-reviewers,teoxoy
Depends on D166915

Differential Revision: https://phabricator.services.mozilla.com/D166916
2023-01-18 21:58:49 +00:00
Stanca Serban cee760ed88 Backed out 9 changesets (bug 1753349) for causing failures in PoolAlloc.cpp. CLOSED TREE
Backed out changeset 84a5f26fe60b (bug 1753349)
Backed out changeset 28e0175becf4 (bug 1753349)
Backed out changeset 0ffcaedc8046 (bug 1753349)
Backed out changeset 2043cc15deec (bug 1753349)
Backed out changeset 556557955d59 (bug 1753349)
Backed out changeset cbb9e6545343 (bug 1753349)
Backed out changeset bed90cd9beb6 (bug 1753349)
Backed out changeset 1b71f995ae95 (bug 1753349)
Backed out changeset 1ad75c8ea7a4 (bug 1753349)
2023-01-18 23:58:22 +02:00
Erich Gubler d934469aa7 Bug 1753349 (9/9): chore: update ANGLE to our fork's `firefox-111` branch r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D162655
2023-01-18 20:56:12 +00:00
Erich Gubler 3985556010 Bug 1753349 (8/9): build(gfx): update ANGLE vendoring config. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D164254
2023-01-18 20:56:11 +00:00
Erich Gubler 70700785eb Bug 1753349 (7/9): refactor(gfx): stop using `LOCAL_EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE` r=jgilbert,gfx-reviewers
Now that we're using `EGL_KHR_no_config_context`, this attribute request is no longer necessary.
Even worse, support for it already been removed by upstream ANGLE. So, let's remove it before we try
to upgrade ANGLE.

Differential Revision: https://phabricator.services.mozilla.com/D167038
2023-01-18 20:56:11 +00:00
Erich Gubler 03452bbfc6 Bug 1753349 (6/9): fix: increase `CanvasRendererThread` stack size to 4k r=jgilbert,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167037
2023-01-18 20:56:10 +00:00
Erich Gubler 9c0aa59be5 Bug 1753349 (5/9): docs: align `update-angle.py` instructions to actual usage r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D164253
2023-01-18 20:56:10 +00:00
Erich Gubler d420b3bbab Bug 1753349 (4/9): refactor: rename `CreateEGLPBufferOffscreenContext` to `CreateWithoutSurface` r=jgilbert
This was interesting enough that @jgilbert wanted this, so I'm including this for completeness in
the current patch stack.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166709
2023-01-18 20:56:10 +00:00
Erich Gubler cea0bdd332 Bug 1753349 (3/9): feat(gfx): use `EGL_KHR_no_config_context` in `CreateEGLPBufferOffscreenContext` r=jgilbert
When available, we should use the [`EGL_KHR_no_config_context` extension] inside of
`GLContextEGL::CreateEGLPBufferOffscreenContext`. The usage of this extension will be necessary to
accommodate incoming upstream changes in ANGLE, which have [migrated away][incoming-breakage] from
[our usage of `EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE` in
`gfx/webrender_bindings/RenderCompositorANGLE.cpp`][what-will-be-broken] in favor of this standard
extension. Luckily it's forwards-compatible to start consuming it now!

This revision changes a few things that are linked:

- Separate assignment and usage of a surface context from that of a context.
- Rename `GLContextEGL::mConfig` to `mSurfaceConfig` to better reflect its usage; it's only ever
  used to create surfaces, not contexts.

Split out from @jgilbert's D164308 and D164309.

[`EGL_KHR_no_config_context` extension]: https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_no_config_context.txt
[incoming-breakage]: ad8e4d99a9
[what-will-be-broken]: https://searchfox.org/mozilla-central/rev/b19830c6b22f73758862d34d2c64f57735890e90/gfx/webrender_bindings/RenderCompositorANGLE.cpp#668

Differential Revision: https://phabricator.services.mozilla.com/D166708
2023-01-18 20:56:09 +00:00
Erich Gubler 80acad2332 Bug 1753349 (2/9): refactor: inline `size` argument to `GLContextEGL::CreateEGLPBufferOffscreenContext` r=jgilbert
This is basically an implementation detail that the existing callers doesn't really need to know.
Factor it out.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166707
2023-01-18 20:56:09 +00:00
Erich Gubler 521c62bbe5 Bug 1753349 (1/9): refactor: inline `GLContextEGL::CreateEGLPBufferOffscreenContext` into `WithUseGles` closure r=jgilbert
This lets us omit implementation details in a header, and avoid needing to pass some arguments when
only the decision to try using GLES changes.

Split out from @jgilbert's [D164308].

[D164308]: https://phabricator.services.mozilla.com/D164308

Differential Revision: https://phabricator.services.mozilla.com/D166706
2023-01-18 20:56:08 +00:00
Jonathan Kew f956fb8c4d Bug 1810815 - Properly account for cases where CSS units ch or ic are based on a different font than the first, due to character coverage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167070
2023-01-18 14:22:11 +00:00
Jonathan Kew d52edfa6ad Bug 1470075 - Use the proper vertical-advance of the <zero> glyph when setting up vertical-mode font metrics. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167035
2023-01-18 10:00:11 +00:00
Jonathan Kew d2868f8c9e Bug 1810709 - Make GetFirstValidFont() check whether the required character is supported by the font. r=emilio
Except in the case of <space>, which is not required to be present for the font to be used
as the "first available font" in CSS (https://drafts.csswg.org/css-fonts-4/#first-available-font);
for that, only unicode-range coverage is applicable.

Differential Revision: https://phabricator.services.mozilla.com/D167006
2023-01-18 09:58:59 +00:00
Lee Salzman 5293b6100a Bug 1789449 - Adjust clamp order. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D166759
2023-01-18 05:32:38 +00:00
Jim Blandy cd4137f9be Bug 1808985: Check for force-enabled WebGPU in the proper order. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D166856
2023-01-18 00:16:31 +00:00
Robert Longson 9fba7e0126 Bug 1808102 - Move contextPaint to Document class r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D165763
2023-01-17 19:13:41 +00:00
Jamie Nicol 04d1292832 Bug 1706656 - Avoid creating SurfaceTextures in isolated content processes on old android versions. r=geckoview-reviewers,ohall
Due to a bug on versions of Android prior to 8.0, attempting to create
a SurfaceTexture from an isolated process results in an infinite
hang. We must therefore avoid doing this.

We currently create a dummy SurfaceTexture in order to call the
Surface constructor when instantiating a GeckoSurface from a
Parcel. This patch avoids this by making GeckoSurface own a Surface
rather than inherit from one.

Additionally, for every Surface allocated we create a corresponding
"sync" SurfaceTexture in the content processes. This is used when the
texture data is required in the content process, eg using video as a
WebGL texture upload source. This patch prevents us allocating such
SurfaceTextures. If out-of-process WebGL is enabled, video data can
still be used as a texture upload source as WebGL resides in the GPU
process. However, if out-of-process WebGL is disabled the texture
upload will fail.

Prior to shipping isolated content processes on affected Android
versions, we must therefore ensure we have an alternative solution to
using video as a WebGL texture upload source, or that out-of-process
WebGL can be relied upon.

Differential Revision: https://phabricator.services.mozilla.com/D165970
2023-01-17 18:54:25 +00:00
Marian-Vasile Laza 0b87861aca Backed out changeset 9759c11fa52f (bug 1706656) for causing gv-junit geckoview failures. CLOSED TREE 2023-01-17 14:55:04 +02:00
Jamie Nicol 619dc044f1 Bug 1706656 - Avoid creating SurfaceTextures in isolated content processes on old android versions. r=geckoview-reviewers,ohall
Due to a bug on versions of Android prior to 8.0, attempting to create
a SurfaceTexture from an isolated process results in an infinite
hang. We must therefore avoid doing this.

We currently create a dummy SurfaceTexture in order to call the
Surface constructor when instantiating a GeckoSurface from a
Parcel. This patch avoids this by making GeckoSurface own a Surface
rather than inherit from one.

Additionally, for every Surface allocated we create a corresponding
"sync" SurfaceTexture in the content processes. This is used when the
texture data is required in the content process, eg using video as a
WebGL texture upload source. This patch prevents us allocating such
SurfaceTextures. If out-of-process WebGL is enabled, video data can
still be used as a texture upload source as WebGL resides in the GPU
process. However, if out-of-process WebGL is disabled the texture
upload will fail.

Prior to shipping isolated content processes on affected Android
versions, we must therefore ensure we have an alternative solution to
using video as a WebGL texture upload source, or that out-of-process
WebGL can be relied upon.

Differential Revision: https://phabricator.services.mozilla.com/D165970
2023-01-17 11:40:16 +00:00
Nika Layzell 9d6bb19c23 Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 852d02ec16 Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Nika Layzell 59be033e1c Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Hiroyuki Ikezoe e1a19a45f3 Bug 1796942 - Restore overscrolling gutters on the previous target APZC when we change it to the new target. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D166398
2023-01-17 02:29:45 +00:00
sotaro b030ecd699 Bug 1808818 - Remove assert in RemoteTextureHostWrapper::CheckIsReadyForRendering() r=gfx-reviewers,lsalzman
RemoteTextureMap::GetRemoteTextureForDisplayList() has enough asserts. The assert in RemoteTextureHostWrapper::CheckIsReadyForRendering() could  be removed.

Differential Revision: https://phabricator.services.mozilla.com/D166886
2023-01-17 00:29:44 +00:00
Sandor Molnar 41b78439d0 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell f7772bb6ae Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 8d118308de Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Nika Layzell f410f28a30 Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Hiroyuki Ikezoe fe1a1cef01 Bug 1805022 - Do round_out() surface_rect before translating in <CompositeState>::get_surface_rect. r=gw
For example, given that
  `surface_rect`: `Box2D((0.0, -1.04904175e-5), (588.99994, 0.0))`
  `surface bound`: Box2D((0.0, -512.0), (1024.0, 0.0))

Then doing round_out() after translating the surface_rect with
`-surface_bounds.min.to_vector()` results an empty rect.

We need to make sure that negative origin `surface_rect` is not collapssed.

Differential Revision: https://phabricator.services.mozilla.com/D166887
2023-01-16 21:15:46 +00:00
Chris H-C 8f0cfe819b Bug 1805427 - Update Glean to 52.0.0 r=glandium,janerik,webdriver-reviewers,supply-chain-reviewers
Depends on D164603

Differential Revision: https://phabricator.services.mozilla.com/D164604
2023-01-16 18:51:18 +00:00
Jonathan Kew 154e6b9926 Bug 1810310 - When letter-spacing is present, disable all varieties of 'optional' ligatures, not only 'common' ones. r=emilio
This fixes behavior on css/css-fonts/font-feature-resolution-002.html.

Differential Revision: https://phabricator.services.mozilla.com/D166865
2023-01-16 00:18:19 +00:00
Hiroyuki Ikezoe d84e6c922f Bug 1776056 - Switch to the tab an animation is running and make sure the animation is running on the compositor. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D166745
2023-01-15 21:07:17 +00:00
Razvan Cojocaru f8444320ee Bug 1746126 - Add zoom-to-focused-input mochitests for user-scalable={yes,no}. r=botond
Also rename helper_zoomToFocusedInput_nozoom.html to
helper_zoomToFocusedInput_nozoom_bug1738696.html, since it
appears to test behaviour specific to bug 1738696.

Differential Revision: https://phabricator.services.mozilla.com/D166837
2023-01-14 19:27:58 +00:00
Jonathan Kew 0982b95580 Bug 1809081 - Pass overall glyph bounds into COLRv1 paint methods if available, to avoid the need for on-the-fly bounding box computation in PaintComposite. r=gfx-reviewers,lsalzman
This shouldn't change visible behavior, but it makes painting glyphs
that have many layers under a PaintComposite operation -- some of the
Noto flag glyphs have hundreds of layers! -- substantially faster by
avoiding the need to explicitly walk the paint graph to determine the
temporary surface bounds.

On my local Windows build, this reduces the "jank" of first-time
switching to the flags page of the example from 2400ms to around 900ms;
still a bit sluggish but greatly improved. Subsequently switching away
from and back to the flags, the jank reduces to around 110ms.

(Interestingly, the perf issue here seems to be much worse on Windows
than on macOS or Linux; apparently getting glyph paths via DirectWrite
is more expensive than on the other platforms.)

Differential Revision: https://phabricator.services.mozilla.com/D166782
2023-01-13 18:40:06 +00:00
Lee Salzman 99f581c266 Bug 1807988 - Only set BPP and stride when allocation succeeds. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D166702
2023-01-13 03:50:56 +00:00
Brad Werth ad91b3dfb5 Bug 1798545: Emit low power telemetry less frequently during testing. r=alwu
Ideally, this pref wouldn't be exposed to users at all, because if a user
changes the value, it will cause our telemetry to be over or under sampled
for that user. That's a small risk to take since most users don't change
pref values.

Differential Revision: https://phabricator.services.mozilla.com/D160963
2023-01-12 23:57:46 +00:00
Butkovits Atila 4d039326c3 Backed out changeset 8632fb362202 (bug 1807988) for causing failures at object-fit-contain-png. CLOSED TREE 2023-01-13 02:00:41 +02:00
Lee Salzman 5092f78230 Bug 1807988 - Only set BPP and stride when allocation succeeds. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D166702
2023-01-12 22:27:30 +00:00
Norisz Fay 298fa45dea Backed out changeset 29c0edec2063 (bug 1807988) for causing build bustages CLOSED TREE 2023-01-13 00:16:24 +02:00
Lee Salzman 4de8903900 Bug 1807988 - Only set BPP and stride when allocation succeeds. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D166702
2023-01-12 21:32:45 +00:00
sotaro a1c8695d13 Bug 1809768 - Remove pref webgl.force-layers-readback r=gfx-reviewers,lsalzman
pref webgl.force-layers-readback is not used by gecko.

Differential Revision: https://phabricator.services.mozilla.com/D166618
2023-01-12 04:40:17 +00:00
sotaro 44518c888e Bug 1808818 - Add RemoteTextureOwnerClient::PushDummyTexture() for handling remote texture allocation failure r=gfx-reviewers,lsalzman
Push dummy texture when remote texture allocation is failed.

Differential Revision: https://phabricator.services.mozilla.com/D166516
2023-01-11 22:23:01 +00:00
Lee Salzman fb9a504ca7 Bug 1806932 - Destroy GradientCacheData on main thread. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D166417
2023-01-10 17:07:28 +00:00
sotaro 190eddef10 Bug 1808878 - Fix aYInvert of GLReadTexImageHelper::ReadTexImage() in RenderAndroidSurfaceTextureHost::ReadTexImage() r=gfx-reviewers,lsalzman
GLReadTexImageHelper::ReadTexImage() in RenderAndroidSurfaceTextureHost::ReadTexImage() needs to take care of gl::OriginPos.

Differential Revision: https://phabricator.services.mozilla.com/D166406
2023-01-10 05:33:58 +00:00
Erich Gubler 88b452f2a7 Bug 1809216: add missing refcount increment for `GLBlitHelperD3D::mD3D11` in `GLBlitHelperD3D::getD3D11` r=jgilbert,jrmuizel,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D166385
2023-01-09 21:31:02 +00:00
Alex Jakobi ae78729ca3 Bug 1804597 - Remove HasReceivedAllContentNotifications and overrides. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D166333
2023-01-09 21:02:10 +00:00
Jeff Muizelaar d8212052f2 Bug 1809154. Silently fail to read convert unsupported transfer functions instead of crashing. r=gfx-reviewers,jnicol
This isn't great but I'm pretty sure it's better than crashing.

Differential Revision: https://phabricator.services.mozilla.com/D166338
2023-01-09 19:08:12 +00:00
Iulian Moraru e558b2520c Bug 1776056 - disable browser_omta_tearoff_tab.js on linux for frequent failures. r=#intermittent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D166258
2023-01-08 18:30:04 +00:00
Jonathan Kew 7e0768e157 Bug 1803999 - Fix incorrect glyph advance conversion when setting up the 'ic' unit in GetVerticalMetrics. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D166246
2023-01-07 15:39:31 +00:00
sotaro 398eea13e2 Bug 1808840 - Fix non-single buffer mode SurfaceTexture handling of RenderAndroidSurfaceTextureHost with WebRender(Software OpenGL) r=gfx-reviewers,lsalzman,jnicol
On Android Emulator, multi buffer mode SurfaceTexture is used for WebGL gl::SharedSurface.

When SurfaceTexture is not single buffer mode, RenderAndroidSurfaceTextureHost does not call mSurfTex->UpdateTexImage() during rendering with WebRender(Software OpenGL).

Differential Revision: https://phabricator.services.mozilla.com/D166132
2023-01-07 07:08:36 +00:00
Joel Maher a86bf4d953 Bug 1808642 - adjust reftest expectations for windows 11. jfkthame r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D166205
2023-01-06 19:25:29 +00:00
Iulian Moraru 651978900d Backed out changeset 397c9cd6a5e3 (bug 1808840) for causing wr failures on imageBitmapRendering-transferFromImageBitmap-webgl.html. 2023-01-06 19:15:19 +02:00
sotaro 5df2cd1b0b Bug 1808840 - Fix non-single buffer mode SurfaceTexture handling of RenderAndroidSurfaceTextureHost with WebRender(Software OpenGL) r=gfx-reviewers,lsalzman,jnicol
On Android Emulator, multi buffer mode SurfaceTexture is used for WebGL gl::SharedSurface.

When SurfaceTexture is not single buffer mode, RenderAndroidSurfaceTextureHost does not call mSurfTex->UpdateTexImage() during rendering with WebRender(Software OpenGL).

Differential Revision: https://phabricator.services.mozilla.com/D166132
2023-01-06 10:45:00 +00:00
Lee Salzman 1b57b0ca9f Bug 1808733 - Check for null TextureData. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D166093
2023-01-05 17:45:48 +00:00
sotaro b6776d53b6 Bug 1808644 - Modify RemoteTextureMap as to reuse gl::SharedSurfaces by using a queue r=gfx-reviewers,lsalzman
On Android emulator, android fence sync is not supported. It caused the problem. Current RemoteTextureMap re-use gl::SharedSurface as stack. It seemed to cause the problem. If the recycling is done as queue, timing of it's recycling can be delayed.

By using queue, recycling of gl::SharedSurface works same as to non-RemoteTextureMap.

Differential Revision: https://phabricator.services.mozilla.com/D166018
2023-01-05 05:47:15 +00:00
Jonathan Kew 0ef2fbbdc6 Bug 1529794 - Protect DirectWrite usage in gfxDWriteFontList::CreateFontEntry with an exception handler. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D165944
2023-01-04 18:26:21 +00:00
Nicolas Silva 7b36cb3adb Bug 1808331 - Update wgpu. r=#webgpu-reviewers CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D165962
2023-01-04 16:22:30 +00:00
Stanca Serban d46c924b0b Backed out changeset e0a5ed021a2c (bug 1808331) for causing linting failures. 2023-01-04 18:36:53 +02:00
Nicolas Silva 8db661cfd8 Bug 1808331 - Update wgpu. r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D165869
2023-01-04 13:19:44 +00:00
Timothy Nikkel 88260ff702 Bug 1808062. Include stackingcontext helper scale when looking at size of items to determine if they should be active. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D165755
2023-01-04 10:57:47 +00:00
Boris Chiou 38556e307d Bug 1807685 - Rename scroll-linked (animations) to scroll-driven (excluding WPT tests). r=dholbert
The spec is still using `Scroll-linked`, so we exclude the change of WPT tests.
I believe WPT will get updates once the spec doc is renamed.

Differential Revision: https://phabricator.services.mozilla.com/D165914
2023-01-04 00:50:45 +00:00
Sylvestre Ledru 11543ba854 Bug 1802290 - Remove +x permissions on more files r=linter-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D165841
2023-01-03 08:17:50 +00:00
Olli Pettay 5d21de32ac Bug 1807812 - Remove WidgetEventTime::mTime, r=masayuki,geckoview-reviewers,m_kato
HTMLSelectEventListener changes are needed, since currently that code works somewhat by accident given that
mTime often contains totally bogus values, like PR_IntervalNow(). Those changes then reveal issues also in
browser_editAddressDialog.js.

Differential Revision: https://phabricator.services.mozilla.com/D165618
2023-01-02 12:31:40 +00:00
Jeff Muizelaar f24503d2f5 Bug 1808099 - Make wr_glyph_rasterizer's glean dependency optional. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D165762
2023-01-01 00:46:16 +00:00
Timothy Nikkel 76d7c07c5f Bug 1807659. Wait for a refresh driver tick in gfx/layers/apz/test/mochitest/helper_zoom_keyboardscroll.html after all actions. r=botond
Didn't investigate why this was failing exactly, but promiseApzFlushedRepaints does not wait for a refresh driver tick and I remember from fixing some other scrolling tests a while back that sometimes you need to wait for a refresh driver tick for things to be completed (don't remember the details).

Differential Revision: https://phabricator.services.mozilla.com/D165546
2022-12-28 01:19:37 +00:00
Dan Robertson 7dac5c1755 Bug 1379458 - Add test group for overscroll handoff. r=botond
- Add tests for overscroll handoff from a fixed position element
 - Add test for overscroll handoff from a sticky position element

Differential Revision: https://phabricator.services.mozilla.com/D148662
2022-12-27 14:08:50 +00:00
Jonathan Kew 7a685d54d2 Bug 1485425 - Add MOZ_SEH_TRY/EXCEPT guards around more DWrite API calls that might throw exceptions. r=lsalzman
A few of the crashes here are happening via other codepaths, so we should protect those as well.

None of this changes any behavior except in the case where a disk error or similar failure happens
within DWrite calls; the goal here is to handle such failures safely, just treating the affected
font as unusable and allowing us to fall back to something else rather than crash.

Depends on D165524

Differential Revision: https://phabricator.services.mozilla.com/D165525
2022-12-27 09:32:48 +00:00
Jonathan Kew 9e39fa1a22 Bug 1485425 - Protect more DWrite API usage in gfxDWriteFontList::ReadFaceNamesForFamily with MOZ_SEH_TRY/EXCEPT. r=lsalzman
The majority of the crashes I looked at here are happening under ReadFaceNamesForFamily.
We already have an SEH guard aronud part of the method, but it doesn't cover all the potentially
problematic DWrite calls, so this patch moves more of the code inside the try/except block
to attempt to handle exceptions safely.x

Differential Revision: https://phabricator.services.mozilla.com/D165524
2022-12-27 09:32:48 +00:00
Zach Hoffman 51355ff920 Bug 1422237 - Implement the color-gamut media feature r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D165385
2022-12-26 22:49:46 +00:00
Marco Castelluccio f69e697461 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
sotaro 954c16acec Bug 1805209 - Use RemoteTexture for WebGPU r=gfx-reviewers,lsalzman
WebGPU uses CompositableInProcessManager to push TextureHost directly from WebGPUParent to WebRender. But CompositableInProcessManager plumbing has a problem and caused Bug 1805209.

gecko already has a similar mechanism, called RemoteTextureMap. It is used in oop WebGL. If WebGPU uses RemoteTextureMap instead of CompositableInProcessManager, both WebGPU and oop WebGL use same mechanism.

WebGPUParent pushes a new texture to RemoteTextureMap. The RemoteTextureMap notifies the pushed texture to WebRenderImageHost.

Before the change, only one TextureHost is used for one swap chain. With the change, multiple TextureHosts are used for one swap chain with recycling.

The changes are followings.

- Use RemoteTextureMap instead of CompositableInProcessManager.
- Use RemoteTextureOwnerId instead of CompositableHandle.
- Use WebRenderCanvasData instead of WebRenderInProcessImageData.
- Add remote texture pushed callback functionality to RemoteTextureMap. With it, RemoteTextureMap notifies a new pushed remote texture to WebRenderImageHost.
- Remove CompositableInProcessManager.

Differential Revision: https://phabricator.services.mozilla.com/D164890
2022-12-23 20:41:02 +00:00
Jim Blandy d50d1e6b18 Bug 1806780: Don't enable Vulkan WebGPU backend on OSX. r=teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D165341
2022-12-22 19:22:45 +00:00
Sasaki Keiya 6efba9f817 Bug 1804193 - extract glyph rasterizer as independent lib r=gfx-reviewers,nical,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D164859
2022-12-22 10:47:44 +00:00
Jonathan Kew 27fe73e0a8 Bug 1806844 - Use lazier initialization for the macOS system font family. r=gfx-reviewers,lsalzman
This should marginally improve content-process startup for processes that don't immediately
need to use the system font. No actual change in behavior, just taking the initialization
of the system-font faces out of the startup path.

Differential Revision: https://phabricator.services.mozilla.com/D165386
2022-12-22 09:52:29 +00:00
Mike Hommey 4f24e132f8 Bug 1804359 - Update uuid to 1.x. r=emilio,janerik,webdriver-reviewers,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D164008
2022-12-22 09:11:10 +00:00
Hiroyuki Ikezoe 79ff9afbce Bug 1803992 - Call BrowserTestUtils.waitForContentEvent before awaiting "apz-repaints-flushed" in content. r=botond
It will ensure that the BrowserTestUtils.waitForContentEvent has finished
setting up the event listener in content before sending native pan events.

Differential Revision: https://phabricator.services.mozilla.com/D165344
2022-12-21 22:43:19 +00:00
Marco Castelluccio 68e935a7d0 Bug 1790816 - Reformat gfx/gl/GLConsts.py with isort. r=linter-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165289
2022-12-21 16:25:54 +00:00
Nicolas Silva aa31db8497 Bug 1806430 - Don't validate bitflags in server.rs. r=gfx-reviewers,ErichDonGubler
wgpu now gracefully validates invalid bit patterns and produces a nicer error message.

Differential Revision: https://phabricator.services.mozilla.com/D165034
2022-12-21 10:00:50 +00:00
Marian-Vasile Laza 74bda87ddf Backed out 3 changesets (bug 1799258) for causing GTest-1proc failures on Span. CLOSED TREE
Backed out changeset 0facab7b9a1d (bug 1799258)
Backed out changeset 4f9ee3537468 (bug 1799258)
Backed out changeset 12e98a3054d0 (bug 1799258)
2022-12-21 01:41:43 +02:00
Kelsey Gilbert 7212a57acc Bug 1799258 - Do color-management on Windows+DComp via IDCompositionFilterEffects. r=sotaro
+ Add gfx.color_management.rec709_gamma_as_srgb:true. :'(

In particular, rec709(16/255) -> srgb(31/255). Even though it's
technically correct, it's practically-speaking incorrect, since that's
not what Chrome does, nor what the web expected for years and years.

In practice, basically everyone expects gamma to just be completely
ignored.

What people expect:
* Pretend gamut is srgb(==rec709), but stretch this naively for the
  display. If you have a display-p3-gamut display, srgb:0.5 expects to
  be displayed as display:0.5, which will be display-p3:0.5 to the eyes.
* Pretend all content gammas (TFs) are srgb(!=rec790), and then bitcast this
  naively for the display. E.g. rec709(16/255) should
  display the same as srgb(16/255), not srgb(31/255). (Note: display-p3
  uses srgb gamma) But if your display has e.g. gamma=3.0, don't
  convert or compensate.

This is a formalization of what you get when you spend decades ignoring
color management, and people build things based on behavior-in-practice,
not behavior-in-theory.

Also:
+ gfx.color_management.native_srgb:true for Windows, so we don't use the
  display color profile, which no one else does.
+ Add rec2020_gamma_as_rec709, so we have a path towards maybe having
  rec2020 use its correct transfer function, rather than srgb (like
  rec709).

Differential Revision: https://phabricator.services.mozilla.com/D161857
2022-12-20 22:47:53 +00:00
Kelsey Gilbert 2bda23086f Bug 1799258 - Add prereq Colorspaces stuff, including generic gamma->linear LUT inversion approximation. r=gfx-reviewers,bradwerth
No-op all-equal tfs rather than inverting.

Differential Revision: https://phabricator.services.mozilla.com/D163664
2022-12-20 22:47:52 +00:00
Kelsey Gilbert 0dd2e222e9 Bug 1799258 - [qcms] Add query for profile data and lut tables. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D163663
2022-12-20 22:47:52 +00:00
Jonathan Kew e3790aecb6 Bug 1356399 - Try to catch DWrite font access exceptions within GetGlyphBounds. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D165127
2022-12-20 09:32:02 +00:00
sotaro 145bd39747 Bug 1753373 - Upload software decoded video to NV12 for video overlay on Windows r=alwu,gfx-reviewers,bradwerth
RGB video overlay usage improves downscaled videos rendering quality. And it reduces GPU usage.

Differential Revision: https://phabricator.services.mozilla.com/D156393
2022-12-20 08:29:47 +00:00
Botond Ballo b92008f732 Bug 1805601 - Reclamp the visual viewport offset in APZ if the zoom changes. r=tnikkel
We already had logic for reclamping the visual viewport offset if the
composition bounds changes, but since the composition bounds is in
ParentLayer (post-zoom) coordinates, this didn't handle the case where
the zoom changes.

Differential Revision: https://phabricator.services.mozilla.com/D164998
2022-12-20 00:50:08 +00:00
David Shin aab93348e9 Bug 1785046 - Part 3: Let `nsIDeviceContextSpec::EndDocument` & `nsDeviceContext::EndDocument` return `MozPromise`. r=nika,emilio,geckoview-reviewers,m_kato
All implementors currently simply resolve the promise right away, using
crutch code. Asynchronous usage will be added in the changeset that follows.

Differential Revision: https://phabricator.services.mozilla.com/D163508
2022-12-19 15:42:48 +00:00
Botond Ballo abcee8d2c9 Bug 1785754 - Return HandledByContent (eagerly) for touches prevented by touch-action. r=dlrobertson,hiro,geckoview-reviewers,m_kato
Note, changes to the delayed-result codepath are not required because
touched prevented by touch-action always get an eager HandledByContent
result.

Differential Revision: https://phabricator.services.mozilla.com/D164586
2022-12-19 05:16:55 +00:00
Botond Ballo cdd26cc934 Bug 1785754 - Simplify branch structure in InputQueue::ReceiveTouchInput(). r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D164584
2022-12-19 05:16:54 +00:00
Botond Ballo b7605929e4 Bug 1785754 - Support a null target in SetStatusForTouchEvent(). r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D164583
2022-12-19 05:16:54 +00:00
Botond Ballo 2e96fd6fd3 Bug 1785754 - Compute an APZHandledResult based on the TargetConfirmationFlags and PointerEventsConsumableFlags in the eIgnore case too. r=hiro
This ensures we have an eager Unhandled result when pointer events are
not consumable.

Differential Revision: https://phabricator.services.mozilla.com/D164582
2022-12-19 05:16:53 +00:00
Botond Ballo 5a2a6b0b4e Bug 1785754 - Split the result of ArePointerEventsConsumable() into two flags. r=dlrobertson,hiro
The function would combine "has room to scroll (or zoom)" and
"touch action allows scroll (or zoom)", but in future patches
APZ will behave differently in the two cases.

Differential Revision: https://phabricator.services.mozilla.com/D164581
2022-12-19 05:16:53 +00:00
Botond Ballo 7b0f88ac4e Bug 1785754 - Report HANDLED_CONTENT on pages with a preventDefault()-ing event listener even if the page is not scrollable. r=geckoview-reviewers,hiro,dlrobertson,m_kato
This effectively backs out the fix for bug 1746336, while keeping the test
added in that bug (PanZoomControllerTest#touchActionWithWheelListener)
passing using a different fix approach (remembering the eager status
and using it in the computation of the delayed result).

Differential Revision: https://phabricator.services.mozilla.com/D164114
2022-12-19 05:16:52 +00:00
Lee Salzman bb4e9a8ba5 Bug 1804998 - Silence ubsan warning. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D164978
2022-12-18 19:20:03 +00:00
Dan Robertson 81987df712 Bug 1488886 - AllocPAPZCTreeManager should gracefully fail if APZ is not enabled. r=botond
Depends on D164682

Differential Revision: https://phabricator.services.mozilla.com/D164683
2022-12-18 02:57:00 +00:00
Dan Robertson 641a4bf7e3 Bug 1488886 - Fix static-analysis warnings. r=botond
Fix static-analysis warnings in ContentCompositorBridgeParent.

Differential Revision: https://phabricator.services.mozilla.com/D164682
2022-12-18 02:57:00 +00:00
Jim Blandy dde6692f0e Bug 1806166: Update wgpu to f14bee67 (2022-12-16) r=nical,supply-chain-reviewers
This brings in various bugfixes and improvements from upstream,
including the fix for bug 1791809 and a workaround for bug 1804530.

In this update, `wgpu_core` leaves the selection of backends to its
users, rather than trying to guess which backends to use itself, based
on the target architecture and operating system. For Firefox, this
means that `gfx/wgpu_bindings/Cargo.toml` is now responsible for
selecting back ends.

Firefox's WebGPU implementation should never use `wgpu`'s GLES
backend. Firefox can now explain this to `wgpu-core`, causing it to
drop its dependency on `glow`, `bitflags_serde_shim` and `slotmap`.
These are no longer vendored, and their exemptions in
`supply-chain/config.toml` can be dropped.

The new `wgpu-core` updates to version 0.37.1+1.3.235 of the `ash`
crate, and this patch moves ash's supply-chain exemption forward to
the new version. We expect to finish vetting that next week, but
because this `wgpu-core` update is urgently needed, we want to extend
the exemption for the time being.

The dependency on `slotmap` had been patched to an empty file in
`build/rust/dummy-web`, which can now be removed.

The new `wgpu-core` no longer uses `cfg_aliases`, so Firefox no longer
needs to vendor that.

Differential Revision: https://phabricator.services.mozilla.com/D164928
2022-12-17 22:25:49 +00:00
Jonathan Kew b612c1324d Bug 1806214 - Update harfbuzz to 6.0.0 r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D164971
2022-12-17 20:40:34 +00:00
Jonathan Kew 3ef6e5ebc2 Bug 1806140 - Handle the italic face of the macOS system font. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D164970
2022-12-17 20:10:54 +00:00
Emilio Cobos Álvarez b8a0c9a742 Bug 1805500 - Implement panel borders in cocoa using a border rather than shadow. r=mstange,extension-reviewers
My guess is that it was done using shadows to not interfere with the
native look, but actually this just works even with native-looking menus
(like the <select> menulist), because the background-color for those is
set on the menupopup, rather than the ::part(content).

So those have effectively 1px of extra padding (due to the transparent
border), but that seems barely perceptible, and worth the consistency
and simplification.

Differential Revision: https://phabricator.services.mozilla.com/D164716
2022-12-17 01:45:05 +00:00
Cristian Tuns c2f987572a Backed out changeset b9473eda2d5b (bug 1805500) for causing mochitest failures on browser_ext_popup_select_in_oopif.js CLOSED TREE 2022-12-16 19:10:34 -05:00
Cristian Tuns 53ccdf42d8 Backed out 2 changesets (bug 1488886) for causing build bustages on ContentCompositorBridgeParent.cpp CLOSED TREE
Backed out changeset 8cdb673361ab (bug 1488886)
Backed out changeset 7fc8e79f2ff0 (bug 1488886)
2022-12-16 18:43:18 -05:00
Lee Salzman e599e9d352 Bug 1806058 - Add blocklist for Accelerated Canvas2D. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D164881
2022-12-16 20:15:49 +00:00
Dan Robertson c18b24369d Bug 1488886 - AllocPAPZCTreeManager should gracefully fail if APZ is not enabled. r=botond
Depends on D164682

Differential Revision: https://phabricator.services.mozilla.com/D164683
2022-12-16 19:07:07 +00:00
Dan Robertson b708eda376 Bug 1488886 - Fix static-analysis warnings. r=botond
Fix static-analysis warnings in ContentCompositorBridgeParent.

Differential Revision: https://phabricator.services.mozilla.com/D164682
2022-12-16 19:07:07 +00:00
Emilio Cobos Álvarez 1eb1a7ba94 Bug 1805500 - Implement panel borders in cocoa using a border rather than shadow. r=mstange,extension-reviewers
My guess is that it was done using shadows to not interfere with the
native look, but actually this just works even with native-looking menus
(like the <select> menulist), because the background-color for those is
set on the menupopup, rather than the ::part(content).

So those have effectively 1px of extra padding (due to the transparent
border), but that seems barely perceptible, and worth the consistency
and simplification.

Differential Revision: https://phabricator.services.mozilla.com/D164716
2022-12-16 17:34:48 +00:00
Nika Layzell 9e65358787 Bug 1799222 - Part 1: Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-16 17:09:16 +00:00
Nicolas Silva c1c763c349 Bug 1805910 - Move CommandBuffer into its own file. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D164814
2022-12-16 09:37:44 +00:00
Jeff Muizelaar c1d05774cc Bug 1804952. Translate rectangle PushClip() to PushClipRect() r=lsalzman
This helps out when clipping to rects with canvas2d. It reduces GPU
usage on the React-Stockcharts benchmark from ~70% down to ~45% on
a desktop gen9 Intel GPU.

It would be better to handle this in the D2D backend like we do in other
backends, but there's not an easy way to detect rectangle paths there.
This was the easiest place to slot it in and shouldn't have too high a
cost for the other places we use the recording backend.

Differential Revision: https://phabricator.services.mozilla.com/D164764
2022-12-16 04:04:39 +00:00
sotaro 9df22d9664 Bug 1798245 - Enable video overlay without ZeroCopyNV12Texture with non-intel GPUs to release r=jrmuizel,gfx-reviewers
Bug 1798242 did not cause a regression. Then it seems OK to try to enable video overlay without ZeroCopyNV12Texture with non-intel GPUs to release.

Differential Revision: https://phabricator.services.mozilla.com/D164634
2022-12-16 00:54:14 +00:00
Andrew McCreight ce28c41da0 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Sandor Molnar c8085bc124 Backed out 4 changesets (bug 1805427) for causing xpc failures in toolkit/components/extensions/test/xpcshell/test_ext_scripting_persistAcrossSessions.js CLOSED TREE
Backed out changeset 9231b82f6a8b (bug 1805427)
Backed out changeset 9308ede8e265 (bug 1805427)
Backed out changeset b1c44a7274c5 (bug 1805427)
Backed out changeset 39a8c4bff42f (bug 1805427)
2022-12-15 18:43:29 +02:00
Chris H-C 37e15535e6 Bug 1805427 - Update Glean to 52.0.0, uuid to 1.0 r=glandium,janerik,webdriver-reviewers,supply-chain-reviewers
Depends on D164603

Differential Revision: https://phabricator.services.mozilla.com/D164604
2022-12-15 14:04:54 +00:00
Lee Salzman 0ebc2df843 Bug 1805757 - Move SkConvolver into the tree. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D164732
2022-12-15 05:53:16 +00:00
Kelsey Gilbert 6d120d162b Bug 1805626 - Query vert attrib buffer binding directly. r=gfx-reviewers,lsalzman
Previously we were querying the current ARRAY_BUFFER_BINDING, which
would fail if you did:
```
BindBuffer(ARRAY_BUFFER, a)
VertexAttribPointer(...)
BindBuffer(ARRAY_BUFFER, b)
```
We would assume we should call VeretxAttribPointer again with `b` bound,
when we need to bind `a` instead.

Unfortunately, this is hard to test, and we only hit this on drivers
where we don't use VAOs, which are rare now.

Differential Revision: https://phabricator.services.mozilla.com/D164744
2022-12-14 23:08:41 +00:00
Andrew Osmond b8b20f1afe Bug 1798591. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D163295
2022-12-14 17:50:54 +00:00
Jonathan Kew 64df3d06dc Bug 1803059 - Remove obsolete patch files from gfx/cairo, and create patch files to record locally-applied fixes. r=gfx-reviewers,lsalzman DONTBUILD
When we did the major cairo update in bug 739096, most of our old patch files were superseded
and no longer relevant, but I failed to clean them up at the time. So here, we remove all the
old patch files, and create new ones just for the fixes we've applied on top of the new code
from upstream.

I've omitted patch files for fixes that I am aware have already landed upstream, as those will
automatically be included in any future update we take. (It's possible more of the new patch
files will also be obsolete by the time we try pulling a new version, but at least they should
provide a starting point.)

Differential Revision: https://phabricator.services.mozilla.com/D164680
2022-12-14 16:18:01 +00:00
Cristian Tuns da50134a78 Backed out changeset d647be139836 (bug 1798591) for causing build bustages on FontFaceSetImpl.cpp CLOSED TREE 2022-12-14 10:26:07 -05:00
Andrew Osmond fcb0efab8b Bug 1798591. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D163295
2022-12-14 14:31:20 +00:00
Kartikaya Gupta 61991f05a4 Bug 1805128 - Update servo/webrender CI to pass again. r=jrmuizel
This updates the docker image used for CI on the github.com webrender
repository, so that updates to the WebRender code can continue to be
propagated to github.

Differential Revision: https://phabricator.services.mozilla.com/D164458
2022-12-14 10:07:50 +00:00
Nicolas Silva d871dfba00 Bug 1797975 - Add telemetry for skipped composites. r=bas
Differential Revision: https://phabricator.services.mozilla.com/D162305
2022-12-13 14:49:21 +00:00
Sylvestre Ledru c7c6dfa5bb Bug 1803331 - skia/generator: refresh the list to have the up to date moz.build after running generate_mozbuild.py r=nical DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D163813
2022-12-13 13:28:32 +00:00
Sylvestre Ledru af5d98a682 Bug 1803331 - skia/generator: remove SK_OUTLINE_EMBOLDEN_DIVISOR r=jfkthame DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D164566
2022-12-13 13:01:58 +00:00
Chris Peterson ec0918a596 Bug 1804375 - Re-enable clang's -Wimplicit-fallthrough warnings in gfx code including Skia headers. r=gfx-reviewers,lsalzman
Bug 1236323 disabled clang's -Wimplicit-fallthrough warnings from some Skia headers, but this warning can be re-enabled because the current version of Skia doesn't trigger these warnings.

Depends on D164027

Differential Revision: https://phabricator.services.mozilla.com/D164028
2022-12-13 03:57:36 +00:00
sotaro 67f424d382 Bug 1771344 - Add TextureClient::IsValid() check to PersistentBufferProviderShared::SetKnowsCompositor() r=gfx-reviewers,lsalzman
Device reset in test_device_reset.html replaces CompositorBridgeChild to a new one. And shutting down old CompositorBridgeChild also destroys TextureClients.

Differential Revision: https://phabricator.services.mozilla.com/D164175
2022-12-13 01:01:15 +00:00
sotaro 32de8eae22 Bug 1804592 - A little code cleanup of PersistentBufferProviderShared::Destroy() r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D164176
2022-12-13 00:12:49 +00:00
Jonathan Kew 3821ab942f Bug 1804930 - Remove an obsolete main-thread assertion in gfxUserFontSet. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D164363
2022-12-12 15:03:10 +00:00