aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-11-23 16:05:37 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2023-11-30 14:44:46 +0000
commitf935ff0ef6e9ed95eb33fdc5dfec39d53a6d7134 (patch)
tree0a4b03a60206c07268fa7ea12465db6e8c63f036 /backend
parent260dbdf7040a01d9cdb40f2e1e8069786027db4f (diff)
backend/drm: move drm_plane_finish_surface() to drm.c
This function touches queued_fb/current_fb, which the renderer has nothing to do with.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c11
-rw-r--r--backend/drm/renderer.c14
2 files changed, 12 insertions, 13 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 41b4ea96..b630c9dd 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -305,6 +305,17 @@ error_res:
return false;
}
+static void drm_plane_finish_surface(struct wlr_drm_plane *plane) {
+ if (!plane) {
+ return;
+ }
+
+ drm_fb_clear(&plane->queued_fb);
+ drm_fb_clear(&plane->current_fb);
+
+ finish_drm_surface(&plane->mgpu_surf);
+}
+
void finish_drm_resources(struct wlr_drm_backend *drm) {
if (!drm) {
return;
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 6619d6e9..374f071f 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -41,7 +41,7 @@ void finish_drm_renderer(struct wlr_drm_renderer *renderer) {
wlr_renderer_destroy(renderer->wlr_rend);
}
-static void finish_drm_surface(struct wlr_drm_surface *surf) {
+void finish_drm_surface(struct wlr_drm_surface *surf) {
if (!surf || !surf->renderer) {
return;
}
@@ -121,18 +121,6 @@ error_tex:
return NULL;
}
-
-void drm_plane_finish_surface(struct wlr_drm_plane *plane) {
- if (!plane) {
- return;
- }
-
- drm_fb_clear(&plane->queued_fb);
- drm_fb_clear(&plane->current_fb);
-
- finish_drm_surface(&plane->mgpu_surf);
-}
-
bool drm_plane_pick_render_format(struct wlr_drm_plane *plane,
struct wlr_drm_format *fmt, struct wlr_drm_renderer *renderer) {
const struct wlr_drm_format_set *render_formats =