[PATCH wayland 2/2] protocol: Refine wl_surface.commit text

Derek Foreman derekf at osg.samsung.com
Fri Nov 20 13:49:59 PST 2015


The order of operations during wl_surface.commit hasn't been clarified
since wp_viewport, wl_surface.set_buffer_transform and
wl_surface.set_buffer_scale were added.

Explain that any state that changes co-ordinates is applied first, and
that unchanged co-ordinate altering state is held over from previous
commits.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---

Instead of putting this in the damage_buffer commit I figured I'd
try to keep it separate.  I think we can paint this bike shed
independently, and don't need to hold up the weston damage_buffer
implementation for it?

I'll happily squash the two patches if that's unreasonable.
 protocol/wayland.xml | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 4d75f39..3cd440f 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -1229,11 +1229,16 @@
 	state. After commit, the new pending state is as documented for each
 	related request.
 
-	On commit, a pending wl_buffer is applied first, all other state
-	second. This means that all coordinates in double-buffered state are
-	relative to the new wl_buffer coming into use, except for
-	wl_surface.attach itself. If there is no pending wl_buffer, the
-	coordinates are relative to the current surface contents.
+	On commit, a pending wl_buffer is applied first.  State which
+	affects the buffer to surface co-ordinate conversion (such as
+	wp_viewport or buffer scale and transform) should be applied next.
+	These bits of state are carried over from the previous commit if
+	the current commit doesn't replace them.
+
+	All other state follows. This means that all coordinates in
+	double-buffered state are relative to the new wl_buffer and
+	its associated transformations, except for wl_surface.attach
+	itself.
 
 	All requests that need a commit to become effective are documented
 	to affect double-buffered state.
-- 
2.6.2



More information about the wayland-devel mailing list