aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c10
-rw-r--r--backend/wayland/output.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index b62de849..d845a888 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -404,8 +404,8 @@ static bool drm_connector_commit_buffer(struct wlr_output *output) {
conn->pageflip_pending = true;
if (output->pending.buffer_type == WLR_OUTPUT_STATE_BUFFER_SCANOUT) {
- wlr_buffer_unref(conn->pending_buffer);
- conn->pending_buffer = wlr_buffer_ref(output->pending.buffer);
+ wlr_buffer_unlock(conn->pending_buffer);
+ conn->pending_buffer = wlr_buffer_lock(output->pending.buffer);
}
wlr_output_update_enabled(output, true);
@@ -1539,7 +1539,7 @@ static void page_flip_handler(int fd, unsigned seq,
// Release the old buffer as it's not displayed anymore. The pending
// buffer becomes the current buffer.
- wlr_buffer_unref(conn->current_buffer);
+ wlr_buffer_unlock(conn->current_buffer);
conn->current_buffer = conn->pending_buffer;
conn->pending_buffer = NULL;
@@ -1660,8 +1660,8 @@ static void drm_connector_cleanup(struct wlr_drm_connector *conn) {
conn->output.needs_frame = false;
conn->output.frame_pending = false;
- wlr_buffer_unref(conn->pending_buffer);
- wlr_buffer_unref(conn->current_buffer);
+ wlr_buffer_unlock(conn->pending_buffer);
+ wlr_buffer_unlock(conn->current_buffer);
conn->pending_buffer = conn->current_buffer = NULL;
/* Fallthrough */
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 2c80c77f..1f00209b 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -114,7 +114,7 @@ static void destroy_wl_buffer(struct wlr_wl_buffer *buffer) {
return;
}
wl_buffer_destroy(buffer->wl_buffer);
- wlr_buffer_unref(buffer->buffer);
+ wlr_buffer_unlock(buffer->buffer);
free(buffer);
}
@@ -173,7 +173,7 @@ static struct wlr_wl_buffer *create_wl_buffer(struct wlr_wl_backend *wl,
return NULL;
}
buffer->wl_buffer = wl_buffer;
- buffer->buffer = wlr_buffer_ref(wlr_buffer);
+ buffer->buffer = wlr_buffer_lock(wlr_buffer);
wl_buffer_add_listener(wl_buffer, &buffer_listener, buffer);