Proposal to change subsurface extension

Pekka Paalanen ppaalanen at gmail.com
Thu Jun 13 04:04:52 PDT 2013


On Thu, 13 Jun 2013 12:35:36 +0200
John Kåre Alsaker <john.kare.alsaker at gmail.com> wrote:

> I propose the we should change the commit behavior to having commit
> on the toplevel wl_surface
> commit itself and all it's subsurfaces atomically. Commiting on
> subsurfaces should be a no-op.

When a component is running asynchronously, constantly sending new
state to a sub-surface, how do you guarantee, that a toplevel commit
uses a consistent set of state for the sub-surface?

> That is to allow eglSwapBuffers to be used in subsurfaces, should you
> manage to get it to be non-blocking.
> This isn't a huge loss since clients only need to atomically commit
> all surfaces anyway.

No, they don't. We want a component to be able to run independently in
normal circumstances when it does not absolutely require
synchronization to any other surfaces forming the window.

Playing a video should not require the decorations to be committed for
each video frame.

> This has a number of benefits
> - We can get rid of the commit modes (and the set_sync/set_desync
> request) and wl_surface.commit becomes easy to reason about

That would be nice, but I haven't seen any feasible scheme that would
work so.

> - Commiting all surfaces becomes a single request instead of having to
> walking the surface tree bottom up commiting surface along in
> synchronized mode

The most common operation will be committing individual surfaces
independently at arbitrary times. Only resizing will always require
committing through the whole tree.

> - The compositor doesn't have to manage more than 2 states per surface
> (pending and current)

Right, currently we need 3 sets of state. Nice to get rid of, but not a
big deal.

> I don't see any drawbacks from this or the reason for the complexity
> in the current extension

See above.

- pq


More information about the wayland-devel mailing list