Skip to content

Remove pipeline non-compositing-logic code from compositor #17200

Closed

Description

@paulrouget

Necessary for #15934.

From #15934 (comment):

In the compositor, all the pipeline work that is not related to compositing need to be striped down to its most simple form. The compositor code in these cases should just be used to forward messages to the constellation (we will eventually have a dedicated channel).

For example, the Reload message handler work that way today:

  • Embedder send WindowEvent::Reload to compositor.
  • Compositor find the pipeline to reload and its browsing context.
  • Compositor send ConstellationMsg::Reload(browsing_context) to constellation.

What we want is either:

  • Embedder send WindowEvent::Reload(browsing_context) to compositor.
  • Compositor forward to constellation.

… or:

  • Embedder send WindowEvent::Reload to compositor.
  • Compositor forward to constellation.
  • Constellation find browsing context.

Another example, the ChangePageTitle event that comes from the script thread. This is how it works today:

  • document.rs send SetTitle to constellation
  • constellation send ChangePageTitle to compositor
  • compositor checks if the source pipeline is root pipeline, if so, it sends it to embedder

What we want is:

  • document.rs send SetTitle to constellation
  • constellation checks if the source pipeline is root pipeline, if so, it sends to compositor
  • compositor forwards to embedder

Activity

  1. self-assigned this
    on Jun 7, 2017
  2. added
    C-assigned
    on Jun 8, 2017
  3. gterzian commented on Jun 13, 2017

    @gterzian
    Member

    Perhaps in the light of #15934, it is not necessary for the compositor to forward messages from the embedder, rather the embedder(actually it's not the embedder, rather 'Browser' in libservor) could send a message to the constellation, currently grabbing the pipeline id from the compositor(see https://github.com/gterzian/servo/blob/887289e2628f714de8c5787a0c72c527957502ba/components/servo/lib.rs#L253)

  4. added 2 commits that reference this issue on Aug 12, 2017
  5. paulrouget commented on Aug 15, 2017

    @paulrouget
    ContributorAuthor

    Fixed by #17425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-embeddingA-gfx/compositingC-assigned

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions