mirror of https://github.com/mpv-player/mpv
vo_gpu: enable frame caching for still frames
For some reason this was never done? Looking through the code, it was never the case that the frame cache was hit for still frames. I have no idea why not. It makes a lot of sense to do so. Notably, this massively improves the performance of updating the OSC when viewing e.g. large still images, or while paused. (Tested on a 4000x8000 image, the OSC now responds smoothly to user input)
This commit is contained in:
parent
2aa5964b43
commit
4f0206ab04
|
@ -3286,9 +3286,9 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame,
|
|||
// For the non-interpolation case, we draw to a single "cache"
|
||||
// texture to speed up subsequent re-draws (if any exist)
|
||||
struct ra_fbo dest_fbo = fbo;
|
||||
if (frame->num_vsyncs > 1 && frame->display_synced &&
|
||||
!p->dumb_mode && (p->ra->caps & RA_CAP_BLIT) &&
|
||||
fbo.tex->params.blit_dst)
|
||||
bool repeats = frame->num_vsyncs > 1 && frame->display_synced;
|
||||
if ((repeats || frame->still) && !p->dumb_mode &&
|
||||
(p->ra->caps & RA_CAP_BLIT) && fbo.tex->params.blit_dst)
|
||||
{
|
||||
// Attempt to use the same format as the destination FBO
|
||||
// if possible. Some RAs use a wrapped dummy format here,
|
||||
|
|
Loading…
Reference in New Issue