summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-11-06 17:35:17 -0600
committerDudemanguy <random342@airmail.cc>2023-11-07 00:52:46 +0000
commit4aa3866400f2bbd0c971537b3de2d2cd455585ed (patch)
treef602a0488974f327e09122b7f6824d4381f59d2c
parent506e8d9eafe70d65e78800b46c490e2dea6e68bc (diff)
downloadmpv-4aa3866400f2bbd0c971537b3de2d2cd455585ed.tar.bz2
mpv-4aa3866400f2bbd0c971537b3de2d2cd455585ed.tar.xz
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.
-rw-r--r--video/out/drm_common.c1
-rw-r--r--video/out/present_sync.c9
-rw-r--r--video/out/present_sync.h3
3 files changed, 0 insertions, 13 deletions
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);