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.
This commit is contained in:
Tony Crisci 2017-08-09 15:58:41 -04:00 committed by Drew DeVault
parent 87fe13a9fa
commit 8306f46dfb
3 changed files with 56 additions and 1 deletions

View file

@ -3,6 +3,11 @@
#include <wayland-server.h>
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;