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

3869 Коммитов

Автор SHA1 Сообщение Дата
Ben Dean-Kawamura b3c3067e2b Bug 1888683 - Upgrade UniFFI to 0.27.1. r=janerik,glandium,supply-chain-reviewers,mach-reviewers,android-reviewers,kaya
Update:
  - UniFFI to 0.27.1
  - Glean to 59.0.0
  - App-services to a recent version

This removes the need for the goblin build hack, although we still have
duplicate versions of goblin since UniFFI is ahead of the moz-central
version.  I think that should be easy to resolve as a follow-up.

Updating uniffi-bindget-gecko-js based on upstream changes:
  - Clone objects before lowering them
    (https://github.com/mozilla/uniffi-rs/pull/1880)
  - Use u64 for the RustBuffer length and capacity field
    (https://github.com/mozilla/uniffi-rs/pull/1978)

I didn't implement the new callback interface VTable code.  Instead I
simply disabled the one fixture that tests it.  I'd rather implement
https://bugzilla.mozilla.org/show_bug.cgi?id=1888668 first, since that
will simplify the process a bunch. The only real-world use-case for
callbacks that I know of is Mark's logging changes, but that will
require implementing trait interfaces anyways so I'd rather wait than
write a bunch of C++ code that we then throw away.

Differential Revision: https://phabricator.services.mozilla.com/D206130
2024-04-08 15:07:50 +00:00
Sandor Molnar 18fb6ed6e9 Backed out changeset 19552414c809 (bug 1888628) for causing wrench bustages as a result of backing out Bug 1889600, Bug 1885571, Bug 1888400, Bug 1887837 CLOSED TREE 2024-04-05 20:18:33 +03:00
Natalia Csoregi 89f6860d48 Backed out 6 changesets (bug 1889600, bug 1885571, bug 1888400, bug 1887837) for causing multiple regressions. CLOSED TREE
Backed out changeset e46f0595d1cf (bug 1889600)
Backed out changeset 9f62b9886f80 (bug 1888400)
Backed out changeset 730836e9a9e4 (bug 1887837)
Backed out changeset 29e1542a7502 (bug 1885571)
Backed out changeset 3fc7d72e1ea3 (bug 1888400)
Backed out changeset 3f6f515b10c4 (bug 1888400)
2024-04-05 19:28:00 +03:00
Nicolas Silva 5e480475a2 Bug 1888628 - Extract the texture sampling logic out of ps_quad.glsl. r=gw
This simplifies the common infrastructure, removes two varyings from the common set and will allow other patterns to handle sampling differently if they need it (for example an upcoming repeating pattern).

In addition:
 - the color parameter is always passed to the fragment shader (it used to be only when no uv_rect was passed).
 - v_flags was reorganized a bit so that w is used by the common infrastructure and xyz are available for patterns to use.

Differential Revision: https://phabricator.services.mozilla.com/D206098
2024-04-05 09:05:16 +00:00
Nicolas Silva f5cae1e362 Bug 1889600 - Don't produce commands if all of the quad segments are discarded. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D206664
2024-04-04 18:38:22 +00:00
Jamie Nicol 3012aeb6c2 Bug 1886739 - Give position: sticky items their own picture cache slice r=gfx-reviewers,gw
position: sticky items scroll independently of their containing
content, resulting in large amounts of picture cache invalidation when
scrolling, causing poor performance. This patch attempts to give them
their own picture cache slice in order to avoid that invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D206502
2024-04-04 12:57:00 +00:00
Norisz Fay afbf5a07c9 Backed out changeset d5a2008c802b (bug 1886739) for causing failures on position-sticky-fractional-offset.html CLOSED TREE 2024-04-04 13:11:06 +03:00
Nicolas Silva ad5cc8b598 Bug 1889415 - Classify slow frames and show the details in the overlay. r=gw
This patch looks at slow frames that affect scrolling or animations specifically, and count them and looks at what phase took the longest during the slow frame (frame build, uploads and render). This data is continuously collected including while the profiler is not shown, so towards the end of a long browsing session or just after having looked at a test case we can see an approxiation of what caused the most jank.

Differential Revision: https://phabricator.services.mozilla.com/D206516
2024-04-04 08:41:56 +00:00
Jamie Nicol 107fb35dc7 Bug 1886739 - Give position: sticky items their own picture cache slice r=gfx-reviewers,gw
position: sticky items scroll independently of their containing
content, resulting in large amounts of picture cache invalidation when
scrolling, causing poor performance. This patch attempts to give them
their own picture cache slice in order to avoid that invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D206502
2024-04-04 08:22:48 +00:00
Nicolas Silva 2f06665426 Bug 1888400 - Add a test. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D206099
2024-04-03 12:45:01 +00:00
Nicolas Silva 30108b870e Bug 1887837 - Conic gradient quad shader. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D205985
2024-04-03 12:45:01 +00:00
Nicolas Silva 7a3e6b8188 Bug 1885571 - Quad radial gradient shader. r=gw
For now we skip the quad path if the gradient is tiled. The plan is to add a repeating quad pattern that can repeat the result of a render task and get all quad patterns to use that.

Differential Revision: https://phabricator.services.mozilla.com/D204774
2024-04-03 12:45:00 +00:00
Nicolas Silva 68225803ac Bug 1888400 - Fix quad nine-patches for non-color primimitves. r=gw
The loop was submitting a single command in the command buffer, always using the textured quad shader which worked when the interior is a solid color but not for other patterns.
This patch goes over the nine-patch segments twice, first generating a segmented primitive for the interrior with the appropriate pattern shader, and then the corners with the textured shader.

The patch tries to stay in the spirit of the existing code. I'm not super fond of the result. If the pattern isn't opaque the nine-patch will batch poorly since the both the interrior and corner parts are batched using the same rect. Also I suspect we'll find that we need more flexibility if/when we implement borders using quads. By then we'll probably have a clearer idea of the best way to handle segments in general.

Differential Revision: https://phabricator.services.mozilla.com/D206036
2024-04-03 12:45:00 +00:00
Nicolas Silva 2b186c6c75 Bug 1888400 - Rename add_segment into add_render_task. r=gw
And hoist the create_task condition out. This makes it easier to see what's going on.

Differential Revision: https://phabricator.services.mozilla.com/D206035
2024-04-03 12:44:59 +00:00
Mike Hommey 4fed4c1aa2 Bug 1889239 - Remove unused RenderedDocument::is_new_scene and CompactionChange::old_id. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D206430
2024-04-03 06:52:43 +00:00
Iulian Moraru 8934b4bd6e Backed out 5 changesets (bug 1888400, bug 1887837, bug 1885571) for causing reftest failures on radial-size-1a.html. CLOSED TREE
Backed out changeset b8e93a704beb (bug 1888400)
Backed out changeset b15f6d439444 (bug 1887837)
Backed out changeset 09548e11b44f (bug 1885571)
Backed out changeset 0fd0f35dc653 (bug 1888400)
Backed out changeset d9e0b8db1532 (bug 1888400)
2024-04-02 21:57:31 +03:00
Nicolas Silva dd256aeff4 Bug 1888400 - Add a test. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D206099
2024-04-02 16:36:06 +00:00
Nicolas Silva 691ba4c40c Bug 1887837 - Conic gradient quad shader. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D205985
2024-04-02 16:36:05 +00:00
Nicolas Silva 5a8b3cbb11 Bug 1885571 - Quad radial gradient shader. r=gw
For now we skip the quad path if the gradient is tiled. The plan is to add a repeating quad pattern that can repeat the result of a render task and get all quad patterns to use that.

Differential Revision: https://phabricator.services.mozilla.com/D204774
2024-04-02 16:36:05 +00:00
Nicolas Silva 5b601a8f8b Bug 1888400 - Fix quad nine-patches for non-color primimitves. r=gw
The loop was submitting a single command in the command buffer, always using the textured quad shader which worked when the interior is a solid color but not for other patterns.
This patch goes over the nine-patch segments twice, first generating a segmented primitive for the interrior with the appropriate pattern shader, and then the corners with the textured shader.

The patch tries to stay in the spirit of the existing code. I'm not super fond of the result. If the pattern isn't opaque the nine-patch will batch poorly since the both the interrior and corner parts are batched using the same rect. Also I suspect we'll find that we need more flexibility if/when we implement borders using quads. By then we'll probably have a clearer idea of the best way to handle segments in general.

Differential Revision: https://phabricator.services.mozilla.com/D206036
2024-04-02 16:36:04 +00:00
Nicolas Silva 1b86e441fd Bug 1888400 - Rename add_segment into add_render_task. r=gw
And hoist the create_task condition out. This makes it easier to see what's going on.

Differential Revision: https://phabricator.services.mozilla.com/D206035
2024-04-02 16:36:04 +00:00
Nicolas Silva 8a8a641739 Bug 1888172 - Tighten the zero-sized render task assertion. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D205869
2024-04-02 08:02:59 +00:00
Cristian Tuns 260cef1854 Bug 1889034 - Fix webrender bustages. CLOSED TREE 2024-04-02 04:11:23 -04:00
Mike Hommey 04e042263a Bug 1889034 - Remove unused code from webrender. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D206327
2024-04-02 07:36:16 +00:00
Mike Hommey f180eee1c1 Bug 1889034 - Remove redundant imports from webrender. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D206325
2024-04-02 07:36:15 +00:00
Mike Hommey 1f126d744d Bug 1889034 - Remove redundant imports from wr_glyph_rasterizer. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D206324
2024-04-02 07:36:15 +00:00
Mike Hommey b870c27c22 Bug 1889034 - Remove redundant import from peek-poke. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D206306
2024-04-02 07:36:14 +00:00
Cristian Tuns 4009445519 Backed out changeset 17a7276c3e46 (bug 1885571) for causing webrender bustages in radial-large.yaml CLOSED TREE 2024-03-28 05:34:41 -04:00
Nicolas Silva f975970224 Bug 1885571 - Quad radial gradient shader. r=gw
For now we skip the quad path if the gradient is tiled. The plan is to add a repeating quad pattern that can repeat the result of a render task and get all quad patterns to use that.

Differential Revision: https://phabricator.services.mozilla.com/D204774
2024-03-28 09:08:07 +00:00
Glenn Watson c35bce228b Bug 1887810 - Use quad-mask path for clip-out mode r=gfx-reviewers,nical
This is needed in order to support box-shadow rendering via the
quad rendering paths.

Differential Revision: https://phabricator.services.mozilla.com/D205670
2024-03-27 19:37:44 +00:00
Nicolas Silva 8b5800820d Bug 1883336 - Make patterns work for composited quads. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204773
2024-03-21 15:15:55 +00:00
Glenn Watson 39669a7331 Bug 1886231 - Fix batching of sub-pass clip masks r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D205096
2024-03-20 12:26:32 +00:00
Nicolas Silva d83bef85f7 Bug 1883336 - Pass two ints instead of one as shader input. r=gw
It's convenient for shaders that need to fetch data from two different places and we have a spare slot in the quad header. It's not strictly necessary if we want the spare slot for something else, since we could use the integer gpu buffer as an indirection for when we need more than one address (although that's a tad convoluted and inefficient).

Differential Revision: https://phabricator.services.mozilla.com/D204386
2024-03-19 13:24:51 +00:00
Nicolas Silva 5c1d566236 Bug 1883336 - Reformat the imports in quad.rs. r=gfx-reviewers,jrmuizel
This way rust-analyzer stops constantly trying to put it all in a single line.

Differential Revision: https://phabricator.services.mozilla.com/D204040
2024-03-19 13:24:51 +00:00
Nicolas Silva 486ebc6356 Bug 1883336 - Inline BatchBuilder::add_quad_to_batch. r=gw
A minor cosmetic thing. It does not do much so that's one less indrection when following the code.

Differential Revision: https://phabricator.services.mozilla.com/D204039
2024-03-19 13:24:50 +00:00
Nicolas Silva be547c4e77 Bug 1883336 - Simplify quad::add_to_batch. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204038
2024-03-19 13:24:50 +00:00
Nicolas Silva 775da41b21 Bug 1883336 - Move add_quad_to_batch to quad.rs. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204037
2024-03-19 13:24:49 +00:00
Nicolas Silva 01779172f7 Bug 1883336 - Some cleanup in quad.rs. r=gw"
Differential Revision: https://phabricator.services.mozilla.com/D204036
2024-03-19 13:24:49 +00:00
Nicolas Silva f46cc4d162 Bug 1883336 - Pass pattern intputs as a 32 bits payload to the quad shaders. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204018
2024-03-19 13:24:49 +00:00
Nicolas Silva fb0f490087 Bug 1883336 - Move the quad segmentation code into its own function. r=gw
Also add plumbing to specify the pattern for quad shaders.

Differential Revision: https://phabricator.services.mozilla.com/D203931
2024-03-19 13:24:48 +00:00
Nicolas Silva bdb4cd6ee1 Bug 1883336 - Pack the clip planes into 3 varying slots. r=gw
Moving vLocalPos from ps_quad_textured to ps_quad pushed the number of varying slots in ps_quad_mask over the limit (16). vLocalPos is going to be used by some patterns in addition to the texture code so ifdef'ing it out is inconvenient. It is simpler to win back a varying slot by packing the clip planes.

Differential Revision: https://phabricator.services.mozilla.com/D204229
2024-03-19 13:24:48 +00:00
Nicolas Silva d5877c39a2 Bug 1883336 - Extract the quad pattern logic into specific entry points. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D203421
2024-03-19 13:24:47 +00:00
Mike Hommey 17bc119013 Bug 1878779 - Mark fields rust 1.77 thinks are dead code as being allowed. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D204994
2024-03-18 22:21:36 +00:00
Jamie Nicol 529f04f4cd Bug 1884791 - Avoid shader miscompilation on some Adreno drivers. r=gw
Webrender's glslopt-optimized shaders encounter a miscompilation on
some Adreno driver versions regarding fetching empty clip tasks. This
patch reshuffles the code in such a way as to avoid the
bug. Unfortunately the specific cause of the miscompilation remains
unknown, meaning we must take extra care not to regress it in the
future.

Differential Revision: https://phabricator.services.mozilla.com/D204864
2024-03-17 21:30:11 +00:00
Nicolas Silva f9be6d5664 Bug 1769492 - Don't assume that get_surface_rect returns a non-empty rect. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204228
2024-03-14 14:10:31 +00:00
Nicolas Silva f226f4d4f4 Bug 1769492 - Ensure that get_surface_rect does not produce a zero-sized rect. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204198
2024-03-14 14:10:30 +00:00
Nicolas Silva 0ddba41758 Bug 1883863 - Assert that the device pixel scale is valid in get_surface_rect. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D203912
2024-03-14 14:10:30 +00:00
Nicolas Silva 6bf53b93ec Bug 1883873 - Make SurfaceInfo::get_surface_rect return a DeviceIntRect. r=gfx-reviewers,gw
While investigating why get_surface_rect sometimes returns an empty rect (causing bad render task sizes), I noticed that all users of get_surface_rect use it to size surfaces, rely on the returned rect to be snapped to integer coordinates, and some even round the coordinates a second time. The documentation of the function states that its purpose is to provide a rect suitable for surface allocation. This patch bakes the expectation into the type and removes some redundant operations.

Differential Revision: https://phabricator.services.mozilla.com/D203738
2024-03-14 14:10:29 +00:00
Jamie Nicol 8eec7483d5 Bug 1884583 - Make some of cs_border_segment's varyings highp. r=gw
The vClipRadii varying being changed to mediump is causing borders to
be clipped incorrectly at certain zoom levels. This patch reverts it
to highp to avoid the issue.

As a precaution it conservatively reverts several other varyings in
this shader to be highp as well. Although the others are not
responsible for the issue reported in this bug, using mediump for
varyings related to positioning could cause similar problems.

Differential Revision: https://phabricator.services.mozilla.com/D204507
2024-03-13 19:49:16 +00:00
Cristian Tuns 3e6b85b182 Backed out 4 changesets (bug 1883863, bug 1883873, bug 1769492) for causing webrender bustages in conftest.c CLOSED TREE
Backed out changeset 987284103c26 (bug 1769492)
Backed out changeset dd1b3d97c6a8 (bug 1769492)
Backed out changeset 4effb464f604 (bug 1883863)
Backed out changeset eae4f8752721 (bug 1883873)
2024-03-13 06:22:58 -04:00
Nicolas Silva 3575a6ca31 Bug 1769492 - Don't assume that get_surface_rect returns a non-empty rect. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204228
2024-03-13 10:03:34 +00:00
Nicolas Silva 643a9142a2 Bug 1769492 - Ensure that get_surface_rect does not produce a zero-sized rect. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D204198
2024-03-13 10:03:33 +00:00
Nicolas Silva 21e20568c2 Bug 1883863 - Assert that the device pixel scale is valid in get_surface_rect. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D203912
2024-03-13 10:03:33 +00:00
Nicolas Silva fd092aba3f Bug 1883873 - Make SurfaceInfo::get_surface_rect return a DeviceIntRect. r=gfx-reviewers,gw
While investigating why get_surface_rect sometimes returns an empty rect (causing bad render task sizes), I noticed that all users of get_surface_rect use it to size surfaces, rely on the returned rect to be snapped to integer coordinates, and some even round the coordinates a second time. The documentation of the function states that its purpose is to provide a rect suitable for surface allocation. This patch bakes the expectation into the type and removes some redundant operations.

Differential Revision: https://phabricator.services.mozilla.com/D203738
2024-03-13 10:03:33 +00:00
Jan-Erik Rediger 56cf6c0d03 Bug 1884881 - Update Glean to v58.1.0. r=perry.mcmanis,supply-chain-reviewers,mach-reviewers
Depends on D204347

Differential Revision: https://phabricator.services.mozilla.com/D204348
2024-03-12 21:02:40 +00:00
Martin Robinson 31ff1d38e5 Bug 1884403 - WebRender should only depend on `glean` when building for Gecko r=jrmuizel
Make glean an optional dependency that is only enabled when building
WebRender for Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D204059
2024-03-09 15:30:27 +00:00
Cristian Tuns 733c776592 Backed out changeset f61047c33e3e (bug 1883336) for causing webrender bustages CLOSED TREE 2024-03-08 03:38:18 -05:00
Nicolas Silva 9b2ba87e17 Bug 1883336 - Extract the quad pattern logic into specific entry points. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D203421
2024-03-08 08:04:27 +00:00
Nicolas Silva cf4e9abd2b Bug 1884145 - Document the quad rendering strategy. r=gw
And reorganize the branches in get_prim_render_strategy to reduce nesting

Differential Revision: https://phabricator.services.mozilla.com/D203919
2024-03-08 08:02:06 +00:00
Glenn Watson 366b710de2 Bug 1883932 - Add R16 support to texture upload pool r=sotaro,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203973
2024-03-07 23:48:58 +00:00
Nicolas Silva 0a29a8b9e5 Bug 1883585 - Add more context to the invalid render task size crash. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D203757
2024-03-06 22:44:39 +00:00
Mike Hommey 6d220051eb Bug 1883572 - Add enough support for iOS to webrender so that it builds. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D203563
2024-03-05 21:04:12 +00:00
Jamie Nicol 07ef15d3de Bug 1859100 - Correctly track whether any ancestor spatial node is zooming. r=gw
When updating the SpatialTree we record whether each spatial node is
itself or any of its ancestors are actively async zooming. This allows
us to make certain optimizations, such as low-quality pinch zoom mode,
or rounding the raster scale for glyphs.

The current implementation of this, however, contains a bug which
means that a node's is_ancestor_or_self_zooming variable will only be
true when itself or its _direct_ ancestor are zooming, rather than
_any_ ancestor. On certain pages this means we are unable to make the
aforementioned optimizations, resulting in poor performance. This
patch rectifies this problem and adds a unit test.

Differential Revision: https://phabricator.services.mozilla.com/D203446
2024-03-05 12:55:30 +00:00
Nicolas Silva 9f4df070bc Bug 1882526 - Avoid zero-sized mask render tasks. r=gfx-reviewers,lsalzman
It is unexpected since adjust_mask_scale_for_max_size rounds the rectangle out but asserting it caused crash spikes (see bug 1882416). This patch will discard the primitive or segment instead of attempting to allocate an invalid mask. If this causes some popping, we'll get some context in the logs.

Differential Revision: https://phabricator.services.mozilla.com/D202944
2024-03-04 09:44:58 +00:00
Jamie Nicol a93bd35f32 Bug 1883064 - Re-rasterize picture cache tiles when scale doubles or halves during low-quality pinch zoom. r=gw
When low-quality-pinch-zoom is enabled we avoid updating the raster
scale whilst a zoom is active, in order to avoid expensive
re-rasterizations. As a result, however, zooming out a very long
way (ie from fully zoomed in to fully zoomed out) causes a huge number
of picture cache tiles to be on screen at once. Allocating this number
of textures causes extremely bad jank and potentially even OOM
crashes.

Additionally, when zooming in a very long way content appears very
blurry.

To avoid this, this patch updates the raster scale during a
low-quality pinch zoom whenever the zoom has doubled or halved since
the raster scale was last updated. This avoids the blurriness as well
as limiting the number of tiles on screen at once. This comes at the
cost of the occasional expensive frame when everything is
re-rasterized, but is a worthwhile trade-off.

Differential Revision: https://phabricator.services.mozilla.com/D203287
2024-03-04 07:06:37 +00:00
Chris H-C 00548e1042 Bug 1882615 - Vendor Glean SDK to v58.0.0 r=perry.mcmanis,supply-chain-reviewers,mach-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203187
2024-03-01 15:13:21 +00:00
Jamie Nicol a36300c436 Bug 1882828 - Ensure hard-coded batched texture uploads enabled state does not get overridden by pref. r=gfx-reviewers,lsalzman
Batched texture uploads are supposed to be hard-coded as enabled or
disabled on certain platforms, and on other platforms controllable via
a pref. However, a previous refactoring made it so that the hard-coded
value is always being overridden by the pref (by checking whether the
hard-coded value is set in the wrong place). As a consequence, batched
texture uploads have been disabled on Mali-G devices, resulting in
poor performance.

This patch moves the check to the correct place, meaning the
hard-coded value is respected once again.

Differential Revision: https://phabricator.services.mozilla.com/D203145
2024-03-01 14:32:39 +00:00
Nicolas Silva 9a5200723e Bug 1882044 - Add some context to a few crashes. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D202708
2024-02-28 15:01:04 +00:00
Sandor Molnar 20535c222d Merge mozilla-central to autoland. a=merge 2024-02-28 12:10:44 +02:00
Sandor Molnar e1b3f3ba7c Backed out changeset 76f0bd102fa8 (bug 1882044) for causing bug 1882416 bug 1882321 bug 1882367. CLOSED TREE 2024-02-28 12:04:20 +02:00
Nicolas Silva 08ecab4bdf Bug 1882070 - Make peek-poke generate unnamed constants. r=gfx-reviewers,gw
See:
 - https://github.com/rust-lang/rfcs/blob/master/text/3373-avoid-nonlocal-definitions-in-fns.md
 - https://doc.rust-lang.org/reference/items/constant-items.html#unnamed-constant

Peek-poke generate code that will likely be rejected by a future version of rust: implementation of traits inside an expression (the const in our case) that is visible outside of the expression. Fortunately there is an exception for unnamed consts (likely because of the existing ecosystem of macros that declare items in anonymous dummy consts to scope thinsg like imports). So this PR replaced the dummy _DERIVE_peek_poke_FOR_??? const with an unnamed one.

Differential Revision: https://phabricator.services.mozilla.com/D202715
2024-02-28 08:16:54 +00:00
Nicolas Silva 63aeff49c1 Bug 1882318 - Add some documentation to quad shaders. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D202831
2024-02-28 08:15:40 +00:00
Glenn Watson a7467e3971 Bug 1882414 - Remove cs_clip_image shader and related code r=gfx-reviewers,lsalzman
It's no longer used now that the quad-based image mask code
is stable and used everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D202889
2024-02-28 01:49:28 +00:00
Glenn Watson 64a8079591 Bug 1881978 - Support more than 32k render tasks r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202676
2024-02-26 20:10:15 +00:00
Nicolas Silva a57f6d4e7c Bug 1882044 - Add some context to a few crashes. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D202708
2024-02-26 17:32:07 +00:00
Dan Robertson f87409446c Bug 1872901 - Increase border width for rendered minimap. r=botond
- Increase the border of the rectangles rendered for the APZ minimap.
 - Alter the order in which the minimap rectangles are drawn, such that the
   larger rects are drawn first.

Differential Revision: https://phabricator.services.mozilla.com/D198203
2024-02-26 14:10:42 +00:00
Glenn Watson a9f0ff238f Bug 1881638 - Port quad instances to make use of int gpu buffer r=gfx-reviewers,lsalzman
This allows extending render task indices to 32 bits without
requiring an increase in the vertex / instance size.

Differential Revision: https://phabricator.services.mozilla.com/D202526
2024-02-25 19:43:59 +00:00
Chris Peterson 56ab38e8b3 Bug 1880013 - Update glslopt to 0.1.10 for C++20 fix. r=jnicol,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201850
2024-02-22 05:45:32 +00:00
Glenn Watson 1c6f889400 Bug 1881182 - Make GpuBuffer generic and support integer buffers r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202289
2024-02-22 03:40:16 +00:00
Cristina Horotan ae7af22030 Backed out changeset 2a266cdaf3a6 (bug 1881182) for causing webrender build bustages. CLOSED TREE 2024-02-22 00:45:43 +02:00
Glenn Watson 535a5e5680 Bug 1881182 - Make GpuBuffer generic and support integer buffers r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202289
2024-02-21 21:53:22 +00:00
Cristian Tuns cb20af318d Backed out changeset 6c231ed79678 (bug 1880013) for causing wrench bustages CLOSED TREE 2024-02-19 17:16:09 -05:00
Chris Peterson 18f2e9fc2a Bug 1880013 - Update glslopt to 0.1.10 for C++20 fix. r=jnicol,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201850
2024-02-19 21:45:08 +00:00
Travis Long 05240e93a7 Bug 1879857 - Update Glean to v57.0.0. r=chutten,supply-chain-reviewers,mach-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201621
2024-02-13 20:47:02 +00:00
Jamie Nicol f140123e7d Bug 1879858 - Block GL_KHR_debug on Mali Valhall GPUs. r=gfx-reviewers,nical
On some Mali GPUs glPushDebugGroup and other functions from the
extension GL_KHR_debug always raise a GL_OUT_OF_MEMORY error. In debug
builds we automatically enable debug markers, as well as panicking
when encountering a GL error. This causes the GPU process to crash
repeatedly at startup, eventually falling back to software
webrender. To avoid this, we block the extension on affected devices.

Differential Revision: https://phabricator.services.mozilla.com/D201579
2024-02-13 18:03:56 +00:00
Mike Hommey fb2aa57149 Bug 1874035 - Add custom Debug derives for bitflags with custom derives. r=gfx-reviewers,emilio,ErichDonGubler
bitflags 2 has a shortcoming with using custom derives: you can't use
custom derives (for e.g. MallocSizeOf) at the same time as bitflags's for
the derives it supports.
See https://github.com/bitflags/bitflags/issues/395

Differential Revision: https://phabricator.services.mozilla.com/D199941
2024-01-30 21:13:29 +00:00
Perry McManis c314357a6d Bug 1874923 - Update Glean to 56.1.0 r=janerik,supply-chain-reviewers,mach-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D199093
2024-01-22 15:45:27 +00:00
Lee Salzman a8d122991e Bug 1872776 - Avoid multiplying by NaN in draw_perspective. r=gfx-reviewers,ahale
Differential Revision: https://phabricator.services.mozilla.com/D198772
2024-01-17 07:22:29 +00:00
mcarare 88903cc4ad Bug 1873677 - GeckoView Android API 34 (Android 14) r=jgraham,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D198175
2024-01-16 08:21:36 +00:00
Botond Ballo 9ee050bae2 Bug 1604280 - Implement an APZ minimap for WebRender. r=dlrobertson,gw
The APZ minimap is a debugging tool for Firefox developers, which can
be enabled with the pref apz.minimap.enabled.

When enabled, it shows a minimap overlay for every scroll frame, with
rects indicating the layout and visual viewports and the displayport.

We previously had an implementation for Layers that was removed when
Layers was removed. This patch is restoring an equivalent feature,
implemented for WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D190720
2023-12-21 19:02:32 +00:00
Botond Ballo 8dd9084e61 Bug 1604280 - Fix a bug in SpatialTree::get_world_transform_impl(). r=gw
The first branch (where the node is in the root coordinate system)
was not handling the TransformScroll::Unscrolled case, which should
use the scale/offset from the viewport transform rather than the
content transform.

Differential Revision: https://phabricator.services.mozilla.com/D196692
2023-12-21 19:02:32 +00:00
Jamie Nicol 99efeaadab Bug 1870413 - Allow creating TEXTURE_EXTERNAL_BT709 shaders on devices without image_external_essl3. r=gfx-reviewers,lsalzman
An oversight when updating the allowed shaders list in bug 1866020
assumed that devices without GL_OES_EGL_image_external_essl3 would
also not have GL_EXT_YUV_target. This turns out not to always be the
case, and results in a crash when attempting to initialize the shaders
on such devices.

This patch checks explicitly for GL_EXT_YUV_target when generating the
allowed shaders list.

Differential Revision: https://phabricator.services.mozilla.com/D196716
2023-12-18 18:04:56 +00:00
Glenn Watson 7df3cce96b Bug 1869994 - Fix overlapping underlay compositor surfaces with masks r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D196501
2023-12-17 19:54:38 +00:00
Jamie Nicol d20809a078 Bug 1866020 - Override buggy colorspace conversion on Pixel devices. r=gw,padenot,geckoview-reviewers,owlish
Pixel 6, 7, and 8 devices running Android 14 are affected by a bug
where video frames with SMPTE 432 color primaries are rendered
incorrectly when sampled from an external texture in GLES. To work
around this, we force these frames to be converted to RGB using BT709
colorspace instead. While this won't look exactly right, it is much
better than the current situation.

When we detect that a frame is decoded with that color space on an
affected device, we set a "ForceBT709" flag which gets passed through
to webrender as a new ImageBufferKind. Rendering this ImageBufferKind
is handled via a new shader feature TEXTURE_EXTERNAL_BT709, which
works much like the existing TEXTURE_EXTERNAL feature, but
additionally uses the EXT_YUV_TARGET extension to override the
colorspace transformation.

This approach could be extended in the future to handle additional
colorspace transformations, but for now only handles the one required
to workaround this particular driver bug.

Differential Revision: https://phabricator.services.mozilla.com/D195800
2023-12-14 10:45:08 +00:00
Narcis Beleuzu 4211076193 Backed out changeset 290917deea87 (bug 1866020) for wrench bustages. CLOSED TREE 2023-12-13 11:49:40 +02:00
Jamie Nicol 96a8082a23 Bug 1866020 - Override buggy colorspace conversion on Pixel devices. r=gw,padenot,geckoview-reviewers,owlish
Pixel 6, 7, and 8 devices running Android 14 are affected by a bug
where video frames with SMPTE 432 color primaries are rendered
incorrectly when sampled from an external texture in GLES. To work
around this, we force these frames to be converted to RGB using BT709
colorspace instead. While this won't look exactly right, it is much
better than the current situation.

When we detect that a frame is decoded with that color space on an
affected device, we set a "ForceBT709" flag which gets passed through
to webrender as a new ImageBufferKind. Rendering this ImageBufferKind
is handled via a new shader feature TEXTURE_EXTERNAL_BT709, which
works much like the existing TEXTURE_EXTERNAL feature, but
additionally uses the EXT_YUV_TARGET extension to override the
colorspace transformation.

This approach could be extended in the future to handle additional
colorspace transformations, but for now only handles the one required
to workaround this particular driver bug.

Differential Revision: https://phabricator.services.mozilla.com/D195800
2023-12-13 09:06:29 +00:00
Ben Dean-Kawamura aff73c9027 Bug 1867639 - Vendor in new application-services / Glean / UniFFI. r=markh,janerik,supply-chain-reviewers,mach-reviewers,ahal
Updated uniffi-bindgen-gecko-js to work with UniFFI 0.25.2:
- Use `config.toml` to list UniFFI sources.  This makes it easier to
  associate data with them, for example the `crate_name` field that's
  now required to generate the sources.
- Enable the `extern-rustbuffer` feature on `uniffi_core`
- Updated the external types fixture to work around
  https://github.com/mozilla/uniffi-rs/issues/1872

Ran mach vendor and mach cargo vet to update the Rust crates.

Differential Revision: https://phabricator.services.mozilla.com/D195163
2023-12-12 14:13:44 +00:00
Narcis Beleuzu 18393f328a Backed out 2 changesets (bug 1867639) for causing WR bustages
Backed out changeset b77038bd9fee (bug 1867639)
Backed out changeset cf885f915fdf (bug 1867639)
2023-12-05 22:35:09 +02:00
Ben Dean-Kawamura a889812ec8 Bug 1867639 - Vendor in new application-services / Glean / UniFFI. r=markh,janerik,supply-chain-reviewers,mach-reviewers,ahal
Updated uniffi-bindgen-gecko-js to work with UniFFI 0.25.2:
- Use `config.toml` to list UniFFI sources.  This makes it easier to
  associate data with them, for example the `crate_name` field that's
  now required to generate the sources.
- Enable the `extern-rustbuffer` feature on `uniffi_core`
- Updated the external types fixture to work around
  https://github.com/mozilla/uniffi-rs/issues/1872

Ran mach vendor and mach cargo vet to update the Rust crates.

Differential Revision: https://phabricator.services.mozilla.com/D195163
2023-12-05 19:55:30 +00:00
Cosmin Sabou 53ed8ec36a Bug 1866105 - Split core_text::font_descriptor into two lines to fix webrender tidy bustages. r=bustage-fix
CLOSED TREE
2023-12-05 13:28:56 +02:00