From 8306f46dfb93bd8d791803897927f43e0888e2bd Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 9 Aug 2017 15:58:41 -0400 Subject: implement surface frame The surface frame callback lets a window know when it is a good time to show the next frame if it is animating. In particular, this callback is used by weston-simple-shm to throttle drawing. --- include/wlr/types/wlr_surface.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 88a9a4d8..2bfd5d36 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -3,6 +3,11 @@ #include +struct wlr_frame_callback { + struct wl_resource *resource; + struct wl_list link; +}; + struct wlr_surface { struct wl_resource *pending_buffer; bool pending_attached; @@ -16,6 +21,8 @@ struct wlr_surface { struct wl_signal destroy; struct wl_signal commit; } signals; + + struct wl_list frame_callback_list; // wl_surface.frame }; struct wlr_renderer; -- cgit v1.2.3