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

43490 Коммитов

Автор SHA1 Сообщение Дата
Cristian Tuns d4e4ae35a5 Backed out 2 changesets (bug 1750576) for causing lint failures and build bustages. CLOSED TREE
Backed out changeset 21ede22c4113 (bug 1750576)
Backed out changeset be7493c6f3cb (bug 1750576)
2022-07-07 10:51:38 -04:00
Nicolas Silva c2f7c229ec Bug 1750576 - Avoid passing raw strings in a couple of wgpu bindings entry points. r=emilio
Inspired by emilio's suggestion in the shader module API patch. This tries to be the most straightforward way to go from the strings coming from IPC to the ones consumed by wgpu.

Differential Revision: https://phabricator.services.mozilla.com/D151024
2022-07-07 14:35:29 +00:00
Nicolas Silva 8b76f3e498 Bug 1750576 - WebGPU shader module asynchronous CompilationInfo API. r=aosmond,emilio
This patch is a lot of plumbing for not that much functionality. The goal is to align CreateShaderModule's error reporting with the spec.
Creating a shader module is now a dedicated async IPDL message returning the compilation info so that it can be exposed as a promise by the WebGPU API.

Differential Revision: https://phabricator.services.mozilla.com/D146817
2022-07-07 14:35:28 +00:00
Jamie Nicol 0cffcc7253 Bug 1777952 - Namespace SurfaceTexture handles by the process they were allocated in. r=gfx-reviewers,geckoview-reviewers,aosmond,calu
When Surfaces/SurfaceTextures are allocated they are given a handle,
which is a monotonically increasing 32-bit integer. To render
Surfaces, we typically pass the Surface handle to the compositor,
which then looks it up in a map to find the corresponding
SurfaceTexture.

Following a GPU process restart, content may be left with stale
handles referencing SurfaceTextures which no longer exist. Once new
SurfaceTextures are allocated, these stale handles may reference new
SurfaceTextures with no relation to the old handle. This can lead to
rendering the wrong texture. Additionally, we may crash when
allocating "sync" SurfaceTextures, as the previous sync texture for a
certain handle may not have been released yet.

To fix this, this patch combines the existing handle with a new ID
uniquely identifying the process in which the SurfaceTexture was
allocated (or 0 for the parent process). We use a monotonically
increasing value rather than the pid to guard against the new GPU
process possibly having the same pid as the previous instance. We
combine these two 32-bit integers and use the resulting 64-bit integer
as the Surface handle.

Differential Revision: https://phabricator.services.mozilla.com/D150963
2022-07-07 08:12:55 +00:00
James Graham b57989d24a Bug 1773696 - Make wheel event IPC depend on test_events_async_enabled, r=smaug
The `widget->DispatchInputEvent` codepath only works in gecko CI
configurations, so to allow this to be used for e.g. WebDriver
implement a path that doesn't go via the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D150632
2022-07-06 19:55:12 +00:00
Narcis Beleuzu bacee02794 Backed out changeset 0a2e3c4ca14f (bug 1750576) for bustages on RefPtr . CLOSED TREE 2022-07-06 19:18:20 +03:00
Nicolas Silva cce57e2aa3 Bug 1750576 - WebGPU shader module asynchronous CompilationInfo API. r=aosmond,emilio
This patch is a lot of plumbing for not that much functionality. The goal is to align CreateShaderModule's error reporting with the spec.
Creating a shader module is now a dedicated async IPDL message returning the compilation info so that it can be exposed as a promise by the WebGPU API.

Differential Revision: https://phabricator.services.mozilla.com/D146817
2022-07-06 15:22:59 +00:00
Jeff Muizelaar d9dcf5b2b6 Bug 1778158 - quartz: Avoid reading beyond the end of image surfaces. r=jfkthame
The last row of data may have less than stride bytes so make sure we
only copy what we need.

This corresponds to cairo:cccc81ccba99600483621e02ae9438a4a5a3d024

Differential Revision: https://phabricator.services.mozilla.com/D151053
2022-07-06 12:25:10 +00:00
Kelsey Gilbert 4f87812c0f Bug 1778232 - ImageFormat::s/CAIRO_SURFACE/MOZ2D_SURFACE/. r=jrmuizel
Also remove comment that says it can't be off-main-thread.

Differential Revision: https://phabricator.services.mozilla.com/D151087
2022-07-06 07:46:17 +00:00
Kelsey Gilbert 98e17790db Bug 1776470 - Explicitly ask for ANGLE debug layer iff d3d11 debug layer pref enabled. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D150274
2022-07-06 07:45:29 +00:00
Robert Longson 4bcc81eaf7 Bug 1777671 - Account for glyph orientations when returning rotation of character r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D150858
2022-07-06 06:01:22 +00:00
Glenn Watson 5bd787a0ba Bug 1778036 - Switch public primitive API to be clip-chain based r=gfx-reviewers,lsalzman
This is mostly just changing a small number of structs and function
params (most of the work has been done in previous patches).

Differential Revision: https://phabricator.services.mozilla.com/D150987
2022-07-05 20:52:31 +00:00
Glenn Watson 5c3d556f14 Bug 1778030 - Remove clip_id_stack from wrench r=gfx-reviewers,lsalzman
Also update reftests to only specify rect / rounded-rect / mask per clip.

Differential Revision: https://phabricator.services.mozilla.com/D150984
2022-07-05 20:52:31 +00:00
Jim Blandy 2f5eb12516 Bug 1777656: Delete mozilla::ipc::SharedMemory::SharedMemorytype. r=nika,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D150852
2022-07-05 20:08:31 +00:00
Glenn Watson bbcff3fc66 Bug 1778017 - Remove ClipId-style parenting from rect clip public API r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150983
2022-07-05 11:22:05 +00:00
Glenn Watson 60220b9b80 Bug 1778015 - Remove ClipId-style parenting from rounded-rects clip public API r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150982
2022-07-05 09:53:28 +00:00
Glenn Watson 829af78106 Bug 1778013 - Remove ClipId-style parenting from image clip masks public API r=gfx-reviewers,lsalzman
Also make the parent in ClipTemplate an Option, so that the
semantics are a bit clearer (follow up patches will remove this
parent field entirely).

Differential Revision: https://phabricator.services.mozilla.com/D150980
2022-07-05 08:20:49 +00:00
Jonathan Kew 2f7b62ff61 Bug 1777209 - Use DrawSurface rather than FillRect to paint <canvas>, and don't use EXTEND_PAD when writing to PDF. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150601
2022-07-05 07:55:56 +00:00
Dan Robertson 83ab6a777b Bug 1753019 - Adjust sticky position elements for the dynamic toolbar. r=botond
Use the animation id from the stacking context to find the hit-testing tree node
for hit tests of elements that are sticky positioned. Then use this hit-testing
tree node reference to apply APZ transforms if the sticky positioned element is
stuck to the root content.

Differential Revision: https://phabricator.services.mozilla.com/D150047
2022-07-04 18:14:59 +00:00
Dan Robertson affccc0acb Bug 1753019 - Use the animation id to identify hit testing metadata. r=botond,gw
## Summary

Pass the fixed position element animation id through webrender, returning the
the animation id in the hit-test result if the element is a fixed position
element. This animation id then can be used to lookup the relevant Hit-Testing
Tree Node, which can be used to find the fixed (or sticky) position side bits.

## Motivation

Sticky content can be currently stuck to the root content or not, based on the
scroll position. As a result, when hit testing sticky content, APZ needs both
the sticky position side bits and additional information to determine if the
element is currently stuck to the root content. This is needed to fix the
hit-testing of sticky position content when a APZ transform is being applied,
such as overscroll and hiding the dynamic toolbar.

## Implementation

The information needed to determine if a element is currently stuck to the root
content and the fixed/sticky position side bits is already stored in the
hit-testing tree node. Any hit test result should have a corresponding
hit-testing tree node entry. When a hit-test result contains a animation id and
a hit-testing tree node is found, we can store a pointer to this node and use
this to check the fixed/sticky position side bits. Something similar is already
done for hit test results when a scrollbar is hit.

Differential Revision: https://phabricator.services.mozilla.com/D148648
2022-07-04 18:14:58 +00:00
Cristian Tuns c35e657922 Backed out changeset 85d0efe7eb9b (bug 1773696) for causing mochitest failures in test_bug946632.html CLOSED TREE 2022-07-04 13:04:32 -04:00
Csoregi Natalia da06c30fac Backed out changeset 1b43d3f38946 (bug 1777209) for causing reftest failures e.g. 602200-4.html. CLOSED TREE 2022-07-04 19:27:42 +03:00
Jonathan Kew c94cf2c2a7 Bug 1777209 - Use DrawSurface rather than FillRect to paint <canvas>, and don't use EXTEND_PAD when writing to PDF. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150601
2022-07-04 14:08:16 +00:00
James Graham a60c9412c5 Bug 1773696 - Make wheel event IPC depend on test_events_async_enabled, r=smaug
The `widget->DispatchInputEvent` codepath only works in gecko CI
configurations, so to allow this to be used for e.g. WebDriver
implement a path that doesn't go via the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D150632
2022-07-04 12:56:20 +00:00
Glenn Watson 775d9ac992 Bug 1777901 - Pt 2 - Port more wrench tests to specify clips via clip-chains r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150927
2022-07-04 10:14:57 +00:00
Glenn Watson c048d4ef0e Bug 1777901 - Port more wrench tests to specify clips via clip-chains r=gfx-reviewers,lsalzman
The intent is to deprecate specifying clips via ClipId::Clip(..)
as this will simplify the ongoing clip-interning work.

Differential Revision: https://phabricator.services.mozilla.com/D150925
2022-07-04 10:14:56 +00:00
Timothy Nikkel 421d004492 Bug 1737722. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D145721
2022-07-02 00:39:27 +00:00
sotaro dd2b6633a9 Bug 1777657 - Remove SurfaceDescriptor from WebRenderTextureHost constructor r=gfx-reviewers,lsalzman
SurfaceDescriptor is not used anymore in WebRenderTextureHost constructor.

Differential Revision: https://phabricator.services.mozilla.com/D150853
2022-07-02 00:06:00 +00:00
Bogdan Szekely ad5599bfa2 Backed out changeset 566b061ee95d (bug 1777209) for causing multiple failures CLOSED TREE 2022-07-01 18:16:27 +03:00
Joel Maher 537a5a0dc8 Bug 1777549 - remove remaining e10s conditions in manifest files. r=gbrown,extension-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D150820
2022-07-01 13:49:42 +00:00
Jonathan Kew 9af0d47ce3 Bug 1777209 - Use DrawSurface rather than FillRect to paint <canvas>, and don't use EXTEND_PAD when writing to PDF. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150601
2022-07-01 09:17:04 +00:00
Botond Ballo 041120d0b6 Bug 1777482 - Disable helper_bug1756529 on Mac. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D150851
2022-07-01 05:35:19 +00:00
Hiroyuki Ikezoe b3f8eec3ae Bug 1530253 - Implement the logic to choose the best snap point for re-snap. r=botond
Depends on D148861

Differential Revision: https://phabricator.services.mozilla.com/D148862
2022-07-01 01:35:32 +00:00
Hiroyuki Ikezoe ce73d6bd80 Bug 1530253 - Make GetSnapPointForDestination return the last snapped target id(s). r=botond
Depends on D148856

Differential Revision: https://phabricator.services.mozilla.com/D148857
2022-07-01 01:35:30 +00:00
Hiroyuki Ikezoe e176812c3d Bug 1530253 - Assign an id to each scroll snap target for tracking the last snapped element. r=botond,emilio
Depends on D148855

Differential Revision: https://phabricator.services.mozilla.com/D148856
2022-07-01 01:35:29 +00:00
Glenn Watson 70b436796a Bug 1777395 - Remove legacy clip-parenting in wrench r=gfx-reviewers,lsalzman
This removes the last piece of code in wrench and gecko (there is
one more callsite in WR itself) that relies on the legacy clip
parenting code.

Differential Revision: https://phabricator.services.mozilla.com/D150694
2022-06-30 20:38:14 +00:00
Martin Stransky 350446cc4b Bug 1777368 [Linux] Don't init VP8_HW_DECODE/VP9_HW_DECODE features on Linux as they're not used r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D150739
2022-06-30 19:44:59 +00:00
smolnar 3fa084ce2f Backed out 3 changesets (bug 1771374) for causing build bustage in gfx/gl/gtest/TestColorspaces.cpp CLOSED TREE
Backed out changeset 4d01f260c43a (bug 1771374)
Backed out changeset fc62679f0a6c (bug 1771374)
Backed out changeset f4f12470f8b7 (bug 1771374)
2022-06-30 21:19:17 +03:00
Sebastian Hengst 304227d5c2 Bug 1774376 - update file-to-Bugzilla-component mappings for Graphics team r=perftest-reviewers,gfx-reviewers,sparky,aosmond,nical
Components got reorganized in bug 1774288.

Differential Revision: https://phabricator.services.mozilla.com/D149375
2022-06-30 18:07:29 +00:00
Kelsey Gilbert ec0b1e1d29 Bug 1771374 - Fix lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-06-30 17:56:27 +00:00
Kelsey Gilbert 5f12c188ca Bug 1771374 - Disable color management based on pref in DCLayerTree. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150276
2022-06-30 17:56:26 +00:00
Kelsey Gilbert bb48a57a8a Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-06-30 17:56:26 +00:00
Jonathan Kew a18e1814b0 Bug 1777475 - Add locking to the gfxGlyphExtents class. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150750
2022-06-30 14:52:38 +00:00
Iulian Moraru 7ad40f6883 Backed out changeset 121326268074 (bug 1737722) for causing build bustages on WRHitTester.cpp. CLOSED TREE 2022-06-30 15:25:43 +03:00
Timothy Nikkel 24843e3503 Bug 1737722. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D145721
2022-06-30 12:06:40 +00:00
Bogdan Szekely ff9c07ed1b Backed out changeset 83c2ba6648ac (bug 1773696) for causing mochitest failures on TimeStamp.h CLOSED TREE 2022-06-30 13:17:39 +03:00
James Graham 926ae49c33 Bug 1773696 - Make wheel event IPC depend on test_events_async_enabled, r=smaug
The `widget->DispatchInputEvent` codepath only works in gecko CI
configurations, so to allow this to be used for e.g. WebDriver
implement a path that doesn't go via the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D150632
2022-06-30 08:34:10 +00:00
Glenn Watson 65bb3e9aee Bug 1777388 - Remove legacy clip-parenting from `clip-to-frame` in wrench r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150683
2022-06-30 02:41:02 +00:00
criss d5ece910a9 Backed out 3 changesets (bug 1771374) for causing bustages on Colorspaces.h. CLOSED TREE
Backed out changeset 498c27656dc3 (bug 1771374)
Backed out changeset 6f97bc39643f (bug 1771374)
Backed out changeset b4fdb70808b6 (bug 1771374)
2022-06-30 05:28:11 +03:00
Kelsey Gilbert 8fdac7788a Bug 1771374 - Fix lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-06-29 23:38:23 +00:00
Kelsey Gilbert 24fcc06910 Bug 1771374 - Disable color management based on pref in DCLayerTree. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150276
2022-06-29 23:38:23 +00:00
Kelsey Gilbert c4f86e2e33 Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-06-29 23:38:22 +00:00
Glenn Watson 46928eda22 Bug 1777363 - Add clip-chain definition shortcut to wrench r=gfx-reviewers,lsalzman
Add a way to define an item-local clip-chain from a series of
clips. Port a couple of tests to use this instead of relying on
legacy clip-parenting (which we plan to remove soon).

Differential Revision: https://phabricator.services.mozilla.com/D150662
2022-06-29 22:41:01 +00:00
criss efb5f18b59 Backed out 3 changesets (bug 1771374) for causing build bustages on GLBlitHelper.cpp. CLOSED TREE
Backed out changeset 71d40a0a3c9c (bug 1771374)
Backed out changeset 6a42df6834fe (bug 1771374)
Backed out changeset be888d0fd0bf (bug 1771374)
2022-06-30 01:12:46 +03:00
Kelsey Gilbert 7cf061700c Bug 1771374 - Fix lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-06-29 21:48:53 +00:00
Kelsey Gilbert 4fc89754ca Bug 1771374 - Disable color management based on pref in DCLayerTree. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150276
2022-06-29 21:48:52 +00:00
Kelsey Gilbert bad5d9146c Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-06-29 21:48:52 +00:00
Botond Ballo 8db826da52 Bug 1771836 - Split helper_bug1756529 out into its own test group. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D150616
2022-06-29 21:20:51 +00:00
Botond Ballo 1674044117 Bug 1777277 - Guard against infinite recursion in RemoteContentController::NotifyScaleGestureComplete(). r=mccr8
However, also add a MOZ_ASSERT because GetGeckoContentControllerForRoot()
returning a RemoteContentController here is unexpected and should be
investigated further.

Differential Revision: https://phabricator.services.mozilla.com/D150638
2022-06-29 20:53:59 +00:00
Glenn Watson 6672bf7be5 Bug 1777141 - Support `spatial-id` in wrench yaml files r=gfx-reviewers,lsalzman
Some more work towards removing the use of legacy clipid parenting
in wrench test files. Add support for specifying the spatial id
without also setting the clip parent. Port some more wrench tests
to use spatial-id and/or clip-chain.

Differential Revision: https://phabricator.services.mozilla.com/D150528
2022-06-29 19:34:18 +00:00
Botond Ballo eb70096a5f Bug 1777151 - Call assertion functions like ok() without qualifying them as SimpleTest.ok() in APZ subtests. r=dlrobertson
The unqualified versions are the ones hooked to print the subtest name.

Depends on D150609

Differential Revision: https://phabricator.services.mozilla.com/D150610
2022-06-29 17:40:17 +00:00
Botond Ballo 461cd53745 Bug 1777151 - Move helper_bug982141 into test_group_scrollframe_activation. r=dlrobertson
helper_bug982141 was the first APZ test to be run in its own window, a technique
which we've since formalized in runSubtestsSeriallyInFreshWindows().

Rather than having a dedicated test_bug982141 to open its window,
move the subtest into test_group_scrollframe_activation.

Differential Revision: https://phabricator.services.mozilla.com/D150609
2022-06-29 17:40:17 +00:00
stransky bea11a62d5 Bug 1773282 [Linux] Remove nsIGfxInfo::FEATURE_VAAPI and use nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING r=alwu
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING is used on all platforms so let's use it on Linux too and don't add new feature for Linux only.

Differential Revision: https://phabricator.services.mozilla.com/D149765
2022-06-29 12:09:02 +00:00
stransky 59dfb5f41a Bug 1773282 [Linux] Don't print VP8_HW_DECODE/VP9_HW_DECODE on about:support on Linux as it's not used there r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D149763
2022-06-29 12:09:02 +00:00
sotaro a807c798e9 Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers
The async front buffer posting is going to be enabled by another bug.

Async IPC was added for async front buffer posting for out-of-process WebGL.
Client does not use TextureClient for storing SurfaceDescriptor.
It works basically same way as to in-process WebGL around nsDisplayCanvas, WebRenderCanvasData, WebRenderCommandBuilder and WebRenderBridgeParent.
SharedSurfaces of SurfaceDescriptorD3D10 are kept alive during their usage. It is for keeping a shread handle valid.
Copied data buffers of SharedShurface_Basics are kept alive during their usage. It is for keeping RenderBufferTextureHost valid.

Differential Revision: https://phabricator.services.mozilla.com/D150197
2022-06-29 09:32:29 +00:00
Norisz Fay f70f5a4b0f Backed out changeset af98fb4ff148 (bug 1712486) for causing build bustages on LayersSurfaces CLOSED TREE 2022-06-29 09:06:45 +03:00
sotaro 8a8d04cce2 Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers
The async front buffer posting is going to be enabled by another bug.

Async IPC was added for async front buffer posting for out-of-process WebGL.
Client does not use TextureClient for storing SurfaceDescriptor.
It works basically same way as to in-process WebGL around nsDisplayCanvas, WebRenderCanvasData, WebRenderCommandBuilder and WebRenderBridgeParent.
SharedSurfaces of SurfaceDescriptorD3D10 are kept alive during their usage. It is for keeping a shread handle valid.
Copied data buffers of SharedShurface_Basics are kept alive during their usage. It is for keeping RenderBufferTextureHost valid.

Differential Revision: https://phabricator.services.mozilla.com/D150197
2022-06-29 05:05:47 +00:00
Glenn Watson f92ac501b1 Bug 1776075 - Remove use of clip-id parenting in gecko r=gfx-reviewers,jrmuizel
Removes the last usage of the old-style clip-id parenting in
gecko. These paths passed the clip parent, but shouldn't be
necessary (all tests pass without them). Landing as a small
patch that's easy to bisect and back out if it does cause any
regression.

Differential Revision: https://phabricator.services.mozilla.com/D150050
2022-06-29 00:21:45 +00:00
sotaro b15ea105d5 Bug 1776800 - Let zero copy hardware decoded video to release on intel GPU on Windows r=jrmuizel,gfx-reviewers
Reuse decoder device also to release on intel GPU on Windows, since it is also necessary for zero copy hardware decoded video.
Reuse decoder device handling is also updated as aligned to FEATURE_HW_DECODED_VIDEO_ZERO_COPY.

Differential Revision: https://phabricator.services.mozilla.com/D150448
2022-06-28 21:54:36 +00:00
Andrew Osmond c9e5ad2c49 Bug 1771493 - Part 2. Merge FontFaceSetImpl and gfxUserFontSet into a single class. r=emilio
This patch merges FontFaceSetImpl and gfxUserFontSet into the same
class. This reduces the level of indirection and in theory makes it
easier to manage future threading issues.

Differential Revision: https://phabricator.services.mozilla.com/D147817
2022-06-28 21:47:00 +00:00
Jim Blandy 484ca146df Bug 1776816: Update wgpu to b370b990 (2022-6-28). r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D150447
2022-06-28 20:53:15 +00:00
Brad Werth cdfeb597d3 Bug 1774939: Rebuild video layer if it fails to enqueue a surface. r=mstange
For unknown reasons, AVSampleBufferDisplayLayer may sometimes stop
enqueueing new buffers. In this case it will return false for the
readyForMoreMediaData property. When this happens, there's no guarantee
that the layer will ever accept new buffers again. We can work around
this by rebuilding the video layer when it locks up, which ensures that
the video sample is displayed in the next update, seemingly without
visual jitter.

This is not useful if the video enqueueing is failing due to memory
pressure, but more serious failure points would likely be occurring at the
same time.

This patch also adds to the logging we will see when the pref
`gfx.core-animation.specialize-video.log` is set.

Differential Revision: https://phabricator.services.mozilla.com/D149920
2022-06-28 20:05:10 +00:00
Marian-Vasile Laza dfecbedace Backed out 5 changesets (bug 1771493) for causing bustages on FontFaceSetDocumentImpl.obj. CLOSED TREE
Backed out changeset 07513973391f (bug 1771493)
Backed out changeset 22f567c00af3 (bug 1771493)
Backed out changeset 609a5d93bf08 (bug 1771493)
Backed out changeset 1f5b0b087930 (bug 1771493)
Backed out changeset aa5527055ad1 (bug 1771493)
2022-06-28 22:21:00 +03:00
Michael Froman 318bb2d6ff Bug 1698699 - P7 - add missing include for hybrid builds. r=ng
Depends on D150312

Differential Revision: https://phabricator.services.mozilla.com/D150480
2022-06-28 16:29:41 +00:00
Nico Grunbaum fbc400fd93 Bug 1698699 - P0 - remove use of deprecated libyuv int types;r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D150300
2022-06-28 16:29:37 +00:00
Andrew Osmond 4dfc867556 Bug 1771493 - Part 2. Merge FontFaceSetImpl and gfxUserFontSet into a single class. r=emilio
This patch merges FontFaceSetImpl and gfxUserFontSet into the same
class. This reduces the level of indirection and in theory makes it
easier to manage future threading issues.

Differential Revision: https://phabricator.services.mozilla.com/D147817
2022-06-28 15:58:10 +00:00
Bogdan Szekely c94fbd38ae Backed out 4 changesets (bug 1771493) for causing build bustages on FontFaceSet.cpp CLOSED TREE
Backed out changeset 3f2605087550 (bug 1771493)
Backed out changeset 5e6bf07c9c27 (bug 1771493)
Backed out changeset fbfb5b7dfb30 (bug 1771493)
Backed out changeset 93b7e171c74a (bug 1771493)
2022-06-28 17:57:11 +03:00
Andrew Osmond effce641e2 Bug 1771493 - Part 2. Merge FontFaceSetImpl and gfxUserFontSet into a single class. r=emilio
This patch merges FontFaceSetImpl and gfxUserFontSet into the same
class. This reduces the level of indirection and in theory makes it
easier to manage future threading issues.

Differential Revision: https://phabricator.services.mozilla.com/D147817
2022-06-28 14:27:21 +00:00
Bogdan Szekely 399c93b211 Backed out 4 changesets (bug 1773282) for causing xpcshell failures on test_gfxBlacklist_Version.js CLOSED TREE
Backed out changeset c9134683c1db (bug 1773282)
Backed out changeset a2d33cd0de61 (bug 1773282)
Backed out changeset 3024ad3df3db (bug 1773282)
Backed out changeset a1a1a1c7d622 (bug 1773282)
2022-06-28 16:06:39 +03:00
stransky a961fafee3 Bug 1773282 [Linux] Remove nsIGfxInfo::FEATURE_VAAPI and use nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING r=alwu
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING is used on all platforms so let's use it on Linux too and don't add new feature for Linux only.

