mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 06:05:58 +01:00
screencopy: Add some logging
This commit is contained in:
parent
3224fe6a51
commit
94c31b824c
1 changed files with 12 additions and 0 deletions
|
@ -207,6 +207,7 @@ static bool frame_shm_copy(struct wlr_screencopy_frame_v1 *frame,
|
|||
|
||||
struct wlr_texture *texture = wlr_texture_from_buffer(renderer, src_buffer);
|
||||
if (!texture) {
|
||||
wlr_log(WLR_DEBUG, "Failed to grab a texture from a buffer during shm screencopy");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -221,6 +222,11 @@ static bool frame_shm_copy(struct wlr_screencopy_frame_v1 *frame,
|
|||
|
||||
out:
|
||||
wlr_buffer_end_data_ptr_access(frame->buffer);
|
||||
|
||||
if (!ok) {
|
||||
wlr_log(WLR_DEBUG, "Failed to copy to destination during shm screencopy");
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
@ -234,6 +240,7 @@ static bool frame_dma_copy(struct wlr_screencopy_frame_v1 *frame,
|
|||
struct wlr_texture *src_tex =
|
||||
wlr_texture_from_buffer(renderer, src_buffer);
|
||||
if (src_tex == NULL) {
|
||||
wlr_log(WLR_DEBUG, "Failed to grab a texture from a buffer during dma screencopy");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -264,6 +271,11 @@ static bool frame_dma_copy(struct wlr_screencopy_frame_v1 *frame,
|
|||
|
||||
out:
|
||||
wlr_texture_destroy(src_tex);
|
||||
|
||||
if (!ok) {
|
||||
wlr_log(WLR_DEBUG, "Failed to render to destination during dma screencopy");
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue