mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-02 01:05:58 +01:00
screencopy-v1: stop using wlr_client_buffer
We can just use the wlr_dmabuf_v1_buffer directly, no need to wrap it in a wlr_client_buffer.
This commit is contained in:
parent
68758e8c21
commit
a8d7c2d4ea
1 changed files with 1 additions and 6 deletions
|
@ -266,12 +266,7 @@ static void frame_handle_output_precommit(struct wl_listener *listener,
|
||||||
static bool blit_dmabuf(struct wlr_renderer *renderer,
|
static bool blit_dmabuf(struct wlr_renderer *renderer,
|
||||||
struct wlr_dmabuf_v1_buffer *dst_dmabuf,
|
struct wlr_dmabuf_v1_buffer *dst_dmabuf,
|
||||||
struct wlr_dmabuf_attributes *src_attrs) {
|
struct wlr_dmabuf_attributes *src_attrs) {
|
||||||
struct wlr_client_buffer *dst_client_buffer =
|
struct wlr_buffer *dst_buffer = wlr_buffer_lock(&dst_dmabuf->base);
|
||||||
wlr_client_buffer_import(renderer, dst_dmabuf->resource);
|
|
||||||
if (dst_client_buffer == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
struct wlr_buffer *dst_buffer = &dst_client_buffer->base;
|
|
||||||
|
|
||||||
struct wlr_texture *src_tex = wlr_texture_from_dmabuf(renderer, src_attrs);
|
struct wlr_texture *src_tex = wlr_texture_from_dmabuf(renderer, src_attrs);
|
||||||
if (src_tex == NULL) {
|
if (src_tex == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue