mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
vo_gpu_next: update tmp params before rendering frame
Gives the correct queue size value for the subsequent pl_queue_update() calls, which avoids a bit of unnecessary overhead.
This commit is contained in:
parent
0fd357a416
commit
902bbdad35
@ -918,8 +918,14 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
|
||||
update_options(vo);
|
||||
|
||||
struct pl_render_params params = pars->params;
|
||||
bool will_redraw = frame->display_synced && frame->num_vsyncs > 1;
|
||||
bool cache_frame = will_redraw || frame->still;
|
||||
params.info_callback = info_callback;
|
||||
params.info_priv = vo;
|
||||
params.skip_caching_single_frame = !cache_frame;
|
||||
params.preserve_mixing_cache = p->inter_preserve && !frame->still;
|
||||
if (frame->still)
|
||||
params.frame_mixer = NULL;
|
||||
|
||||
// Push all incoming frames into the frame queue
|
||||
for (int n = 0; n < frame->num_frames; n++) {
|
||||
@ -1069,13 +1075,6 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
|
||||
}
|
||||
}
|
||||
|
||||
bool will_redraw = frame->display_synced && frame->num_vsyncs > 1;
|
||||
bool cache_frame = will_redraw || frame->still;
|
||||
params.skip_caching_single_frame = !cache_frame;
|
||||
params.preserve_mixing_cache = p->inter_preserve && !frame->still;
|
||||
if (frame->still)
|
||||
params.frame_mixer = NULL;
|
||||
|
||||
// Render frame
|
||||
if (!pl_render_image_mix(p->rr, &mix, &target, ¶ms)) {
|
||||
MP_ERR(vo, "Failed rendering frame!\n");
|
||||
|
Loading…
Reference in New Issue
Block a user