diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2011-07-29 19:51:22 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-08-27 12:06:10 -0400 |
commit | 0af17ed98c8f8112c0d43ccbf90367f543846143 (patch) | |
tree | 93a6c58aa836286850b3cdebde9f1e3427cfeb7b /protocol/wayland.xml | |
parent | 1648109c84a5e96fd28a29a276a668050dd6c881 (diff) |
Use a callback object instead of ad-hoc lists for sync and frame events
So obvious in retrospect. The object system can do all the work for us
and keep track of pending calls as regular objects and we don't need to
abuse the resource system to get them cleaned up on client exit. We
don't need the custom key management or (broken) lookup, we just sue
object IDs. And last but not least, anybody can receive the callback,
not just display listeners.
Diffstat (limited to 'protocol/wayland.xml')
-rw-r--r-- | protocol/wayland.xml | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 92377c4..f1dd78e 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -42,16 +42,7 @@ The key argument can be used to correlate between multiple sync invocations. --> <request name="sync"> - <arg name="key" type="uint"/> - </request> - - <!-- Request notification when the next frame is displayed. - Useful for throttling redrawing operations, and driving - animations. The notification will only be posted for one - frame unless requested again. --> - <request name="frame"> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="key" type="uint"/> + <arg name="callback" type="new_id" interface="wl_callback"/> </request> <!-- A fatal error has occurred. --> @@ -92,19 +83,14 @@ <event name="range"> <arg name="base" type="uint"/> </event> + </interface> - <!-- A reply to the frame or sync request. The key is the one - used in the request. time is in millisecond units, and - denotes the time when the frame was posted on the - display. time can be used to estimate frame rate, determine - how much to advance animations and compensate for jitter. --> - <event name="key"> - <arg name="key" type="uint"/> + <interface name="wl_callback" version="1"> + <event name="done"> <arg name="time" type="uint"/> </event> </interface> - <!-- A compositor. This object is a global. The compositor is in charge of combining the contents of multiple surfaces into one displayable output. --> @@ -423,6 +409,15 @@ <arg name="width" type="int"/> <arg name="height" type="int"/> </request> + + <!-- Request notification when the next frame is displayed. + Useful for throttling redrawing operations, and driving + animations. The notification will only be posted for one + frame unless requested again. --> + <request name="frame"> + <arg name="callback" type="new_id" interface="wl_callback"/> + </request> + </interface> |