mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-29 16:05:59 +01:00
buffer: make wlr_buffer_ref return the buffer
This commit is contained in:
parent
9ea5b1a85e
commit
38d415dd20
2 changed files with 3 additions and 2 deletions
|
@ -36,7 +36,7 @@ struct wlr_buffer *wlr_buffer_create(struct wlr_renderer *renderer,
|
||||||
/**
|
/**
|
||||||
* Reference the buffer.
|
* Reference the buffer.
|
||||||
*/
|
*/
|
||||||
void wlr_buffer_ref(struct wlr_buffer *buffer);
|
struct wlr_buffer *wlr_buffer_ref(struct wlr_buffer *buffer);
|
||||||
/**
|
/**
|
||||||
* Unreference the buffer. After this call, `buffer` may not be accessed
|
* Unreference the buffer. After this call, `buffer` may not be accessed
|
||||||
* anymore.
|
* anymore.
|
||||||
|
|
|
@ -105,8 +105,9 @@ struct wlr_buffer *wlr_buffer_create(struct wlr_renderer *renderer,
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_buffer_ref(struct wlr_buffer *buffer) {
|
struct wlr_buffer *wlr_buffer_ref(struct wlr_buffer *buffer) {
|
||||||
buffer->n_refs++;
|
buffer->n_refs++;
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_buffer_unref(struct wlr_buffer *buffer) {
|
void wlr_buffer_unref(struct wlr_buffer *buffer) {
|
||||||
|
|
Loading…
Reference in a new issue