Commit Graph

4103 Commits

Author SHA1 Message Date
Lee Salzman
ad0210a389 Bug 1625606 - Use Skia's mac font smoothing handling. r=aosmond
Currently we try to alternate between light-on-dark and dark-on-light
text rendering masks on macOS depending on text colors. Historically,
this matched earlier versions of macOS reasonably well. In successive
versions of macOS, however, this approximation appears to have broken
down and no longer gives correct results.

Given that recent macOS versions no longer promotes font-smoothing at
all, it seems more reasonable to match Skia's font smoothing handling
because it appears to better work with these more recent versions while
requiring us to have less special code to do so.

Differential Revision: https://phabricator.services.mozilla.com/D229444
2024-11-19 18:38:48 +00:00
Adi
8f5f2fafde Backed out changeset 77fb278f9d8f (bug 1625606) for causing reftest failures @ext-subpixel-1.html. CLOSED TREE 2024-11-19 10:52:40 +02:00
Lee Salzman
ccba550402 Bug 1625606 - Use Skia's mac font smoothing handling. r=aosmond
Currently we try to alternate between light-on-dark and dark-on-light
text rendering masks on macOS depending on text colors. Historically,
this matched earlier versions of macOS reasonably well. In successive
versions of macOS, however, this approximation appears to have broken
down and no longer gives correct results.

Given that recent macOS versions no longer promotes font-smoothing at
all, it seems more reasonable to match Skia's font smoothing handling
because it appears to better work with these more recent versions while
requiring us to have less special code to do so.

Differential Revision: https://phabricator.services.mozilla.com/D229444
2024-11-19 07:37:51 +00:00
Jamie Nicol
8ea4bdb3a3 Bug 1929209 - Replace switch statement in cs_svg_filter_node's fragment shader with if/else ifs. r=gfx-reviewers,ahale
cs_svg_filter_node's fragment shader is effectively one giant switch
statement. Unfortunately the glsl-optimizer pass converts switch
statements in to a dreadful mess of if-elses, and the resulting shader
takes half a minute to compile on some Adreno devices.

As a short term fix, this patch replaces the switch statement with a
series of ifs and else ifs, which are much better than what the
optimizer produces. While this should result in better code on all
GPUs (minus a few where we do not use the optimized shaders), it will
be less efficient for SWGL. As a follow up we should fix the optimizer
to produce better code for switch statements, then revert this change.

Differential Revision: https://phabricator.services.mozilla.com/D229310
2024-11-18 13:52:02 +00:00
Nicolas Silva
97a365265c Bug 1929683 - Address clippy lints in webrender_build. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D228252
2024-11-18 09:57:16 +00:00
Nicolas Silva
d9d1b82a4b Bug 1929683 - Fix whitespace issues in frame_allocator.rs. r=gfx-reviewers,gw
I had put a lot of tabs in there somehow.

Differential Revision: https://phabricator.services.mozilla.com/D228251
2024-11-18 09:57:15 +00:00
Nicolas Silva
cb41f6bafa Bug 1929683 - Address clippy lints in peek-poke. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D228250
2024-11-18 09:57:15 +00:00
Nicolas Silva
0709d4fb7b Bug 1929683 - Fix some trivial clippy lints in webrender_api. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D228249
2024-11-18 09:57:14 +00:00
Nicolas Silva
e19acf0676 Bug 1929683 - Fix a number of trivial warnings in WebRender. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D228248
2024-11-18 09:57:14 +00:00
Glenn Watson
5a111ff5a1 Bug 1930411 - Split composite_simple to the occlusion + setup and a separate composite_pass method r=gfx-reviewers,lsalzman
No functional change here - but will make it easier to review follow
up patches that call `composite_pass` once per swapchain when using
the `Compositor2` trait.

Differential Revision: https://phabricator.services.mozilla.com/D228558
2024-11-11 19:10:13 +00:00
Jan-Erik Rediger
c882ef6160 Bug 1928630 - Vendor Glean SDK v62.0.0 r=janerik,supply-chain-reviewers,mach-reviewers,android-reviewers,ahal,boek
Differential Revision: https://phabricator.services.mozilla.com/D228093
2024-11-11 13:07:47 +00:00
Nicolas Silva
c251285770 Bug 1921981 - Adjust the image primitive to compensate for the difference in the picture's rasterized area. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D227256
2024-11-07 22:13:44 +00:00
Nicolas Silva
72bea5e8be Bug 1921980 - Retain snapshotted pictures in the resource cache. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D225227
2024-11-07 22:13:44 +00:00
Nicolas Silva
e966e635bb Bug 1921980 - Remove frame_state parameter from new_svg_filter_graph. r=gfx-reviewers,gw
This is done in order to untangle a borrow-checker knot and make it possible to call it from the closure in ResourceCache::render_as_image.

Differential Revision: https://phabricator.services.mozilla.com/D227371
2024-11-07 22:13:43 +00:00
Nicolas Silva
180d9435be Bug 1921980 - Add ResourceCache::render_as_image. r=gfx-reviewers,gw
The logic is similar to the render task cache with important differences:
 - If the function is called the tasks are always rendered (no check
   whether a previous frame already produced the image).
 - Since we want to associate the TextureCacheHandle with an ImageKey,
   to render it via a image items, the handle is managed by the resource
   cache rather than the render task cache.

Differential Revision: https://phabricator.services.mozilla.com/D227370
2024-11-07 22:13:42 +00:00
Nicolas Silva
cc93351050 Bug 1918133 - Stub stacking context snapshot API. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D225226
2024-11-07 22:13:42 +00:00
Glenn Watson
19612018f5 Bug 1929166 - Make occlusion tracker use a generic key r=gfx-reviewers,lsalzman
Follow up patches will make use of this to store some extra info
related to which swapchain layer should be used for a given tile.

Differential Revision: https://phabricator.services.mozilla.com/D227907
2024-11-07 20:11:50 +00:00
Stanca Serban
db768c13e8 Backed out 5 changesets (bug 1921980) for causing Linux wrench bustages. CLOSED TREE
Backed out changeset 70ae923fd74b (bug 1921980)
Backed out changeset ae3fdc5495a6 (bug 1921980)
Backed out changeset 53119e779c89 (bug 1921980)
Backed out changeset f4ad9697fb5d (bug 1921980)
Backed out changeset e4f2f5ea2563 (bug 1921980)
2024-11-07 16:14:38 +02:00
Nicolas Silva
f8763dc8d9 Bug 1921980 - Adjust the image primitive to compensate for the difference in the picture's rasterized area. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D227256
2024-11-07 13:18:12 +00:00
Nicolas Silva
ba1857c819 Bug 1921980 - Retain snapshotted pictures in the resource cache. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D225227
2024-11-07 13:18:12 +00:00
Nicolas Silva
8c83c7ee4e Bug 1921980 - Remove frame_state parameter from new_svg_filter_graph. r=gfx-reviewers,gw
This is done in order to untangle a borrow-checker knot and make it possible to call it from the closure in ResourceCache::render_as_image.

Differential Revision: https://phabricator.services.mozilla.com/D227371
2024-11-07 13:18:11 +00:00
Nicolas Silva
9172a7af86 Bug 1921980 - Add ResourceCache::render_as_image. r=gfx-reviewers,gw
The logic is similar to the render task cache with important differences:
 - If the function is called the tasks are always rendered (no check
   whether a previous frame already produced the image).
 - Since we want to associate the TextureCacheHandle with an ImageKey,
   to render it via a image items, the handle is managed by the resource
   cache rather than the render task cache.

