690 Commits

Author SHA1 Message Date
sotaro
18ce3bdef3 Bug 1959015 - Do not disable native compositor when profiler takes screenshot with WebRender layer compositor r=gfx-reviewers,lsalzman
When profiler takes async screenshot and WebRender uses layer compositor, WebRender  tries to use only one swap chain without overlay.

Differential Revision: https://phabricator.services.mozilla.com/D246200
2025-04-28 23:03:18 +00:00
Nicolas Silva
a7fed60e37 Bug 1961115 - Pass new_frame_ready parameters via a struct. r=gfx-reviewers,gw
This patch is a preliminary refactoring to make it simpler to pass additional information to the C++ side and should not affect behavior.
In a followup patch the widget glue will have special handling for frames that need to be rendered but not presented.

Differential Revision: https://phabricator.services.mozilla.com/D245564
2025-04-18 12:56:22 +00:00
Cosmin Sabou
9f12bed22c Backed out 3 changesets (bug 1961115) for causing build bustages. CLOSED TREE
Backed out changeset 272e5fda747a (bug 1961115)
Backed out changeset 9f795cb0c6ae (bug 1961115)
Backed out changeset 12836f4f3c36 (bug 1961115)
2025-04-18 12:00:27 +03:00
Nicolas Silva
91b6df8974 Bug 1961115 - Pass new_frame_ready parameters via a struct. r=gfx-reviewers,gw
This patch is a preliminary refactoring to make it simpler to pass additional information to the C++ side and should not affect behavior.
In a followup patch the widget glue will have special handling for frames that need to be rendered but not presented.

Differential Revision: https://phabricator.services.mozilla.com/D245564
2025-04-18 08:21:58 +00:00
Nicolas Silva
49d7220749 Bug 1954798 - Add debug markers in WR's display list. r=emilio
And use DebugMarker(1) to signify that the next item is a view-transition snapshot.
This specific marker is not meant to stay forever (although the infrastructure is), but it is useful right now.

Differential Revision: https://phabricator.services.mozilla.com/D242023
2025-03-19 17:12:24 +00:00
Goloman Adrian
1f1fa5f70c Backed out changeset 9c15b8950f9d (bug 1954798) for causing build bustages. 2025-03-19 11:11:13 +02:00
Nicolas Silva
46eae23cc9 Bug 1954798 - Add debug markers in WR's display list. r=emilio
And use DebugMarker(1) to signify that the next item is a view-transition snapshot.
This specific marker is not meant to stay forever (although the infrastructure is), but it is useful right now.

Differential Revision: https://phabricator.services.mozilla.com/D242023
2025-03-19 08:45:10 +00:00
Emilio Cobos Álvarez
6ba2ddce30 Bug 1950177 - Pass snapshot around via StackingContextParams. r=nical,gfx-reviewers
No behavior change, but this seemed a bit nicer / more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D239381
2025-02-26 12:29:47 +00:00
Cristina Horotan
5bc51022a0 Backed out 9 changesets (bug 1922300, bug 1950362, bug 1919333, bug 1950176, bug 1948058, bug 1950177, bug 1922298) for causing multiple Wr failures
Backed out changeset 54c87e09251a (bug 1919333)
Backed out changeset 813274ba35a0 (bug 1919333)
Backed out changeset a37d91fc2a7a (bug 1950362)
Backed out changeset 97f67f9048b5 (bug 1922298)
Backed out changeset 4c11b366fcaf (bug 1919333)
Backed out changeset dbde76fa73a9 (bug 1948058)
Backed out changeset ba3d9d95cd56 (bug 1922300)
Backed out changeset 0fe786bf2709 (bug 1950177)
Backed out changeset 8d9f52e91779 (bug 1950176)
2025-02-26 06:23:09 +02:00
Emilio Cobos Álvarez
d82a905a47 Bug 1950177 - Pass snapshot around via StackingContextParams. r=nical,gfx-reviewers
No behavior change, but this seemed a bit nicer / more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D239381
2025-02-25 22:48:29 +00:00
Nicolas Silva
a4d2fb6536 Bug 1924152 - Support rendering without presenting. r=gw
The goal for this initial implementation is to be able to render picture snapshots without presenting the frame, but it could be extended to supporting some picture cache slices without presenting (for example if we know that the picture is not affected by scrolling or animated properties and want to start rendering it early).

