[Wayland-bugs] [Bug 88857] subsurface protocol is inconsistent regarding immediate commit vs deferred commit
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jan 28 19:45:52 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=88857
Bug ID: 88857
Summary: subsurface protocol is inconsistent regarding
immediate commit vs deferred commit
Product: Wayland
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: major
Priority: medium
Component: wayland
Assignee: wayland-bugs at lists.freedesktop.org
Reporter: jadahl at gmail.com
The subsurface protocol is a bit ambiguous regarding what should be considered
a commit of a parent surface in different scenarios, and possibly at fault in
others.
The question is whether a deferred commit (commit during synchronized mode,
then parent commits), should be recursive considered equivalent to
wl_surface.commit of the parent surface. For cached surface states, this is
pretty clearly stated that the state should "be applied when the parent's state
gets applied", i.e. either if the parent surface goes effectively
desynchronized or the state is applied by a commit coming from another parent.
For positioning its different though, as the spec says that "the next
wl_surface.commit on the parent surface will reset the sub-surface's position
to the scheduled coordinates", and not "the next time the parent's surface
state gets applied. The same applies for the z-order operations.
The problem with the current wording though is that in synchronized mode, a
pending positioning of the subsurface and a cached surface state of the
subsurface does not get applied at the same time, as the state gets applied
when its parent state gets applied, while the positioning requires an explicit
wl_surface.commit on the parent surface.
Another problem is when a subsurface goes from effectively synchronized to
effectively desynchronized. Making that transition the cached surface state of
the subsurface gets applied, but the positioning still needs an explicit
wl_surface.commit on the parent surface.
A correct implementation according to the current wording would result in
making it impossible to make an atomic change to a subsurface tree as one would
need to commit the surface states independently from the positioning (one
commit to the top level surface that recursively applies all the cached states
of the surfaces down the tree for the surface states, vs wl_surface.commit on
every parent surface in the tree for the positioning).
I don't know whether it can be considered a bug in the wording and just change
"wl_surface.commit of the parent surface" to "surface state of the parent
surface applied" to the positioning requests, as it would change the semantics.
As a side note, weston does not follow the spec, as it applies the positioning
recursively when a state is applied, not when the wl_surface.commit of the
parent surface is called, so if we don't correct the spec, then we need to make
weston follow it by only positioning a parents subsurfaces on an explicit
wl_surface.commit of the parent surface.
Please correct me if I got something wrong.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150129/3d0612ac/attachment.html>
More information about the wayland-bugs
mailing list