Commit Graph

850 Commits

Author SHA1 Message Date
Olli Pettay
c29495f152 Bug 1773152 - Don't call SendNotifyFrameStats(stats) if no one will use the stats, r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D148568
2022-06-08 08:22:43 +00:00
Bas Schouten
ea1fd18504 Bug 1767257: Migrate existing WebRender telemetry probes to use Glean directly. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D145315
2022-05-09 15:23:11 +00:00
Cosmin Sabou
748cfb6ed4 Backed out changeset 50ba61f5cf8c (bug 1767257) for causing webrender bustages. CLOSED TREE 2022-05-09 17:31:06 +03:00
Bas Schouten
01c8599efa Bug 1767257: Migrate existing WebRender telemetry probes to use Glean directly. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D145315
2022-05-09 13:46:51 +00:00
Nicolas Silva
14fe44bcc6 Bug 1761744 - Better tag frames coming from the async image pipeline manager. r=gfx-reviewers,aosmond
We schedule additional composites as long as there is a CompositeUntil timestamp. These composites need a special tag and shouldn't carry the tags of whatever led us to check the timestamps. In addition, we should add the ASYNC_IMAGE tag when GetAndResetWillGenerateFrame returns true even if some other reason led us to check it.

Depends on D142233

Differential Revision: https://phabricator.services.mozilla.com/D142234
2022-03-29 09:30:56 +00:00
Nicolas Silva
292b8dd2ff Bug 1761744 - Tag frames caused by the start of observe vsync. r=gfx-reviewers,aosmond
Also tag frames from FlushGenerateFrames.

Depends on D142232

Differential Revision: https://phabricator.services.mozilla.com/D142233
2022-03-29 09:30:55 +00:00
Nicolas Silva
22f5676710 Bug 1761744 - Tag frames coming from skipped composites. r=gfx-reviewers,aosmond
Also differentiate between skipped composites (too many pending frames) and discarded composites (paused or no display list).

Differential Revision: https://phabricator.services.mozilla.com/D142232
2022-03-29 09:30:55 +00:00
Florian Quèze
e6057a32a3 Bug 1757202 - Add the browser window inner id to the SetDisplayList, CompositeToTarget and SkippedComposite profiler markers, r=mstange.
Depends on D139733

Differential Revision: https://phabricator.services.mozilla.com/D140748
2022-03-11 07:49:06 +00:00
Butkovits Atila
1bffb3a588 Backed out changeset db75af2b4f4e (bug 1748788) for causing webrender crashes (bug 1707052). CLOSED TREE 2022-03-01 16:10:26 +02:00
sotaro
fd007df553 Bug 1748788 - Send parent commands with ClearCachedResources r=gfx-reviewers,nical
RecvClearCachedResources() does not handle parent commands. They are handled by a different transaction. It caused the problem. To avoid the problem, modifying RecvClearCachedResources() as to handle parent commands.

Differential Revision: https://phabricator.services.mozilla.com/D139568
2022-02-25 15:43:19 +00:00
sotaro
3e14507fc5 Bug 1756604 - Remove PrivateExternalImage handling r=gfx-reviewers,aosmond
PrivateExternalImage is not used by WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D139382
2022-02-23 14:21:39 +00:00
Andrew Osmond
16bded8b81 Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro
For WebGPU, we produce the textures in the compositor process and the
content process doesn't need to be that involved except for hooking up
the texture to the display list. Currently this is done via an external
image ID.

Given that WebGPU needs to work with OffscreenCanvas, it would be best
if its display pipeline was consistent whether it was gotten from an
HTMLCanvasElement, OffscreenCanvas on the main thread, or on a worker
thread. As such, using an AsyncImagePipeline would be best.

However there is no real need to bounce the handles across process
boundaries. Hence this patch which adds CompositableInProcessManager.
This static class is responsible for collecting WebRenderImageHost
objects backed by TextureHost objects which do not leave the compositor
process. This will allow WebGPUParent to schedule compositions directly
in future patches.

Differential Revision: https://phabricator.services.mozilla.com/D138588
2022-02-18 15:59:12 +00:00
Iulian Moraru
e38c48df42 Backed out 2 changesets (bug 1754978) for causing valgrind bustages.
Backed out changeset 491a985fc34a (bug 1754978)
Backed out changeset 98983bf9eaed (bug 1754978)
2022-02-18 00:36:31 +02:00
Andrew Osmond
e6c65476b6 Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro
For WebGPU, we produce the textures in the compositor process and the
content process doesn't need to be that involved except for hooking up
the texture to the display list. Currently this is done via an external
image ID.

Given that WebGPU needs to work with OffscreenCanvas, it would be best
if its display pipeline was consistent whether it was gotten from an
HTMLCanvasElement, OffscreenCanvas on the main thread, or on a worker
thread. As such, using an AsyncImagePipeline would be best.

However there is no real need to bounce the handles across process
boundaries. Hence this patch which adds CompositableInProcessManager.
This static class is responsible for collecting WebRenderImageHost
objects backed by TextureHost objects which do not leave the compositor
process. This will allow WebGPUParent to schedule compositions directly
in future patches.

Differential Revision: https://phabricator.services.mozilla.com/D138588
2022-02-16 22:23:19 +00:00
Andrew Osmond
b38dfffb91 Bug 1749526 - Process partial WebRender transactions instead of discarding them partway. r=gfx-reviewers,bradwerth
When we encounter an error updating resources, or processing parent
commands, we actually bail out midway. This is problematic because some
resource updates and commands depend on follow-ups to release resources
and such. Also, when the next display list update comes in, we may now
have an incomplete resource set and see display errors / crashes that
may not be easily traceable to the previous failure.

This patch makes us always finish processing a transaction, even if we
encountered errors. This will put us in a more consistent state at
least. It adds new asserts to try to catch these issues sooner and in
automation. It also ensures we do a print to the critical log in all of
these cases so we know this issue was encountered.

Differential Revision: https://phabricator.services.mozilla.com/D135613
2022-01-13 18:38:00 +00:00
Emilio Cobos Álvarez
e087d87aa4 Bug 1742358 - Set default clear color to widget window background on expose, and reset it on first contentful paint. r=jrmuizel,stransky
Differential Revision: https://phabricator.services.mozilla.com/D135075
2022-01-08 23:52:54 +00:00
sotaro
2c3bb68364 Bug 1743221 - Clear CompositableParentManager::mCompositables in WebRenderBridgeParent::Destroy() r=nical
Clear mCompositables in WebRenderBridgeParent::Destroy() like ImageBridgeParent::ActorDestroy().

Differential Revision: https://phabricator.services.mozilla.com/D132760
2021-12-07 23:12:51 +00:00
Nika Layzell
6aff4075e1 Bug 1734735 - Part 6: Remove dead TextureSync code, r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D128215
2021-11-23 16:15:22 +00:00
Gerald Squelart
14f5abe74d Bug 1738627 - profiler_thread_is_being_profiled's ThreadProfilingFeatures is now compulsory - r=canaltinova
Now that most calls to `profiler_thread_is_being_profiled` have been updated, the `ThreadProfilingFeatures` can be made compulsory, to force callers to think about what they really want to know about the current profiling state.

Differential Revision: https://phabricator.services.mozilla.com/D130010
2021-11-08 23:59:36 +00:00
Gerald Squelart
8c94ff82ed Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Cristian Tuns
839b72e1d3 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart
fd2a52c2fe Bug 1738627 - profiler_thread_is_being_profiled's ThreadProfilingFeatures is now compulsory - r=canaltinova
Now that most calls to `profiler_thread_is_being_profiled` have been updated, the `ThreadProfilingFeatures` can be made compulsory, to force callers to think about what they really want to know about the current profiling state.

Differential Revision: https://phabricator.services.mozilla.com/D130010
2021-11-05 05:52:29 +00:00
Gerald Squelart
019bfd575e Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Nicolas Silva
d5c7841b30 Bug 1737648 - Don't batch uploads for items larger than a certain size. r=gfx-reviewers,bradwerth
The default size on most platforms is 256*256 which corresponds to the default blob tile size. I didn't check on android so I set it to 512*512 above which we never batch the upload so that the behavior is unchanged, but I suspect that a smaller threshold like 256*256 would also work better there.

On Windows with heavy blob image workloads, not batching gives a 20%-30% improvement to the time spent in update_texture_cache.

Differential Revision: https://phabricator.services.mozilla.com/D129516
2021-11-03 16:42:42 +00:00
Gerald Squelart
e52556d921 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Nazım Can Altınova
4be8347563 Bug 1733335 - Convert the webrender profiler code to use the new API r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D127113
2021-10-11 07:59:10 +00:00
Sandor Molnar
e90097d10b Backed out 4 changesets (bug 1733335) for causing multiple dt failures. CLOSED TREE
Backed out changeset 8c14ac28d042 (bug 1733335)
Backed out changeset 066819ce0e86 (bug 1733335)
Backed out changeset c44e1bb6d9ff (bug 1733335)
Backed out changeset 4cd1efb42295 (bug 1733335)
2021-10-06 17:49:47 +03:00
Nazım Can Altınova
b2b7a80767 Bug 1733335 - Convert the webrender profiler code to use the new API r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D127113
2021-10-06 11:35:16 +00:00
Nicolas Silva
8edf9638bf Bug 1690619 - Keep track of where the request to rendering something comes from. r=gfx-reviewers,mstange
This patch adds plumbing to keep track of why we request frames to be rendered.
This information is then displayed in gecko profile markers on the renderer thread as well as in profiler HUD counters (See "Render reasons" in profiler.rs).

