mirror of https://github.com/mpv-player/mpv
present_sync: remove unneeded clear_values function
This was specifically special logic for drm. Before present_sync, it would also clear out all of its vsync values like this. The old drm code would save a bunch of samples which would confuse vo.c when unpausing since it got old, bogus values. Since we make sure to match successive vsync samples with the swapchain depth and that present sync samples also match the swapchain depth, this is unneeded.
This commit is contained in:
parent
506e8d9eaf
commit
4aa3866400
|
@ -943,7 +943,6 @@ int vo_drm_control(struct vo *vo, int *events, int request, void *arg)
|
||||||
return VO_TRUE;
|
return VO_TRUE;
|
||||||
case VOCTRL_RESUME:
|
case VOCTRL_RESUME:
|
||||||
drm->paused = false;
|
drm->paused = false;
|
||||||
present_sync_clear_values(drm->present);
|
|
||||||
return VO_TRUE;
|
return VO_TRUE;
|
||||||
}
|
}
|
||||||
return VO_NOTIMPL;
|
return VO_NOTIMPL;
|
||||||
|
|
|
@ -108,15 +108,6 @@ void present_sync_swap(struct mp_present *present)
|
||||||
cur->queue_display_time = ust_mp_time;
|
cur->queue_display_time = ust_mp_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
void present_sync_clear_values(struct mp_present *present)
|
|
||||||
{
|
|
||||||
struct mp_present_entry *cur = present->head;
|
|
||||||
while (cur) {
|
|
||||||
*cur = (struct mp_present_entry){0};
|
|
||||||
cur = cur->list_node.next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void present_sync_update_values(struct mp_present *present, int64_t ust,
|
void present_sync_update_values(struct mp_present *present, int64_t ust,
|
||||||
int64_t msc)
|
int64_t msc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,9 +50,6 @@ void present_sync_get_info(struct mp_present *present, struct vo_vsync_info *inf
|
||||||
// Called after every buffer swap to update presentation statistics.
|
// Called after every buffer swap to update presentation statistics.
|
||||||
void present_sync_swap(struct mp_present *present);
|
void present_sync_swap(struct mp_present *present);
|
||||||
|
|
||||||
// Zero the entire list but keep the items.
|
|
||||||
void present_sync_clear_values(struct mp_present *present);
|
|
||||||
|
|
||||||
// Called anytime the backend delivers new ust/msc values.
|
// Called anytime the backend delivers new ust/msc values.
|
||||||
void present_sync_update_values(struct mp_present *present, int64_t ust,
|
void present_sync_update_values(struct mp_present *present, int64_t ust,
|
||||||
int64_t msc);
|
int64_t msc);
|
||||||
|
|
Loading…
Reference in New Issue