From 4aa3866400f2bbd0c971537b3de2d2cd455585ed Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 6 Nov 2023 17:35:17 -0600 Subject: 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. --- video/out/drm_common.c | 1 - video/out/present_sync.c | 9 --------- video/out/present_sync.h | 3 --- 3 files changed, 13 deletions(-) (limited to 'video/out') diff --git a/video/out/drm_common.c b/video/out/drm_common.c index fcd2a3baee..aeb0bbde52 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -943,7 +943,6 @@ int vo_drm_control(struct vo *vo, int *events, int request, void *arg) return VO_TRUE; case VOCTRL_RESUME: drm->paused = false; - present_sync_clear_values(drm->present); return VO_TRUE; } return VO_NOTIMPL; diff --git a/video/out/present_sync.c b/video/out/present_sync.c index e527f8cf98..a3b1089f1a 100644 --- a/video/out/present_sync.c +++ b/video/out/present_sync.c @@ -108,15 +108,6 @@ void present_sync_swap(struct mp_present *present) 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, int64_t msc) { diff --git a/video/out/present_sync.h b/video/out/present_sync.h index 7ec0edb85c..ba6d0b3bf4 100644 --- a/video/out/present_sync.h +++ b/video/out/present_sync.h @@ -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. 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. void present_sync_update_values(struct mp_present *present, int64_t ust, int64_t msc); -- cgit v1.2.3