mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
scene: add wlr_scene_set_presentation()
This helper automates sending presentation feedback to clients based on the primary output of scene surfaces.
This commit is contained in:
parent
c0b120a30c
commit
07ccc6e0b3
2 changed files with 56 additions and 0 deletions
|
|
@ -62,6 +62,12 @@ struct wlr_scene {
|
|||
struct wlr_scene_node node;
|
||||
|
||||
struct wl_list outputs; // wlr_scene_output.link
|
||||
|
||||
// private state
|
||||
|
||||
// May be NULL
|
||||
struct wlr_presentation *presentation;
|
||||
struct wl_listener presentation_destroy;
|
||||
};
|
||||
|
||||
/** A sub-tree in the scene-graph. */
|
||||
|
|
@ -201,6 +207,14 @@ struct wlr_scene *wlr_scene_create(void);
|
|||
*/
|
||||
void wlr_scene_render_output(struct wlr_scene *scene, struct wlr_output *output,
|
||||
int lx, int ly, pixman_region32_t *damage);
|
||||
/**
|
||||
* Handle presentation feedback for all surfaces in the scene, assuming that
|
||||
* scene outputs and the scene rendering functions are used.
|
||||
*
|
||||
* Asserts that a wlr_presentation hasn't already been set for the scene.
|
||||
*/
|
||||
void wlr_scene_set_presentation(struct wlr_scene *scene,
|
||||
struct wlr_presentation *presentation);
|
||||
|
||||
/**
|
||||
* Add a node displaying nothing but its children.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue