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 #50836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

servo-wpt-sync
Copy link
Collaborator

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.

This change also allows saving others types of image output just as JPEG.

Co-authored-by: Ngo Iok Ui (Wu Yu Wei) [email protected]
Signed-off-by: Martin Robinson [email protected]

Reviewed in servo/servo#35538

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Servo project.

@servo-wpt-sync
Copy link
Collaborator Author

⛔ The downstream PR has merged (servo/servo#35538), but these changes could not be merged properly. Please address any CI issues and try to merge manually.

@servo-wpt-sync servo-wpt-sync added the stale-servo-export PRs that were supposed to merge but were not able to do so. label Feb 20, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra servo-export stale-servo-export PRs that were supposed to merge but were not able to do so. 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