Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compositing: Move image output and shutdown management out of the compositor #50892

Closed
wants to merge 1 commit into from

Conversation

mrobinson
Copy link
Contributor

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.

This is an attempt to land #50836 which seems to be wedged.

…positor

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.

Co-authored-by: Ngo Iok Ui (Wu Yu Wei) <[email protected]>
Signed-off-by: Martin Robinson <[email protected]>
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Feb 22, 2025
@mrobinson mrobinson closed this Feb 22, 2025
@mrobinson mrobinson deleted the servo_export_35538 branch February 22, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants