mirror of https://github.com/mpv-player/mpv
vo_wayland: remove unnecessary check
buffer_pool_get_front now returns always a valid buffer. No need for corner cases.
This commit is contained in:
parent
20643b6c91
commit
95053ba78b
|
@ -373,7 +373,6 @@ static void frame_handle_redraw(void *data,
|
||||||
struct vo_wayland_state *wl = p->wl;
|
struct vo_wayland_state *wl = p->wl;
|
||||||
shm_buffer_t *buf = buffer_pool_get_front(&p->video_bufpool);
|
shm_buffer_t *buf = buffer_pool_get_front(&p->video_bufpool);
|
||||||
|
|
||||||
if (buf) {
|
|
||||||
wl_surface_attach(wl->window.video_surface, buf->buffer, p->x, p->y);
|
wl_surface_attach(wl->window.video_surface, buf->buffer, p->x, p->y);
|
||||||
wl_surface_damage(wl->window.video_surface, 0, 0, p->dst_w, p->dst_h);
|
wl_surface_damage(wl->window.video_surface, 0, 0, p->dst_w, p->dst_h);
|
||||||
|
|
||||||
|
@ -387,14 +386,6 @@ static void frame_handle_redraw(void *data,
|
||||||
|
|
||||||
p->x = 0;
|
p->x = 0;
|
||||||
p->y = 0;
|
p->y = 0;
|
||||||
}
|
|
||||||
else {
|
|
||||||
MP_WARN(wl, "Should not happen anymore (frame)\n");
|
|
||||||
if (callback)
|
|
||||||
wl_callback_destroy(callback);
|
|
||||||
|
|
||||||
p->redraw_callback = NULL;
|
|
||||||
}
|
|
||||||
p->recent_flip_time = mp_time_us();
|
p->recent_flip_time = mp_time_us();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue