aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-03-13 11:21:56 +0100
committerSimon Ser <contact@emersion.fr>2022-03-16 16:42:45 +0000
commit68f2f8cf927d0ea9082438c130ffbc7c5d69fd85 (patch)
treec9cd7375f45f115f35e8524aad76bdd37c841475
parent2d623724c3571b35cd95cf907df0435f29a3c88c (diff)
Revert "scene: try to import buffers as textures before rendering"
This reverts commit 3db1bcbe641b407b9f5c9e5d0a012b45aa2c6cb7. Since [1], importing buffers as textures before wlr_renderer_begin isn't necessary anymore. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3464
-rw-r--r--include/wlr/types/wlr_scene.h4
-rw-r--r--types/scene/wlr_scene.c14
2 files changed, 0 insertions, 18 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h
index 86775399..7c2238fb 100644
--- a/include/wlr/types/wlr_scene.h
+++ b/include/wlr/types/wlr_scene.h
@@ -69,9 +69,6 @@ struct wlr_scene {
// May be NULL
struct wlr_presentation *presentation;
struct wl_listener presentation_destroy;
-
- // List of buffers which need to be imported as textures
- struct wl_list pending_buffers; // wlr_scene_buffer.pending_link
};
/** A sub-tree in the scene-graph. */
@@ -118,7 +115,6 @@ struct wlr_scene_buffer {
struct wlr_fbox src_box;
int dst_width, dst_height;
enum wl_output_transform transform;
- struct wl_list pending_link; // wlr_scene.pending_buffers
};
/** A viewport for an output in the scene-graph */
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index 5d5ff965..9353fef5 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -130,7 +130,6 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
break;
case WLR_SCENE_NODE_BUFFER:;
struct wlr_scene_buffer *scene_buffer = scene_buffer_from_node(node);
- wl_list_remove(&scene_buffer->pending_link);
wlr_texture_destroy(scene_buffer->texture);
wlr_buffer_unlock(scene_buffer->buffer);
free(scene_buffer);
@@ -146,7 +145,6 @@ struct wlr_scene *wlr_scene_create(void) {
scene_node_init(&scene->node, WLR_SCENE_NODE_ROOT, NULL);
wl_list_init(&scene->outputs);
wl_list_init(&scene->presentation_destroy.link);
- wl_list_init(&scene->pending_buffers);
return scene;
}
@@ -362,9 +360,6 @@ struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_node *parent,
scene_node_damage_whole(&scene_buffer->node);
- struct wlr_scene *scene = scene_node_get_root(parent);
- wl_list_insert(&scene->pending_buffers, &scene_buffer->pending_link);
-
return scene_buffer;
}
@@ -1118,15 +1113,6 @@ bool wlr_scene_output_commit(struct wlr_scene_output *scene_output) {
return true;
}
- // Try to import new buffers as textures
- struct wlr_scene_buffer *scene_buffer, *scene_buffer_tmp;
- wl_list_for_each_safe(scene_buffer, scene_buffer_tmp,
- &scene_output->scene->pending_buffers, pending_link) {
- scene_buffer_get_texture(scene_buffer, renderer);
- wl_list_remove(&scene_buffer->pending_link);
- wl_list_init(&scene_buffer->pending_link);
- }
-
wlr_renderer_begin(renderer, output->width, output->height);
int nrects;