Differential Revision: https://phabricator.services.mozilla.com/D127274
2021-10-05 12:54:39 +00:00
Marian-Vasile Laza
49aaa9f546 Backed out 4 changesets (bug 1733335) for causing build bustages. CLOSED TREE
Backed out changeset 45a3ae02f837 (bug 1733335)
Backed out changeset 41c62acfb5a6 (bug 1733335)
Backed out changeset cf3b6b6cc6c6 (bug 1733335)
Backed out changeset b919d9cfb8e5 (bug 1733335)
2021-10-05 15:07:44 +03:00
Nazım Can Altınova
c86f404a91 Bug 1733335 - Convert the webrender profiler code to use the new API r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D127113
2021-10-05 11:34:27 +00:00
Nicolas Silva
d5c9a5398c Bug 1731610 - Add new prefs in WebRender with less boilerplate. r=gfx-reviewers,jrmuizel
Right now adding a dynamic pref for webrender involves plumbing in gfxPlatform, gfxVars, CompositBridgeParent, WebRenderBridgeParent, WebRenderAPI, the bindings, and then messaging the pref change to the right thread in WebRender.

That's quite a bit time consuming for something we tend to do for multiple things.

We already have a pretty good system for boolean debug prefs where the pref only needs to be listed in gfxPlatform and in the DebugPref enum of webrender_api/lib.rs, which has led us to use it for non-debug purposes.

This patch adds a system similar to the DebugFlags with values passed in a bitfield to be able to use gfxVars. In WebRender the parameters are key-value pairs which flow through the pipeline so that any component can react to them. A followup will add integer parameters.

The patch also moves a few prefs to this system and adds a pref to use PBO uploads.

Differential Revision: https://phabricator.services.mozilla.com/D126100
2021-09-23 15:17:46 +00:00
Nicolas Silva
1d6b73f481 Bug 1730701 - Read the blob tile size pref when starting up. r=gfx-reviewers,sotaro
Without this change it is only applied when the pref change on the existing windows (new windows get a default value).

Differential Revision: https://phabricator.services.mozilla.com/D125547
2021-09-17 12:33:02 +00:00
Nicolas Silva
68a52ada44 Bug 1729441 - Add a pref to set the blob tile size. r=gfx-reviewers,bradwerth
The prefs name is gfx.webrender.blob-tile-size and can be changed at runtime.

It changes the behavior of a wrench reftest that was ensuring that we don't crash with unreasonable tile sizes. The new behavior (sanitizing the tile size) means we can render the image while we would previously skip it.

Differential Revision: https://phabricator.services.mozilla.com/D124789
2021-09-08 12:41:51 +00:00
sotaro
2a150b8a56 Bug 1729244 - Rename gRenderThreadLog to gWebRenderBridgeParentLog in WebRenderBridgeParent.cpp r=nical
Forgot to rename it in Bug 1727511.

Differential Revision: https://phabricator.services.mozilla.com/D124596
2021-09-07 00:06:17 +00:00
sotaro
9e2c6afa08 Bug 1727511 - Add mozlog around WebRenderBridgeParent and RenderThread r=gfx-reviewers,jrmuizel,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D123616
2021-09-01 22:27:15 +00:00
Glenn Watson
5c663731ba Bug 1724846 - Split DL spatial tree to separate payload r=gfx-reviewers,nical
This will allow experimenting with different representations of
the spatial tree (such as interning and/or providing stable
indices during display list building). It may also simplify
future changes to the public API to expose the spatial tree
directly.

As part of these changes, refactor how the debug representation
for the capture format is (de)serialized, to make it simpler to
add different payload vector types in future.

Differential Revision: https://phabricator.services.mozilla.com/D122183
2021-08-30 00:33:22 +00:00
Matt Woodrow
c56b7a244d Bug 1727684 - Remove ContentHost/ImageHost. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123881
2021-08-28 03:54:23 +00:00
criss
7bdf12d8cb Backed out changeset 25acfe977062 (bug 1727511) for causing valgrind build bustages. CLOSED TREE 2021-08-27 18:24:28 +03:00
sotaro
8d3454c2ea Bug 1727511 - Add mozlog around WebRenderBridgeParent and RenderThread r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123616
2021-08-27 06:37:32 +00:00
Alexandru Michis
51a484e3cf Backed out changeset 1d332a5ff4f9 (bug 1724846) for causing Bug 1727715.
CLOSED TREE
2021-08-26 22:51:05 +03:00
Glenn Watson
9149dcfec2 Bug 1724846 - Split DL spatial tree to separate payload r=gfx-reviewers,nical
This will allow experimenting with different representations of
the spatial tree (such as interning and/or providing stable
indices during display list building). It may also simplify
future changes to the public API to expose the spatial tree
directly.

As part of these changes, refactor how the debug representation
for the capture format is (de)serialized, to make it simpler to
add different payload vector types in future.

Differential Revision: https://phabricator.services.mozilla.com/D122183
2021-08-24 02:18:51 +00:00
Iulian Moraru
534c6d12b2 Backed out changeset d93e8a61d529 (bug 1724846) for causing reftest failures on downscale-moz-icon-1.html. CLOSED TREE 2021-08-23 07:11:37 +03:00
Glenn Watson
c46752adac Bug 1724846 - Split DL spatial tree to separate payload r=gfx-reviewers,nical
This will allow experimenting with different representations of
the spatial tree (such as interning and/or providing stable
indices during display list building). It may also simplify
future changes to the public API to expose the spatial tree
directly.

As part of these changes, refactor how the debug representation
for the capture format is (de)serialized, to make it simpler to
add different payload vector types in future.

Differential Revision: https://phabricator.services.mozilla.com/D122183
2021-08-22 20:54:07 +00:00
Narcis Beleuzu
4c3fac01fa Backed out 2 changesets (bug 1723665, bug 1724846) as per gw`s request
Backed out changeset 5f2aff372a24 (bug 1724846)
Backed out changeset 0cc8e08b6937 (bug 1723665)
2021-08-18 03:17:33 +03:00
Glenn Watson
8f19dc96b0 Bug 1724846 - Split DL spatial tree to separate payload r=gfx-reviewers,nical
This will allow experimenting with different representations of
the spatial tree (such as interning and/or providing stable
indices during display list building). It may also simplify
future changes to the public API to expose the spatial tree
directly.

As part of these changes, refactor how the debug representation
for the capture format is (de)serialized, to make it simpler to
add different payload vector types in future.

Differential Revision: https://phabricator.services.mozilla.com/D122183
2021-08-15 20:44:03 +00:00
stransky
abf5182caf Bug 1722450 [Wayland] Pause compositor when screen scale changes and content is not updated yet, r=sotaro
We need to track window compositor state in various cases, when compositor is paused after window creation,
when compositor is paused for hidden window (EGLSurface is missing) and paused compositor when layout is not updated yet
and drawing will lead to incorrect / obsoleted window content.

In this patch we track compositor state by WindowCompositorState atomic enum (because it can be accessed from Compositor thread)
and two private methods (PauseCompositorHiddenWindow and ResumeCompositorHiddenWindow) and two public ones (PauseCompositor() and ResumeCompositor).

Private interface is used by nsWindow when EGLSurface is missing so we can't render to window - it's initial compositor pause and
pause when window is hidden.

Public interface is used by nsWindow and WebRender compositor to disable/enable rendering when window content is updated.
When compositor is disabled by public interface it will be enabled automatically after a timeout (1s) or when content layout is updated.

Changes in the patch:

- Implement GtkCompositorWidget::RemoteLayoutSizeUpdated() to notify GtkCompositorWidget widget about layout size update in content process.
- Track nsWindow compositor state by WindowCompositorState
- Implement nsWindow::PauseCompositorHiddenWindow() and ResumeCompositorHiddenWindow() to handle internal nsWindow states.
- Implement nsWindow::PauseCompositor() and nsWindow::ResumeCompositor() to allow compositor pause/resume during content layout updates.
- Use timeout to resume compositor paused by public interface as a fallback when content is not updated or it takes too long.

Differential Revision: https://phabricator.services.mozilla.com/D121650
2021-08-11 07:48:53 +00:00
Glenn Watson
2526d2cd07 Bug 1724344 - Split DL cache data into separate payload vec r=gfx-reviewers,kvark
Move the extra_data to be a specific cache_data separate vec in
the display list payload.

This shouldn't change any functionality, but serves as a proof
of concept for future changes which will introduce several other
separated payload vectors.

Differential Revision: https://phabricator.services.mozilla.com/D121937
2021-08-09 21:15:20 +00:00
Tom Ritter
7830c4464f Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Nazım Can Altınova
7e485c1227 Bug 1690624 - Add profiler rust API for thread registration/unregistration r=gerald,emilio
Differential Revision: https://phabricator.services.mozilla.com/D116515
2021-06-09 11:22:55 +00:00