Differential Revision: https://phabricator.services.mozilla.com/D227370
2024-11-07 13:18:11 +00:00
Nicolas Silva
facced4834 Bug 1921980 - Stub stacking context API. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D225226
2024-11-07 13:18:10 +00:00
Stanca Serban
9d6594adfa Backed out 6 changesets (bug 1921980) for causing snapshot area related wrench bustages. CLOSED TREE
Backed out changeset 9430536b14b2 (bug 1921980)
Backed out changeset ddf9bea4b718 (bug 1921980)
Backed out changeset f1fcd71a112b (bug 1921980)
Backed out changeset 51f4dc44dd7b (bug 1921980)
Backed out changeset cac0414bfcb8 (bug 1921980)
Backed out changeset cc9b213f6a2f (bug 1921980)
2024-11-07 11:30:01 +02:00
Nicolas Silva
0f0bfa6815 Bug 1921980 - Add a reftest. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D227968
2024-11-07 09:01:57 +00:00
Nicolas Silva
be82e29897 Bug 1921980 - Adjust the image primitive to compensate for the difference in the picture's rasterized area. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D227256
2024-11-07 09:01:56 +00:00
Nicolas Silva
c0c13f6ff1 Bug 1921980 - Retain snapshotted pictures in the resource cache. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D225227
2024-11-07 09:01:56 +00:00
Nicolas Silva
b58d15506b Bug 1921980 - Remove frame_state parameter from new_svg_filter_graph. r=gfx-reviewers,gw
This is done in order to untangle a borrow-checker knot and make it possible to call it from the closure in ResourceCache::render_as_image.

Differential Revision: https://phabricator.services.mozilla.com/D227371
2024-11-07 09:01:55 +00:00
Nicolas Silva
515b281af8 Bug 1921980 - Add ResourceCache::render_as_image. r=gfx-reviewers,gw
The logic is similar to the render task cache with important differences:
 - If the function is called the tasks are always rendered (no check
   whether a previous frame already produced the image).
 - Since we want to associate the TextureCacheHandle with an ImageKey,
   to render it via a image items, the handle is managed by the resource
   cache rather than the render task cache.

Differential Revision: https://phabricator.services.mozilla.com/D227370
2024-11-07 09:01:55 +00:00
Nicolas Silva
2072ff9bcb Bug 1921980 - Stub stacking context API. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D225226
2024-11-07 09:01:55 +00:00
Glenn Watson
9fc4345f17 Bug 1928285 - Add a skeleton for swapchain + directcomposition in wrench r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D227437
2024-11-07 00:17:01 +00:00
Butkovits Atila
d337c98ae6 Backed out 6 changesets (bug 1921980) for causing wrench bustages. CLOSED TREE
Backed out changeset d519011c078b (bug 1921980)
Backed out changeset 46b1ed75bb19 (bug 1921980)
Backed out changeset b14169d1c137 (bug 1921980)
Backed out changeset 877f329b665d (bug 1921980)
Backed out changeset bb7a2635293a (bug 1921980)
Backed out changeset 1fcd83380d56 (bug 1921980)
2024-11-06 12:40:21 +02:00
Nicolas Silva
6ea5daf2b3 Bug 1921980 - Add a reftest. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D227968
2024-11-06 10:00:20 +00:00
Nicolas Silva
1d04948aaf Bug 1921980 - Adjust the image primitive to compensate for the difference in the picture's rasterized area. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D227256
2024-11-06 10:00:19 +00:00
Nicolas Silva
ebaf54682d Bug 1921980 - Retain snapshotted pictures in the resource cache. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D225227
2024-11-06 10:00:19 +00:00
Nicolas Silva
667c242d70 Bug 1921980 - Remove frame_state parameter from new_svg_filter_graph. r=gfx-reviewers,gw
This is done in order to untangle a borrow-checker knot and make it possible to call it from the closure in ResourceCache::render_as_image.

Differential Revision: https://phabricator.services.mozilla.com/D227371
2024-11-06 10:00:18 +00:00
Nicolas Silva
2173a43538 Bug 1921980 - Add ResourceCache::render_as_image. r=gfx-reviewers,gw
The logic is similar to the render task cache with important differences:
 - If the function is called the tasks are always rendered (no check
   whether a previous frame already produced the image).
 - Since we want to associate the TextureCacheHandle with an ImageKey,
   to render it via a image items, the handle is managed by the resource
   cache rather than the render task cache.

Differential Revision: https://phabricator.services.mozilla.com/D227370
2024-11-06 10:00:17 +00:00
Nicolas Silva
a46bf73e7f Bug 1921980 - Stub stacking context API. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D225226
2024-11-06 10:00:17 +00:00
Glenn Watson
34ec41f9b9 Bug 1927932 - Update mozangle in wrench to 0.5.2. r=gfx-reviewers,lsalzman
This is necessary to export some Angle EGL extensions that are
used by the upcoming compositor changes.

Differential Revision: https://phabricator.services.mozilla.com/D227277
2024-11-05 19:18:18 +00:00
Jamie Nicol
4a0e63ddc4 Bug 1928322 - Switch android wrench tests from Samsung A51 to Samsung A55 and Pixel 6. r=gfx-reviewers,taskgraph-reviewers,jmaher,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D227518
2024-11-04 15:14:56 +00:00
Jamie Nicol
18b7864ecd Bug 1928322 - Block GL_KHR_debug on Samsung Xclipse GPUs. r=gfx-reviewers,aosmond
On Xclipse GPUs glGetDebugMessageLog() sometimes returns a larger
count that the count provided as its first argument. This results in
an index out of bounds panic inside gleam's get_debug_messages()
wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D227517
2024-11-04 15:14:55 +00:00
Jamie Nicol
0de494ca76 Bug 1928322 - Request GLES context by default on android in wrench. r=gfx-reviewers,aosmond
Currently we use glutin's GlRequest::GlThenGles when creating a GL
context. This first attempts to select bind the OpenGL API using
eglBindAPI, falling back to the OpenGL ES API if that fails.

Some Android devices (eg those with Xclipse GPUs) successfully allow
binding the OpenGL API, only for eglChooseConfig to subsequently
return zero available configs. This means using GlThenGles always
results in failure to create a GL context.

To avoid this, this patch makes us specifically request a GLES context
by default on Android. Note that this can still be overridden for
local testing using wrench's --renderer command line argument.

Differential Revision: https://phabricator.services.mozilla.com/D227516
2024-11-04 15:14:55 +00:00
Jamie Nicol
8caba5082c Bug 1928322 - Rework filter-blur-downscaled-task.yaml to avoid bug on Xclipse GPUs r=gfx-reviewers,aosmond
Xclipse GPUs appear render the diagonal linear gradient in this test
case at a slightly different scale than in its reference. This issue
is hardware-specific and unrelated to the bug that the test case is
designed to test.

This patch reworks the test case to use a horizontal linear gradient,
avoiding this issue. The underlying cause will be investigated and
fixed in bug 1928323.

Differential Revision: https://phabricator.services.mozilla.com/D227515
2024-11-04 15:14:54 +00:00
Jamie Nicol
6f1958e760 Bug 1928322 - Switch android wrench builds from arm7 to aarch64. r=gfx-reviewers,taskgraph-reviewers,jmaher,aosmond
Newer devices often only support aarch64 binaries, and we no longer
run on any 32bit devices in CI, so switch the default build
architecture. Developers will still be able to build arm7 binaries if
required for local testing.

Differential Revision: https://phabricator.services.mozilla.com/D227514
2024-11-04 15:14:54 +00:00
Stanca Serban
24115ae85e Backed out changeset 59d999752545 (bug 1927932) for causing webrender build bustages. CLOSED TREE 2024-10-31 03:14:39 +02:00
Glenn Watson
7208a55f9d Bug 1927932 - Update mozangle in wrench to 0.5.2. r=gfx-reviewers,lsalzman
This is necessary to export some Angle EGL extensions that are
used by the upcoming compositor changes.

Differential Revision: https://phabricator.services.mozilla.com/D227277
2024-10-30 23:56:50 +00:00
Nicolas Silva
793bb2cd41 Bug 1924736 - Clear picture tasks. r=gfx-reviewers,gw
In the most common case (non-cached picture tasks) the specific rect will be skipped in favor of the global clear, however cached picture tasks need a specific clear rect.

Differential Revision: https://phabricator.services.mozilla.com/D226615
2024-10-30 10:32:30 +00:00
Nicolas Silva
382fa6f2b0 Bug 1924736 - Simplify RenderTarget's specific clear rects. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D226614
2024-10-30 10:32:30 +00:00
Nicolas Silva
f2395f49b8 Bug 1924736 - Rework the render target clearing logic. r=gfx-reviewers,gw
This patch moves the clearing code into its own function and attempts to make the logic a bit easier to understand and reason about.

Differential Revision: https://phabricator.services.mozilla.com/D226613
2024-10-30 10:32:29 +00:00
Butkovits Atila
c4cc4b84b3 Backed out changeset 176b5731f078 (bug 1927932) for causing WR bustages. 2024-10-30 06:17:38 +02:00