mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-18 06:47:31 -04:00
wlr_scene: Maintain one render_list per scene
Since we're now adding every node into the tree into the render_list, the length won't change depending on the output.
This commit is contained in:
parent
35845a94a5
commit
3c71f61c0b
2 changed files with 5 additions and 4 deletions
|
|
@ -110,6 +110,8 @@ struct wlr_scene {
|
||||||
enum wlr_scene_debug_damage_option debug_damage_option;
|
enum wlr_scene_debug_damage_option debug_damage_option;
|
||||||
bool direct_scanout;
|
bool direct_scanout;
|
||||||
bool calculate_visibility;
|
bool calculate_visibility;
|
||||||
|
|
||||||
|
struct wl_array render_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A scene-graph node displaying a single surface. */
|
/** A scene-graph node displaying a single surface. */
|
||||||
|
|
@ -214,8 +216,6 @@ struct wlr_scene_output {
|
||||||
struct wl_listener output_needs_frame;
|
struct wl_listener output_needs_frame;
|
||||||
|
|
||||||
struct wl_list damage_highlight_regions;
|
struct wl_list damage_highlight_regions;
|
||||||
|
|
||||||
struct wl_array render_list;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_scene_timer {
|
struct wlr_scene_timer {
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,8 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
|
||||||
|
|
||||||
wl_list_remove(&scene->presentation_destroy.link);
|
wl_list_remove(&scene->presentation_destroy.link);
|
||||||
wl_list_remove(&scene->linux_dmabuf_v1_destroy.link);
|
wl_list_remove(&scene->linux_dmabuf_v1_destroy.link);
|
||||||
|
|
||||||
|
wl_array_release(&scene->render_list);
|
||||||
} else {
|
} else {
|
||||||
assert(node->parent);
|
assert(node->parent);
|
||||||
}
|
}
|
||||||
|
|
@ -1377,7 +1379,6 @@ void wlr_scene_output_destroy(struct wlr_scene_output *scene_output) {
|
||||||
wl_list_remove(&scene_output->output_damage.link);
|
wl_list_remove(&scene_output->output_damage.link);
|
||||||
wl_list_remove(&scene_output->output_needs_frame.link);
|
wl_list_remove(&scene_output->output_needs_frame.link);
|
||||||
|
|
||||||
wl_array_release(&scene_output->render_list);
|
|
||||||
free(scene_output);
|
free(scene_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1718,7 +1719,7 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
||||||
|
|
||||||
bool calculate_visibility = scene_output->scene->calculate_visibility;
|
bool calculate_visibility = scene_output->scene->calculate_visibility;
|
||||||
struct wlr_scene_node *tree_node = &scene_output->scene->tree.node;
|
struct wlr_scene_node *tree_node = &scene_output->scene->tree.node;
|
||||||
struct wl_array *render_list = &scene_output->render_list;
|
struct wl_array *render_list = &scene_output->scene->render_list;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
render_list->size = 0;
|
render_list->size = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue