| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This adds a memory reporter for WebRender's memory usage. I seeded it
with a couple entries that looked reasonable based on
https://searchfox.org/mozilla-central/rev/2c71f1e9b5947612abdc16b64008162c58c1b9d3/gfx/thebes/gfxPlatform.cpp#722-738.
Testing: Verified that new numbers appear in about:memory for servo.org.
The new images category is surprisingly large (40mb).
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because there used to be two traits exposing messages to the compositor,
there were two kinds of messages that could be sent:
1. In-process messages from the `Constellation`
2. Cross-process messages from other parts of Servo
Now these two types of messages can be unified into one type.
This is a reland of #36443, which caused regressions due to the fact
that messages to the compositor were no longer triggering the event loop
waker. This version of the PR splits out just the bits that unify the
two APIs, leaving the cleanup of routes in the constellation for another
PR.
Testing: This is covered by existing WPT tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#36533)
This reverts commit 4c55104b36c7b858a117a6dd90a5dc21b74324d1.
This commit introduced an issue where messages from script to the
compositor no longer woke up the embedder. There is a larger issue
here, but this change exacerbated it.
Fixes #36528.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
| |
Presumably this was an autocomplete mistake.
Testing: ran Servo with RUST_LOG enabled. No panic any more.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because there used to be two traits exposing messages to the compositor,
there were two kinds of messages that could be sent:
1. In-process messages from the `Constellation`
2. Cross-process messages from other parts of Servo
Now these two types of messages can be unified into one type. With that
done the compositor can simply keep a single `IpcReceiver` for all
messages, instead of having to set up a route for the cross-process
messsages. This decreases overhead of cross proceses messages a bit, but
more importantly solves an issue where Servo would rely on the
compositor's cross-process message route after the `Constellation` had
called `ROUTER.shutdown()`.
This is part of #36442.
Testing: This is covered by existing WPT tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simply how `ProgressiveWebMetrics` works:
1. Keep only a single struct instead of one in layout and one script
that both implement the `ProgressiveWebMetrics` trait. Since layout
and script are the same thread these can now just be a single
`ProgressiveWebMetrics` struct stored in script.
2. Have the compositor be responsible for informing the Constellation
(which informs the ScripThread) about paint metrics. This makes
communication flow one way and removes one dependency between the
compositor and script (of two).
3. All units tests are moved into the `metrics` crate itself since there
is only one struct there now.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#35538)
This is a step toward the renderer-per-WebView goal. It moves various
details out of `IOCompositor`.
- Image output: This is moved to servoshell as now applications can
access the image contents of a `WebView` via
`RenderingContext::read_to_image`. Most options for this are moved to
`ServoShellPreferences` apart from `wait_for_stable_image` as this
requires a specific kind of coordination in the `ScriptThread` that is
also very expensive. Instead, paint is now simply delayed until a
stable image is reached and `WebView::paint()` returns a boolean.
Maybe this can be revisited in the future.
- Shutdown: Shutdown is now managed by libservo itself. Shutdown state
is shared between the compositor and `Servo` instance. In the future,
this sharing might be unecessary.
- `CompositeTarget` has been removed entirely. This no longer needs to
be passed when creating a Servo instance.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me>
|
|
|
| |
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of exposing many different kinds of messages to the compositor
that are routed through the constellation, expose a single message type
which can be sent across IPC channels. In addition, this IPC channel and
the route to the crossbeam channel with the compositor is created along
with the `CompositorProxy`, simplifying what needs to be passed around
during pipeline initialization.
Previously, some image updates (from video) were sent over IPC with a
special serialization routine and some were sent via crossbeam channels
(canvas). Now all updates go over the IPC channel `IpcSharedMemory` is
used to avoid serialization penalties. This should improve performance
and reduce copies for video, but add a memory copy overhead for canvas.
This will improve in the future when canvas renders directly into a
texture.
All-in-all this is a simplification which opens the path toward having a
standard compositor API and reduces the number of duplicate messages and
proxying that had to happen in libservo.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
| |
(#33645)
This reverts commit f2f5614ad64927aa82aa8937ae14a6086df49d2b.
This is causing intermittent crashes: https://github.com/servo/servo/actions/runs/11167043809/job/31044255019
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of exposing many different kinds of messages to the compositor
that are routed through the constellation, expose a single message type
which can be sent across IPC channels. In addition, this IPC channel and
the route to the crossbeam channel with the compositor is created along
with the `CompositorProxy`, simplifying what needs to be passed around
during pipeline initialization.
Previously, some image updates (from video) were sent over IPC with a
special serialization routine and some were sent via crossbeam channels
(canvas). Now all updates go over the IPC channel `IpcSharedMemory` is
used to avoid serialization penalties. This should improve performance
and reduce copies for video, but add a memory copy overhead for canvas.
This will improve in the future when canvas renders directly into a
texture.
All-in-all this is a simplification which opens the path toward having a
standard compositor API and reduces the number of duplicate messages and
proxying that had to happen in libservo.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
* Add multiple concurrent top-level browsing contexts
Co-authored-by: Delan Azabani <dazabani@igalia.com>
* Rename variables and comments
There are some variable and comments still use browser as names.
This commit renames them to webview.
* Update log message from web view to webview
* Revert offscreen_framebuffer_id rename
* Rename all web view to webview
* Cargo fmt
* Fix viewport/event/clear coordinates when multiview is disabled
* Only deprecate things when multiview is enabled
* Update WebViewManger with shown and invisible sets
Replace visible_webviews and native_window_is_visible with shown_webviews
and invisible_webviews. Add 4 more methods to set them accordingly. The
behavior of is_effectively_visible will return true if the wbview is in
shown_webviews set but not in invisible_webviews.
* Update variant behaviors
* Rename WebViewVisibilityChanged to MarkWebViewInvisible
* Fix unit test by marking id 3 visible again
* Update MarkWebViewInvisible and add UnmarkWebViewInvisible
* Update format and doc comments
* Clean up doc comments
* Address style and naming changes
* Rename UpdateWebView to UpdateFrameTreeForWebView
* constellation: send frame tree unconditionally over focus and feature
* Clarify shown and invisible sets in constellation WebViewManager
* Eliminate forward_to_constellation!()
* Actually remove the unused macro
* Don’t gate compositor changes on multiview feature flag
* Update todo in mouse event dispatch
* Pass all visible webview ids in a single ReadyToPresent message
* Fix compile and lint errors
* servoshell: fix gap between minibrowser toolbar and webview
* Fix failure in /_mozilla/mozilla/window_resizeTo.html
* Fix compile warnings
* Remove stray dbg!()
* Remove confusing “effectively visible” logic (see #31815, #31816)
* Allow embedder to show/hide/raise webviews without ipc
* Update root pipeline only when painting order actually changes
* Stop gating old focus and SetFrameTree behaviour behind Cargo feature
* Use webview_id and WebViewId in webview-related code
* Improve logging of webview-related embedder events
* Allow webview Show and Raise events to optionally hide all others
* Don’t do anything in response to WebViewPaintingOrder
* Remove WebViewPaintingOrder, since its payload is unreliable
* On MoveResizeWebView, only update root pipeline if rect changed
* Rename IOCompositor methods for clarity
* compositor: add event tracing; log webview ops even without ipc
* Add temporary debug logging
* Add more temporary debug logging
* Remove temporary logging in compositor
* Remove temporary debug logging
* Add temporary debug logging, but defer I/O until panic
* Capture a backtrace with each crash log entry
* Proper error handling without panicking in WebViewManager
* Clean up imports in constellation
---------
Co-authored-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|