mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
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:
parent
87fe13a9fa
commit
8306f46dfb
3 changed files with 56 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue