mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 14:15:58 +01:00
scene: drop wlr_scene_set_presentation()
This commit is contained in:
parent
d68ba9d6c2
commit
ab924064f2
3 changed files with 0 additions and 35 deletions
|
@ -99,12 +99,10 @@ struct wlr_scene {
|
|||
struct wl_list outputs; // wlr_scene_output.link
|
||||
|
||||
// May be NULL
|
||||
struct wlr_presentation *presentation;
|
||||
struct wlr_linux_dmabuf_v1 *linux_dmabuf_v1;
|
||||
|
||||
// private state
|
||||
|
||||
struct wl_listener presentation_destroy;
|
||||
struct wl_listener linux_dmabuf_v1_destroy;
|
||||
|
||||
enum wlr_scene_debug_damage_option debug_damage_option;
|
||||
|
@ -303,15 +301,6 @@ struct wlr_scene_node *wlr_scene_node_at(struct wlr_scene_node *node,
|
|||
*/
|
||||
struct wlr_scene *wlr_scene_create(void);
|
||||
|
||||
/**
|
||||
* Handle presentation feedback for all surfaces in the scene, assuming that
|
||||
* scene outputs and the scene rendering functions are used.
|
||||
*
|
||||
* Asserts that a struct wlr_presentation hasn't already been set for the scene.
|
||||
*/
|
||||
void wlr_scene_set_presentation(struct wlr_scene *scene,
|
||||
struct wlr_presentation *presentation);
|
||||
|
||||
/**
|
||||
* Handles linux_dmabuf_v1 feedback for all surfaces in the scene.
|
||||
*
|
||||
|
|
|
@ -48,11 +48,6 @@ static void handle_scene_buffer_output_sample(
|
|||
return;
|
||||
}
|
||||
|
||||
struct wlr_scene *root = scene_node_get_root(&surface->buffer->node);
|
||||
if (!root->presentation) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->direct_scanout) {
|
||||
wlr_presentation_surface_scanned_out_on_output(surface->surface, scene_output->output);
|
||||
} else {
|
||||
|
|
|
@ -123,7 +123,6 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
|
|||
wlr_scene_output_destroy(scene_output);
|
||||
}
|
||||
|
||||
wl_list_remove(&scene->presentation_destroy.link);
|
||||
wl_list_remove(&scene->linux_dmabuf_v1_destroy.link);
|
||||
} else {
|
||||
assert(node->parent);
|
||||
|
@ -157,7 +156,6 @@ struct wlr_scene *wlr_scene_create(void) {
|
|||
scene_tree_init(&scene->tree, NULL);
|
||||
|
||||
wl_list_init(&scene->outputs);
|
||||
wl_list_init(&scene->presentation_destroy.link);
|
||||
wl_list_init(&scene->linux_dmabuf_v1_destroy.link);
|
||||
|
||||
const char *debug_damage_options[] = {
|
||||
|
@ -1193,23 +1191,6 @@ static void scene_entry_render(struct render_list_entry *entry, const struct ren
|
|||
pixman_region32_fini(&render_region);
|
||||
}
|
||||
|
||||
static void scene_handle_presentation_destroy(struct wl_listener *listener,
|
||||
void *data) {
|
||||
struct wlr_scene *scene =
|
||||
wl_container_of(listener, scene, presentation_destroy);
|
||||
wl_list_remove(&scene->presentation_destroy.link);
|
||||
wl_list_init(&scene->presentation_destroy.link);
|
||||
scene->presentation = NULL;
|
||||
}
|
||||
|
||||
void wlr_scene_set_presentation(struct wlr_scene *scene,
|
||||
struct wlr_presentation *presentation) {
|
||||
assert(scene->presentation == NULL);
|
||||
scene->presentation = presentation;
|
||||
scene->presentation_destroy.notify = scene_handle_presentation_destroy;
|
||||
wl_signal_add(&presentation->events.destroy, &scene->presentation_destroy);
|
||||
}
|
||||
|
||||
static void scene_handle_linux_dmabuf_v1_destroy(struct wl_listener *listener,
|
||||
void *data) {
|
||||
struct wlr_scene *scene =
|
||||
|
|
Loading…
Reference in a new issue