Discussion: lifetime of compositor vs. constellation, and potential compositor refactoring #23179
Labels
A-constellation
Involves the constellation
A-gfx/compositing
B-meta
This issue tracks the status of multiple, related pieces of work
A compositor is a lot of things at once:
This set of responsibilities and behavior are not compatible with 3 features we need:
On Mac, Android and Firefox Reality, we can end up in situations where the native window doesn't exist anymore.
We want to be able to close a window and keep Servo alive (the constellation, probably not the pipelines for now).
We want to be able to have more that one window. As of now, one compositor = one window.
#13993
We want to be able to draw multiple top level document on window without having to use an iframe.
Think "chrome document" vs. "content document" for example. As of now, a compositor only has one
top level root pipeline.
#20335 (comment)
Proposed changes:
We should start by making the compositor optional, be able to shut it down, and create a new one. The constellation should be able to outlive the compositor.
Then we need to make it possible to hold multiple compositors.
And finally introduce a sub structure inside a compositor that I call "Area" which basically holds a WR document. A compositor could have multiple areas.
I'm starting by making the compositor optional. This involves quite a lot of refactoring and also changes the lifetime of the compositor and the constellation.
So before jumping too deep, I'd like to get some feedback on this proposal.
The text was updated successfully, but these errors were encountered: