mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-25 23:45:58 +01:00
Remove unecessary checks in wlr_screencast.c
This commit is contained in:
parent
c6253415c0
commit
15e30ed35d
1 changed files with 2 additions and 7 deletions
|
@ -131,12 +131,12 @@ static void wlr_frame_buffer(void *data, struct zwlr_screencopy_frame_v1 *frame,
|
|||
wlr_frame_buffer_chparam(cast, format, width, height, stride);
|
||||
}
|
||||
|
||||
if (cast->simple_frame.buffer == NULL && cast->simple_frame.data == NULL) {
|
||||
if (cast->simple_frame.buffer == NULL) {
|
||||
logprint(DEBUG, "wlroots: create shm buffer");
|
||||
cast->simple_frame.buffer = create_shm_buffer(cast, format, width, height,
|
||||
stride, &cast->simple_frame.data);
|
||||
} else {
|
||||
logprint(DEBUG,"wlroots: shm buffer or data exists");
|
||||
logprint(DEBUG,"wlroots: shm buffer exists");
|
||||
}
|
||||
|
||||
if (cast->simple_frame.buffer == NULL) {
|
||||
|
@ -144,11 +144,6 @@ static void wlr_frame_buffer(void *data, struct zwlr_screencopy_frame_v1 *frame,
|
|||
abort();
|
||||
}
|
||||
|
||||
if (cast->simple_frame.data == NULL) {
|
||||
logprint(ERROR, "wlroots: failed to map data");
|
||||
abort();
|
||||
}
|
||||
|
||||
zwlr_screencopy_frame_v1_copy_with_damage(frame, cast->simple_frame.buffer);
|
||||
logprint(TRACE, "wlroots: frame copied");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue