From 19e7cf877b6a925517238c59485edf5fe85bf2a1 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 13 Aug 2011 00:47:16 +0300 Subject: gpu_neon: frameskip: skip blits until flipped --- plugins/gpu_neon/vout_fb.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'plugins/gpu_neon/vout_fb.c') diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c index b7cb41b..1dfa8ab 100644 --- a/plugins/gpu_neon/vout_fb.c +++ b/plugins/gpu_neon/vout_fb.c @@ -81,20 +81,29 @@ static void blit(void) void GPUupdateLace(void) { - if (gpu.frameskip.enabled && !gpu.frameskip.frame_ready) + if (gpu.status.blanking || !gpu.state.fb_dirty) return; - if (!gpu.status.blanking && gpu.state.fb_dirty) { - renderer_flush_queues(); - blit(); - gpu.state.fb_dirty = 0; + if (gpu.frameskip.enabled) { + if (!gpu.frameskip.frame_ready && gpu.frameskip.skipped_blits < 6) { + gpu.frameskip.skipped_blits++; + return; + } + gpu.frameskip.frame_ready = 0; + gpu.frameskip.skipped_blits = 0; } + + renderer_flush_queues(); + blit(); + gpu.state.fb_dirty = 0; } long GPUopen(void) { gpu.frameskip.enabled = cbs->frameskip; gpu.frameskip.advice = &cbs->fskip_advice; + gpu.frameskip.active = 0; + gpu.frameskip.frame_ready = 1; cbs->pl_vout_open(); screen_buf = cbs->pl_vout_flip(); @@ -110,9 +119,6 @@ long GPUclose(void) void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_) { cbs = cbs_; - gpu.frameskip.enabled = cbs->frameskip; - gpu.frameskip.advice = &cbs->fskip_advice; - gpu.frameskip.active = gpu.frameskip.frame_ready = 0; } // vim:shiftwidth=2:expandtab -- cgit v1.2.3