Differential Revision: https://phabricator.services.mozilla.com/D234162
2025-01-15 15:24:03 +00:00
Butkovits Atila
1fc328eed7 Backed out 3 changesets (bug 1924152, bug 1918138) for causing WR bustages. CLOSED TREE
Backed out changeset 03b773761f5d (bug 1924152)
Backed out changeset cedb2697277d (bug 1924152)
Backed out changeset 5a7a8a6c90aa (bug 1918138)
2025-01-15 12:15:18 +02:00
Nicolas Silva
fcc00910b0 Bug 1924152 - Support rendering without presenting. r=gw
The goal for this initial implementation is to be able to render picture snapshots without presenting the frame, but it could be extended to supporting some picture cache slices without presenting (for example if we know that the picture is not affected by scrolling or animated properties and want to start rendering it early).

Differential Revision: https://phabricator.services.mozilla.com/D234162
2025-01-15 09:24:53 +00:00
Nicolas Silva
fecaa64fee Bug 1936751 - Expose WR's stacking context snapshot API to C++. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D231909
2024-12-13 09:29:26 +00:00
Glenn Watson
a3bd53ceff Bug 1934751 - Add basic Firefox bindings to LayerCompositor interface r=gfx-reviewers,lsalzman
For now, this only creates a single swapchain layer that WR then
composites into. Follow up patches will support constructing
multiple swapchain layers and interposing native video swapchains
between them.

Differential Revision: https://phabricator.services.mozilla.com/D230889
2024-12-09 19:52:17 +00:00
Sandor Molnar
34332da6c4 Backed out changeset 25396aa6b229 (bug 1934751) for causing build bustage. 2024-12-06 04:11:21 +02:00
Glenn Watson
4f89b2b3da Bug 1934751 - Add basic Firefox bindings to LayerCompositor interface r=gfx-reviewers,lsalzman
For now, this only creates a single swapchain layer that WR then
composites into. Follow up patches will support constructing
multiple swapchain layers and interposing native video swapchains
between them.

Differential Revision: https://phabricator.services.mozilla.com/D230889
2024-12-06 01:24:00 +00:00
Nicolas Silva
bf409799b6 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
Stanca Serban
f34818a6d3 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
44f1f7e566 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
8ed6c9138e 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
b31788997a 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
Butkovits Atila
7a7c19fbec 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
357086b3ce 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
sotaro
fab2c171a9 Bug 1923263 - Add log around RenderThread::PostEvent() and RendererEvent r=gfx-reviewers,lsalzman
The log helps to understand how time was spent around RenderThread::PostEvent() and RendererEvent.

Differential Revision: https://phabricator.services.mozilla.com/D224897
2024-10-10 04:13:21 +00:00
Cosmin Sabou
d2c7467f0b Backed out changeset 9cd00158c7e5 (bug 1923263) for causing bc failures on browser_Troubleshoot.js. CLOSED TREE 2024-10-09 11:17:49 +03:00
sotaro
160aa726d9 Bug 1923263 - Add log around RenderThread::PostEvent() and RendererEvent r=gfx-reviewers,lsalzman
The log helps to understand how time was spent around RenderThread::PostEvent() and RendererEvent.

Differential Revision: https://phabricator.services.mozilla.com/D224897
2024-10-09 06:25:14 +00:00
sotaro
ad92940fbd Bug 1922214 - Post Pause/Resume by using RenderThread::PostEvent() r=gfx-reviewers,lsalzman
Calling RenderThread::Pause() without using low_priority_scene_sender could  reduce the waiting time for Pause/Resume handling. RenderThread::PostEvent() already exists for positing task directly to RenderThread. And RenderCompositor::IsPaused() exists for handling RenderCompositor paused state.

Differential Revision: https://phabricator.services.mozilla.com/D224306
2024-10-03 06:36:28 +00:00
Nicolas Silva
da62e076dd Bug 1920678 - Add a pool for the memory chunks used by per-frame allocators. r=gfx-reviewers,lsalzman
Instead of dropping the frame's memory chunk when a frame is replaced, place the chunks into a global pool. This mostly helps when running stress tests like motionmark's html suite that cause intense allocation spikes (around 90 chunks per frame).

We should revisit whether this is needed if the cost of deallocating large regions of memory in mozjemalloc improves in the future.

Differential Revision: https://phabricator.services.mozilla.com/D223924
2024-09-30 14:56:28 +00:00
Jamie Nicol
61607f450a Bug 1913568 - Add support for normalized UV coordinates to webrender. r=gfx-reviewers,nical
Some external images must be sampled from by providing normalized UV
coordinates to webrender, but currently webrender only supports
unnormalized UVs.

This patch adds a flag to webrender's external image API that
specifies whether the UV coordinates supplied when the texture is
locked are normalized or unnormalized. This flag is plumbed through
webrender to the required locations. We then add support for taking
normalized UVs as inputs to the brush_image and cs_scale shaders. The
only other shader that can be used with external textures is the
composite shader, which already supports normalized UVs.

This does not change any behaviour, that will happen in the next patch
in this series.

Differential Revision: https://phabricator.services.mozilla.com/D220581
2024-09-09 14:06:26 +00:00
Iulian Moraru
2c2e0f4342 Backed out 3 changesets (bug 1913568) for causing multiple wrench build bustages related to normalized_uvs. CLOSED TREE
Backed out changeset 08890d5674ad (bug 1913568)
Backed out changeset 4aaa0e9d0a6f (bug 1913568)
Backed out changeset b6f9d83c6da0 (bug 1913568)
2024-09-09 13:14:14 +03:00
Jamie Nicol
bf855b9fe1 Bug 1913568 - Add support for normalized UV coordinates to webrender. r=gfx-reviewers,nical
Some external images must be sampled from by providing normalized UV
coordinates to webrender, but currently webrender only supports
unnormalized UVs.

This patch adds a flag to webrender's external image API that
specifies whether the UV coordinates supplied when the texture is
locked are normalized or unnormalized. This flag is plumbed through
webrender to the required locations. We then add support for taking
normalized UVs as inputs to the brush_image and cs_scale shaders. The
only other shader that can be used with external textures is the
composite shader, which already supports normalized UVs.

This does not change any behaviour, that will happen in the next patch
in this series.

Differential Revision: https://phabricator.services.mozilla.com/D220581
2024-09-09 09:10:23 +00:00
Brad Werth
c332f22875 Bug 1906527 Part 3: Add YUV422P10 and NV16 formats. r=gfx-reviewers,ahale
YUV422P10 is needed to properly tag decoded YUV422P10 video. NV16 is
needed to describe the macOS 10-bit YUV422 formats.

Differential Revision: https://phabricator.services.mozilla.com/D217334
2024-08-05 17:59:15 +00:00
Nicolas Silva
95444167ac Bug 1903553 - Add perf stats for frame building and fix corresponding glean probe. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D215626
2024-07-11 12:23:12 +00:00
Nicolas Silva
c8799453a3 Bug 1901884 - Add a dedicated-thread mode to the glyph rasterizer for when we use freetype. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D213595
2024-06-17 09:57:54 +00:00
Nicolas Silva
5004857a9d Bug 1901257 - Add a pref to control the threshold for slow cpu frames. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D213069
2024-06-11 10:33:44 +00:00
Tamas Szentpeteri
0769a318a1 Backed out 8 changesets (bug 1900791, bug 1901257, bug 1899118) for causing wrench bustages related to pkg lockfile. CLOSED TREE
Backed out changeset 13bfcb429131 (bug 1901257)
Backed out changeset 33515e19747a (bug 1901257)
Backed out changeset afb5f06b1769 (bug 1899118)
Backed out changeset fa83ad843f07 (bug 1900791)
Backed out changeset cfe385ed662e (bug 1901257)
Backed out changeset 81269835675b (bug 1901257)
Backed out changeset 9bc476e5e936 (bug 1901257)
Backed out changeset 0c583d6d7b41 (bug 1901257)
2024-06-11 03:57:31 +03:00
Nicolas Silva
4475f890e8 Bug 1901257 - Add a pref to control the threshold for slow cpu frames. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D213069
2024-06-10 20:47:29 +00:00
sotaro
2095637009 Bug 1863257 - Remove sync wait in compositor thread of main thread canvas by RemoteTextureMap::WaitForRemoteTextureOwner() r=gfx-reviewers,lsalzman
Calling RemoteTextureTxnScheduler::NotifyTxn() of main thread canvas is deferred to WebRenderAPI for waiting RemoteTextureOwner at WebRenderAPI.

When RemoteTextureOwner is not registered yet, WaitingTextureOwner is used to register the callback. WaitingTextureOwner is removed in RemoteTextureMap::SuppressRemoteTextureReadyCheck() when it still exists.

Removing sync wait of off main thread canvas is going to be handled by another bug.

Differential Revision: https://phabricator.services.mozilla.com/D209647
2024-05-20 00:29:19 +00:00
Botond Ballo
a93d271233 Bug 1874199 - Add support for animation properties on StickyFrame spatial nodes. r=gw
The support is currently limited to translation transforms.

Depends on D208236

Differential Revision: https://phabricator.services.mozilla.com/D208237
2024-05-02 02:49:21 +00:00
pstanciu
b5f8ed8325 Backed out 4 changesets (bug 1874199) for causing WR bustages CLOSED TREE
Backed out changeset 0367fe61d2c9 (bug 1874199)
Backed out changeset 00d4835ec154 (bug 1874199)
Backed out changeset 4c6a338c5c30 (bug 1874199)
Backed out changeset 9756d029484d (bug 1874199)
2024-05-02 04:30:55 +03:00
Botond Ballo
5a21d457c6 Bug 1874199 - Add support for animation properties on StickyFrame spatial nodes. r=gw
The support is currently limited to translation transforms.

Depends on D208236

Differential Revision: https://phabricator.services.mozilla.com/D208237
2024-05-02 00:14:01 +00:00
sotaro
593cf94fab Bug 1892648 - Extend timeout for debug build in WebRenderAPI::CheckIsRemoteTextureReady() r=gfx-reviewers,lsalzman
From Bug 1890903, current time out duration is not sufficient for debug build.

Differential Revision: https://phabricator.services.mozilla.com/D208090
2024-04-22 05:51:16 +00:00
sotaro
d6b0798b34 Bug 1891180 - Move timeout check to end of WebRenderAPI::CheckIsRemoteTextureReady() r=gfx-reviewers,lsalzman
It is better to move timeout check to end of the function, since current implementation does not call RemoteTextureMap::CheckRemoteTextureReady() if the timeout is detected.

Differential Revision: https://phabricator.services.mozilla.com/D207334
2024-04-16 00:30:57 +00:00
Álvaro Costa
4cb7c6c249 Bug 1873121 - Expose ExternalScrollId in WebRender API. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D199589
2024-01-29 16:38:08 +00:00
Botond Ballo
1d131b33ae Bug 1875180 - When defining a clip chain, print the ids of the clips in the chain. r=dlrobertson
Depends on D198884

Differential Revision: https://phabricator.services.mozilla.com/D198885
2024-01-18 20:04:45 +00:00
Botond Ballo
c519505e58 Bug 1875180 - Use MOZ_LOG in WebRenderAPI.cpp. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D198884
2024-01-18 20:04:45 +00:00
sotaro
9ef4cc3cbc Bug 1868928 - Handle ApplyAsyncImageForPipeline() for AsyncImagePipeline of sync WebRenderImageHost after waiting RemoteTextures ready at WebRenderAPI r=gfx-reviewers,lsalzman
This is preparation for Bug 1868927.

By deferring ApplyAsyncImageForPipeline() for TextureHost in AsyncImagePipeline of synchronous WebRenderImageHost, ApplyAsyncImageForPipeline() can be called after the RemoteTextureHostWrapper is in the ready state.

Differential Revision: https://phabricator.services.mozilla.com/D197320
2024-01-05 21:45:54 +00:00
Cosmin Sabou
b678f695cb Backed out changeset 22c07e92d841 (bug 1868928) for causing memory leaks. 2023-12-30 14:52:41 +02:00
sotaro
f3fad6d5c5 Bug 1868928 - Handle ApplyAsyncImageForPipeline() for AsyncImagePipeline of sync WebRenderImageHost after waiting RemoteTextures ready at WebRenderAPI r=gfx-reviewers,lsalzman
This is preparation for Bug 1868927.

By deferring ApplyAsyncImageForPipeline() for TextureHost in AsyncImagePipeline of synchronous WebRenderImageHost, ApplyAsyncImageForPipeline() can be called after the RemoteTextureHostWrapper is in the ready state.

Differential Revision: https://phabricator.services.mozilla.com/D197320
2023-12-30 11:27:21 +00:00