compositing: Support per-Painter operations and message handling (#40788)

Currently, only the first `Painter` is used for all operations in the
`Compositor`. This change modifies the compositor API and message
handling to allow routing the operations to the correct `Painter` via a
provided `PainterId` or `WebViewId`.

This change is to enable support for per-`WebView`s `RenderingContext`s.

Testing: This change shouldn't change behavior, so existing WPT tests
should cover it.

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan
2025-11-21 18:45:55 +05:30
committed by GitHub
parent 9c4db3b7d1
commit 90595e3570
13 changed files with 238 additions and 136 deletions

View File

@@ -2354,7 +2354,7 @@ impl Window {
self.reflow(ReflowGoal::UpdateScrollNode(scroll_id, Vector2D::new(x, y)));
if reflow_phases_run.needs_frame() {
self.compositor_api()
.generate_frame(vec![self.webview_id()]);
.generate_frame(vec![self.webview_id().into()]);
}
// > If the scroll position did not change as a result of the user interaction or programmatic
@@ -2608,7 +2608,7 @@ impl Window {
// See <https://github.com/servo/servo/issues/14719>
if self.Document().update_the_rendering().needs_frame() {
self.compositor_api()
.generate_frame(vec![self.webview_id()]);
.generate_frame(vec![self.webview_id().into()]);
}
}