Differential Revision: https://phabricator.services.mozilla.com/D149765
2022-06-28 12:10:37 +00:00
stransky 56f1fe9fc0 Bug 1773282 [Linux] Don't print VP8_HW_DECODE/VP9_HW_DECODE on about:support on Linux as it's not used there r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D149763
2022-06-28 12:10:36 +00:00
Michelle Goossens 7f247c8d44 Bug 1773830 - Migrate Linux mochitest-browser-chrome from AWS to GCP r=ahal,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D150325
2022-06-28 11:11:42 +00:00
Botond Ballo 47d750a35a Bug 1776805 - Avoid including SimpleTest.js directly from APZ test helpers. r=dlrobertson
Note, this is only applicable to helpers used directly as subtests
in runSubtestsSeriallyInFreshWindows(). It does not apply to:

 * Fission test helpers (helper_fission_*.html), which use a separate
   subtest mechanism

 * Helpers for browser mochitests

 * Helpers which are files loaded in an iframe by another helper

Differential Revision: https://phabricator.services.mozilla.com/D150439
2022-06-28 04:43:26 +00:00
Brad Werth c1f79b8beb Bug 1773109: Change tile cache backdrops to only guarantee visible coverage. r=gw
Previously, a tile cache backdrop was an opaque color that was guaranteed
to cover the entire tile cache rect. This change makes it so that the
backdrop must only cover the visible area. For compositors that support
native color layers, this allows native color layers to be used more
often.

To make this work, the tile cache background color is updated whenever a
spanning backdrop is found. This ensures that tiles still clear to a
spanning color. The tile cache background is reset on each new scene, so
it won't carry a "stale" backdrop color.

Differential Revision: https://phabricator.services.mozilla.com/D150036
2022-06-28 01:11:31 +00:00
Iulian Moraru de7e722be8 Backed out 7 changesets (bug 1698699) for causing bp-hybrid bustages on scale_yuv_argb. CLOSED TREE
Backed out changeset b2606be8a0cf (bug 1698699)
Backed out changeset 97f5dde2d55e (bug 1698699)
Backed out changeset edf2a2cb7803 (bug 1698699)
Backed out changeset 0cc8a5a2d484 (bug 1698699)
Backed out changeset 95c49f3cfc03 (bug 1698699)
Backed out changeset 7016afe1f7f4 (bug 1698699)
Backed out changeset f0da7c35e088 (bug 1698699)
2022-06-28 01:47:56 +03:00
Kelsey Gilbert fe09859644 Bug 1776468 - With pref for d3d11 debug layer, also ask for debug IDXGIFactory. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D150273
2022-06-27 21:40:53 +00:00
Nico Grunbaum 595ce349cf Bug 1698699 - P0 - remove use of deprecated libyuv int types;r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D150300
2022-06-27 20:40:01 +00:00
Jonathan Kew 782d6c08e7 Bug 1772225 - Implement a CGLayer-backed version of cairo_quartz_surface, to improve print/PDF output quality for pdf.js documents. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150128
2022-06-27 17:14:21 +00:00
Brad Werth b6d72eca9b Bug 1776474: Make UploadTexturePool check minimum size of temporary buffer vec. r=nical
This patch ensures that the calculation for unused temporary buffers can
never overflow via subtraction. Instead of counting buffers as they are
taken from the vec, it just keeps track of how many are left. If a
previous frame has generated a lot of temporary buffers, this will detect
that the current frame didn't use them all.

Differential Revision: https://phabricator.services.mozilla.com/D150271
2022-06-27 17:12:59 +00:00
Jonathan Kew 4d877eb687 Bug 1774631 - Fix typo in cairo-pdf-surface.c that causes us to get spuriously-rasterized PDF output. r=jrmuizel
There's a typo in the condition here, which results in returning CAIRO_INT_STATUS_UNSUPPORTED
in cases where that shouldn't be necessary. Fixing this gets me nice vector PDF output.

The bug is still present in upstream cairo trunk, so I'll report it there as well.

Differential Revision: https://phabricator.services.mozilla.com/D150381
2022-06-27 15:11:27 +00:00
Jamie Nicol 9b2022e57f Bug 1775480 - Log number of total and active renderers when EGL surface creation fails. r=gfx-reviewers,aosmond
The previous patch in this bug added crash annotations for the number
of total and currently active renderers. However, we are actually
interested in these values when the EGL surface creation fails, as
opposed to when we crash later on after failing to recover. This patch
adds the values to gfxCriticalNote at the time of the error.

Differential Revision: https://phabricator.services.mozilla.com/D150365
2022-06-27 14:13:26 +00:00
Glenn Watson 0c7933b0a3 Bug 1776621 - Remove per-item complex clips in wrench in favor of explicit clip-chains r=gfx-reviewers,lsalzman
A step towards removing specification of clips via old ClipId style in wrench.

Differential Revision: https://phabricator.services.mozilla.com/D150344
2022-06-27 05:56:46 +00:00
Glenn Watson 26ac926331 Bug 1776618 - Remove clip-node references from wrench r=gfx-reviewers,lsalzman
In future, it won't be possible to specify clip hierarchy by the
old ClipId identifier, so convert these ones to clip-chains now.

Differential Revision: https://phabricator.services.mozilla.com/D150342
2022-06-27 05:56:46 +00:00
Martin Stransky 3a7a803654 Bug 1774271 [Linux] Use DMABUF_SURFACE_EXPORT feature to control dmabuf surface export from EGLImage and disable that on Mesa/Intel and Mesa/AMD r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D149984
2022-06-27 05:54:52 +00:00
Iulian Moraru de1c46fa2a Backed out 4 changesets (bug 1773282) for causing bp-hybrid bustages on FFmpegLibWrapper. CLOSED TREE
Backed out changeset 0ec631549071 (bug 1773282)
Backed out changeset c370d6fa2f1f (bug 1773282)
Backed out changeset a69d65742893 (bug 1773282)
Backed out changeset 6c9325e96448 (bug 1773282)
2022-06-25 12:07:40 +03:00
stransky 20d789184c Bug 1773282 [Linux] Remove nsIGfxInfo::FEATURE_VAAPI and use nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING r=alwu
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING is used on all platforms so let's use it on Linux too and don't add new feature for Linux only.

Differential Revision: https://phabricator.services.mozilla.com/D149765
2022-06-25 05:24:47 +00:00
stransky dabbc69fa1 Bug 1773282 [Linux] Don't print VP8_HW_DECODE/VP9_HW_DECODE on about:support on Linux as it's not used there r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D149763
2022-06-25 05:24:46 +00:00
Botond Ballo 4befa03baa Bug 1776530 - Assert that APZUpdater::RunOnUpdaterThread() is not called directly from the updater thread. r=tnikkel
With the exception of the egde case scenarios in which
IsConnectedToWebRender() returns false.

