Files
servo/components/compositing
Martin Robinson 3b67bc7d98 libservo: Have WebView take a RenderingContext rather than Servo (#40794)
This is the last major change before we can try to implement support for
multiple windows in Servo. This change makes it so that each `WebView`
(via `WebViewBuilder`) takes the `RenderingContext` as an argument,
rather than `Servo` (via `ServoBuilder`) as a whole.

In the compositor, when registering the `RenderingContext`, if a
`Painter` is found for it, it is returned. Otherwise, a new `Painter`
(and WebRender instance) is created for it. There is currently no way to
unregister a `RenderingContext`. We should come up with a good metric
for when is the best time to clean up `Painter`s and WebRender instances
for defunct `RenderingContext`s. This could perhaps be done via a `Weak`
handle to the `RenderingContext`.

Testing: This should not really change observable behavior, so should be
covered by existing tests.
Fixes: #13995 
Closes: #40261

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-11-21 18:12:17 +00:00
..