summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2021-11-19 22:40:19 +0100
committerNiklas Haas <git@haasn.dev>2021-11-19 22:42:21 +0100
commit170259c7c39063fd61edfc2795126f4027fb4a92 (patch)
treeafd741cb16928b75f87f71c82098f17d29a95ea1
parent763e0d259f4485551379c36fe7db48610ebabbab (diff)
downloadmpv-170259c7c39063fd61edfc2795126f4027fb4a92.tar.bz2
mpv-170259c7c39063fd61edfc2795126f4027fb4a92.tar.xz
vo_gpu_next: always cache still frames
Even when not display synced. Prevents redraw overhead for refreshes while paused. Also make the logic slightly clearer to follow (since it's inverted).
-rw-r--r--video/out/vo_gpu_next.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 44b16638b1..8a5f078939 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -732,7 +732,9 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
}
#if PL_API_VER >= 179
- p->params.skip_caching_single_frame = !frame->display_synced || frame->num_vsyncs == 1;
+ bool will_redraw = frame->display_synced && frame->num_vsyncs > 1;
+ bool cache_frame = will_redraw || frame->still;
+ p->params.skip_caching_single_frame = !cache_frame;
#endif
p->params.preserve_mixing_cache = p->inter_preserve && !frame->still;
p->params.allow_delayed_peak_detect = p->delayed_peak;