Also add a comment warning that if RunOnUpdaterThread() were to be called
directly from the updater thread when connected to WebRender, the
implementation would be incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D150309
2022-06-25 04:33:51 +00:00
Botond Ballo 0fcaeddf43 Bug 1776530 - Rename APZUpdater::UsingWebRenderUpdaterThread() to IsConnectedToWebRender(). r=tnikkel
The earlier name dates back to a time when we could use WebRender
but not necessarily use a WebRender thread as the updater thread.

Also add a comment to list the remaining situatins in which this
function can return false.

Differential Revision: https://phabricator.services.mozilla.com/D150308
2022-06-25 04:33:51 +00:00
Kelsey Gilbert c6b76d3b9a Bug 1776465 - GLBlitHelper link failure should go down link failure branch. r=gfx-reviewers,lsalzman
Also, no reason not to complete iteration across uTex[012], as opposed
to breaking early once we hit the first one that isn't present.
A shader with e.g. uTex1 but not uTex0 is weird, but there's no reason
for it not to work.

Differential Revision: https://phabricator.services.mozilla.com/D150270
2022-06-24 18:29:58 +00:00
Lee Salzman cceb9a72ed Bug 1776348 - Only report TextureType::DMABUF for WebGL if actually supported. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D150218
2022-06-24 15:45:26 +00:00
criss 69db7542e5 Backed out changeset c71363131ad4 (bug 1776348) for causing build bustages on CanvasRenderer.cpp. CLOSED TREE 2022-06-24 18:34:25 +03:00
Lee Salzman f9d88396f2 Bug 1776348 - Only report TextureType::DMABUF for WebGL if actually supported. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D150218
2022-06-24 15:21:05 +00:00
Bobby Holley 28696910b9 Bug 1776096 - Bump WebRender crate versions. r=jrmuizel
We formerly published webrender to crates.io, but haven't done so in
several years. However, the in-tree version number still matches the
version published on crates.io, causing cargo-vet to flag that this is
something that should potentially be audited. We could silence that on
the cargo-vet side, but then if we ever starting publishing it again
we'd miss the nudge to certify the audit (which would be useful to
anyone consuming it). So bumping the versions to a not-yet-published
number is a good way to correctly articulate the situation.

Differential Revision: https://phabricator.services.mozilla.com/D150055
2022-06-24 04:11:26 +00:00
Marian-Vasile Laza ca94966846 Backed out 3 changesets (bug 1776096) for causing cargo bustages.
Backed out changeset d7bdddbc2edf (bug 1776096)
Backed out changeset f45836578ddd (bug 1776096)
Backed out changeset 2fcab932329e (bug 1776096)
2022-06-24 01:54:07 +03:00
Bobby Holley 18e520a71c Bug 1776096 - Bump WebRender crate versions. r=jrmuizel
We formerly published webrender to crates.io, but haven't done so in
several years. However, the in-tree version number still matches the
version published on crates.io, causing cargo-vet to flag that this is
something that should potentially be audited. We could silence that on
the cargo-vet side, but then if we ever starting publishing it again
we'd miss the nudge to certify the audit (which would be useful to
anyone consuming it). So bumping the versions to a not-yet-published
number is a good way to correctly articulate the situation.

Differential Revision: https://phabricator.services.mozilla.com/D150055
2022-06-23 22:15:26 +00:00
Marian-Vasile Laza a8c4de1417 Backed out changeset 859b4b866b60 (bug 1773109) for causing remote failures. CLOSED TREE 2022-06-24 01:24:34 +03:00
Narcis Beleuzu 9a4bc45bba Backed out 3 changesets (bug 1776096) for build bustages on Cargo.lock . CLOSED TREE
Backed out changeset 8d2b8b3af2ac (bug 1776096)
Backed out changeset 8e0ed786341b (bug 1776096)
Backed out changeset fe93a0ac4a3f (bug 1776096)
2022-06-23 23:29:50 +03:00
Bobby Holley 6239d0c6f8 Bug 1776096 - Bump WebRender crate versions. r=jrmuizel
We formerly published webrender to crates.io, but haven't done so in
several years. However, the in-tree version number still matches the
version published on crates.io, causing cargo-vet to flag that this is
something that should potentially be audited. We could silence that on
the cargo-vet side, but then if we ever starting publishing it again
we'd miss the nudge to certify the audit (which would be useful to
anyone consuming it). So bumping the versions to a not-yet-published
number is a good way to correctly articulate the situation.

Differential Revision: https://phabricator.services.mozilla.com/D150055
2022-06-23 20:16:14 +00:00
Brad Werth 2a2fb3dc86 Bug 1773109: Change tile cache backdrops to only guarantee visible coverage. r=gw
Previously, a tile cache backdrop was an opaque color that was guaranteed
to cover the entire tile cache rect. This change makes it so that the
backdrop must only cover the visible area. For compositors that support
native color layers, this allows native color layers to be used more
often.

To make this work, the tile cache background color is updated whenever a
spanning backdrop is found. This ensures that tiles still clear to a
spanning color. The tile cache background is reset on each new scene, so
it won't carry a "stale" backdrop color.

Differential Revision: https://phabricator.services.mozilla.com/D150036
2022-06-23 19:05:00 +00:00
David Shin aca7c3d4df Bug 1773493 - Use Rust's `ComputedTimingFunction` for IPDL. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149663
2022-06-23 17:07:13 +00:00
Andrew Osmond f29955e688 Bug 1776215 - Make font related prefs threadsafe. r=gfx-reviewers,jrmuizel
This allows us to access these prefs off the main thread, e.g. for DOM
workers using OffscreenCanvasRenderingContext2D's text methods.

Differential Revision: https://phabricator.services.mozilla.com/D150124
2022-06-23 15:21:25 +00:00
Lee Salzman 6c3fae5e86 Bug 1774304 - Support simple format conversions when blitting. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150071
2022-06-23 15:20:14 +00:00
Jeff Muizelaar c2582e4fc1 Bug 1776112 - Stop temporarily setting the building rect to the paint rect. r=mstange
This doesn't seem to serve any purpose anymore. MOZ_RELEASE_ASSERTing
if mBuildingRect is read during ::Paint doesn't show it happening
anywhere.

Differential Revision: https://phabricator.services.mozilla.com/D150066
2022-06-23 15:04:27 +00:00
Emilio Cobos Álvarez cbb5b58f4d Bug 1772555 - Use style interpolation code for gradients. r=nical
This ensures they're clamped on Animated -> sRGB conversion, and in the
future we'll have to implement different color spaces so we'll need to
use it anyways.

