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).
This commit is contained in:
Niklas Haas 2021-11-19 22:40:19 +01:00
parent 763e0d259f
commit 170259c7c3
1 changed files with 3 additions and 1 deletions

View File

@ -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;