Differential Revision: https://phabricator.services.mozilla.com/D149792
2022-06-22 23:02:34 +00:00
Boris Chiou 6c723e6e0a Bug 1744850 - Drop ScrollTimeline:sTiming and introduce a normalized timing. r=birtles
`sTiming` is a hack and I believe animation-delay,
animation-iteration-count, animation-direction, and animation-fill-mode
should be meaningful for scroll-linked animations. (I will add the
tentative wpt in Bug 1775327.)

So we need to introduce a normalized timing when resolving the specified
timing.

Also, this patch makes the bug of printing scroll animations detectable.

No behavior is changed and I'd like to remove the magic values and do
normalization in Bug 1775327.

Note: Based on https://github.com/w3c/csswg-drafts/issues/4862 and
web-animations-2, we will introudce CSSNumberish for duration, current
time, and delay. That is, we will accept percentage for
animation-duration, animation-delay. However, Gecko doesn't support
CSSNumberish for those values, so we'd like to normalize these time values
in Bug 1775327. This patch is the 1st step: split the normalized
timing from the specified timing, and use it when resolving the
timing, for progress-based timeline.

Differential Revision: https://phabricator.services.mozilla.com/D149683
2022-06-22 21:19:30 +00:00
Glenn Watson fb6ca66ec6 Bug 1775369 - Make hit-test API use clip-chains rather than ClipId r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D149938
2022-06-22 19:55:26 +00:00
Mike Conley af9dec9a76 Bug 1773865 - Dispatch an event on the window document when a pinch zoom gesture ends. r=botond,smaug,NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D149283
2022-06-22 19:40:17 +00:00
Iulian Moraru 0ebda972c1 Backed out changeset 003cad9bbcc6 (bug 1772555) for causing reftest failures on bugs/1315113-1.html. 2022-06-22 22:00:53 +03:00
Norisz Fay 10b3954a76 Backed out changeset 4230bdcf07ae (bug 1773865) for causing bc failures browser_zoom_commands.js CLOSED TREE 2022-06-22 20:13:23 +03:00
Emilio Cobos Álvarez 827fe3a33e Bug 1772555 - Use style interpolation code for gradients. r=nical
This ensures they're clamped on Animated -> sRGB conversion, and in the
future we'll have to implement different color spaces so we'll need to
use it anyways.

Differential Revision: https://phabricator.services.mozilla.com/D149792
2022-06-22 17:00:56 +00:00
Mike Conley acc5c41175 Bug 1773865 - Dispatch an event on the window document when a pinch zoom gesture ends. r=botond,smaug,NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D149283
2022-06-22 16:15:57 +00:00
Jamie Nicol 00cdec76f5 Bug 1775480 - Add more crash annotations for bug 1772839. r=gfx-reviewers,aosmond
Add crash annotations for the total number of webrender renderers, as
well as the number that are currently not paused, as this error could
be caused by having multiple renderers in a resumed state
concurrently. Additionally, add some gfxCriticalNotes for potentially
relevant error cases.

Differential Revision: https://phabricator.services.mozilla.com/D150000
2022-06-22 15:31:56 +00:00
serge-sans-paille 5b0ab0f5a6 Bug 1775340 - Cleanup gfx/ includes r=sylvestre
This one is a bit messy so I was very conservative on the changes.

Differential Revision: https://phabricator.services.mozilla.com/D149922
2022-06-22 09:50:52 +00:00
Chris Peterson c1c9a048ec Bug 1775162 - Fix C++20 build error in BSPPolygon template class definition. r=gfx-reviewers,jrmuizel
gcc -std=c++20 (but not clang -std=c++20) complains about template class definitions that specify the template parameter on the class constructor.

In file included from /builds/worker/workspace/obj-build/dist/include/nsDisplayList.h:43,
from /builds/worker/workspace/obj-build/dist/include/mozilla/layout/RemoteLayerTreeOwner.h:17,
from /builds/worker/workspace/obj-build/dist/include/mozilla/dom/BrowserParent.h:23,
from /builds/worker/checkouts/gecko/accessible/ipc/other/RemoteAccessible.cpp:13:
/builds/worker/workspace/obj-build/dist/include/mozilla/layers/BSPTree.h:30:18: error: expected ')' before '*' token
|   BSPPolygon<T>(T* aData, gfx::Polygon&& aGeometry)
|                ~ ^

Differential Revision: https://phabricator.services.mozilla.com/D149813
2022-06-22 04:06:47 +00:00
Emilio Cobos Álvarez 7829e5aab5 Bug 1774378 - Make select code harder to mess up. r=Gijs
Right now we rely on the menulist to be injected by hand in all the
relevant windows. Instead create it lazily, making the select code more
standalone.

The DevTools window was missing it, for example.

Differential Revision: https://phabricator.services.mozilla.com/D149620
2022-06-21 21:42:58 +00:00
Glenn Watson a523865d98 Bug 1775189 - Switch `push_stacking_context` API to be clip-chain based r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D149845
2022-06-21 21:09:24 +00:00
Glenn Watson d784bfaee9 Bug 1775188 - Remove direct use of ClipId on stacking contexts r=gfx-reviewers,lsalzman
In future, stacking contexts, hit-tests and prims will all use
clip-chains rather than the old-style ClipId references.

Differential Revision: https://phabricator.services.mozilla.com/D149844
2022-06-21 20:23:59 +00:00
criss 89867d6a26 Backed out changeset da8c34fec36e (bug 1773865) for causing mochitest failures on browser_zoom_commands.js. CLOSED TREE 2022-06-21 22:03:04 +03:00
Mike Conley 8ebd805e62 Bug 1773865 - Dispatch an event on the window document when a pinch zoom gesture ends. r=botond,smaug,NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D149283
2022-06-21 14:02:19 +00:00
Robert Mader 324edb90ae Bug 1758473 - Move VA-API test into glxtest, r=stransky
Some VA-API drivers are so broken that trying to use them
crashes Firefox. This is nothing entirely new for GPU drivers
and which is why we have `glxtest`.

Thus move the test from `VAAPIUtils` there. This has the
additional benefit of only doing the test once.

Given the importance of GL-accelerated rendering these days,
we don't want failing VA-API drivers to disable hardware
Webrender and WebGL. Thus fork the VA-API test into its
own process.

Differential Revision: https://phabricator.services.mozilla.com/D148981
2022-06-21 08:45:27 +00:00
Botond Ballo f76d3a476c Bug 1772646 - Make GetStartupTime() non-static. r=hiro
If it's static, every translation unit gets its own copy of
the static local variable sStartupTime.

Since it's defined in a header, we make it inline instead.

Differential Revision: https://phabricator.services.mozilla.com/D149811
2022-06-20 21:30:38 +00:00
Jonathan Kew c3f962f2b2 Bug 1775125 - Avoid duplicate call to hypotf() in FlattenedPath::ComputePointAtLength. r=gfx-reviewers,jrmuizel,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D149788
2022-06-20 17:32:45 +00:00
stransky 1cdfeeec54 Bug 1774075 [Linux] Don't use EGL_MESA_image_dma_buf_export on mesa/radeonsi driver r=jgilbert
Don't use EGL_MESA_image_dma_buf_export on Mesa/radeonsi driver due to multi-thread crash there (https://gitlab.freedesktop.org/mesa/mesa/-/issues/6666)

Differential Revision: https://phabricator.services.mozilla.com/D149238
2022-06-20 10:14:41 +00:00
Botond Ballo 5d687c962b Bug 1771503 - Disable the 'two layers that scroll together' assertion for matrices with Inf or NaN elements. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D149466
2022-06-17 23:50:49 +00:00
Chris Peterson 33e4a145c6 Bug 1774522 - Make Skia C++20 compatible by replacing deprecated std::result_of_t. r=lsalzman
The C++ std library functions `std::result_of` and `std::result_of_t` were deprecated in C++17 and removed in C++20.

Upstream Skia removed use of `std::result_of_t` in 2021, so we can just copy upstream's new replacement code:

https://skia.googlesource.com/skia/+/7d8cdd5b7f277f3b661e1eea067cf45a467572c6%5E%21/
https://skia.googlesource.com/skia/+/dc976a96ea388ae49fd0ce18d5a07d8fc15779cf%5E%21/

Because we're just extracting code from upstream, our local changes here can be safely overwritten whenever we next vendor a new Skia version.

Differential Revision: https://phabricator.services.mozilla.com/D149490
2022-06-17 02:13:46 +00:00
Lee Salzman 4963ce29fb Bug 1773936 - Apply Skia-equivalent subpixel rounding in DrawTargetWebgl. r=aosmond,gfx-reviewers
Depending on the current transform, Skia applies either subpixel rounding or integer
rounding to different coordinate axes of the transformed glyph position. If we don't
correctly predict which of these are applied, we may have aliased cache entries that
round to the same value in DrawTargetWebgl but for which Skia under the hood rounds
in entirely different directions. When this happens, glyphs can get hinted to the
wrong direction. To fix this, we need to ensure that we appropriately apply either
subpixel rounding or integer rounding in the same manner as Skia.

Differential Revision: https://phabricator.services.mozilla.com/D149350
2022-06-16 21:39:07 +00:00
Jonathan Kew d58446c275 Bug 1772189 - Avoid potential infinite recursion when initializing vertical metrics, if the font has a broken 'vmtx' table. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D148928
2022-06-16 12:38:35 +00:00
Lee Salzman 5cf73489a8 Bug 1769082 - Avoid divide-by-zero in Skia's luminosity blend mode. r=jrmuizel,gfx-reviewers
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.

Differential Revision: https://phabricator.services.mozilla.com/D149030
2022-06-16 03:39:41 +00:00
Butkovits Atila 297c111411 Backed out changeset f292760857f2 (bug 1769082) for causing build bustages at SkRasterPipeline_opts. CLOSED TREE 2022-06-16 06:18:27 +03:00
Lee Salzman 09080ca408 Bug 1769082 - Avoid divide-by-zero in Skia's luminosity blend mode. r=jrmuizel,gfx-reviewers
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.

Differential Revision: https://phabricator.services.mozilla.com/D149030
2022-06-16 02:31:24 +00:00
Jan-Erik Rediger 51f960bd09 Bug 1773255 - Update to Glean v50.1.0 r=chutten,supply-chain-reviewers
Including glean_parser 6.1.1

Two important things in there:
* glean_parser: [data-review] Include extra keys' names and descriptions in data review template
* Glean: Derive `serde::{Deserialize, Serialize}` on `Lifetime` and `CommonMetricData`

Differential Revision: https://phabricator.services.mozilla.com/D149381
2022-06-15 15:39:33 +00:00
Emilio Cobos Álvarez 37f45fa980 Bug 1773924 - Simplify nsDeviceContext code dealing with DPI changes. r=jfkthame
This in-out parameter business used to be necessary (bug 1249279), but
we don't propagate the new widget scale to remote documents (which are
the common case now) and we seem to be doing just fine without that, so
I'm not sure why this would be needed anymore.

Also simplify some unit conversions while at it.

Differential Revision: https://phabricator.services.mozilla.com/D149032
2022-06-15 09:57:38 +00:00
Jonathan Kew 0f30176a40 Bug 1774192 - Build harfbuzz with MT support. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D149241
2022-06-15 08:13:01 +00:00
Botond Ballo 2c303ddd7c Bug 1773256 - Use ProjectPoint when transforming coordinates from parent to child in BrowserParent. r=tnikkel
This patch also backs out the incorrect fix for bug 1745834
(see comment 12 on the bug for an explanation).

Differential Revision: https://phabricator.services.mozilla.com/D149321
2022-06-15 05:29:52 +00:00
Razvan Cojocaru 92f59ee7ac Bug 1773382 - Change the return type of GetPaintedLayerScaleForFrame() to MatrixScales. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D148764
2022-06-14 21:54:55 +00:00
Emilio Cobos Álvarez ee23efc9b5 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 15:01:52 +00:00
Norisz Fay 60ea7706bd Backed out changeset da5c71190673 (bug 1773813) for causing build bustages CLOSED TREE 2022-06-14 15:13:58 +03:00
Emilio Cobos Álvarez c64d0fcaa6 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 11:37:25 +00:00
Robert Mader d8d4d7a87a Bug 1773377 - Try EGL device platform for headless contexts, r=stransky,jgilbert
On multi-GPU setups, EGLs "surfaceless" platform may pick the wrong device.
There is a very recent extension which solves this issue,
`EGL_EXT_explicit_device`, however it states:
> Using EGL_EXT_explicit_device with EGL_MESA_platform_surfaceless is
> functionally identical to EGL_EXT_platform_device.

Thus, if we previously detected a render node device, use
`EGL_EXT_platform_device` to create the display in headless scenarios.

For all other cases, notably ARM SOCs where
`EGL_DRM_RENDER_NODE_FILE_EXT` is not yet availble, continue to
fall back to the surfaceless platform.

Note: this patch also does some cleanups. Most importantly,
`EGL_MESA_platform_surfaceless` is a client extension, not a
display extension. The check for it must thus always have failed.
Instead, check for it before trying to use it when creating the
display.
Also remove the rendundant redifinition in `GLDefs.h` - it's
already included in the upstream EGL headers.

Differential Revision: https://phabricator.services.mozilla.com/D148946
2022-06-13 23:15:37 +00:00