From af2e05cbdfcb0574d20d9c53663ae03819a10fcb Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Wed, 24 Aug 2016 11:04:17 +0200 Subject: [PATCH] vwebp: Clear previous frame when a key triggers a redraw otherwise, transparent areas were accumulating. Change-Id: I066a96a2bcf0cac750b3df0c02229542b1ed3473 (cherry picked from commit c0a27fd2af75dc0c6df7e0847a45fa152b45d0ab) --- examples/vwebp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/vwebp.c b/examples/vwebp.c index 4b3fcf62..61e534ed 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -242,6 +242,9 @@ static void HandleKey(unsigned char key, int pos_x, int pos_y) { } } else if (key == 'i') { kParams.print_info = 1 - kParams.print_info; + // TODO(skal): handle refresh of animation's last-frame too. It's quite + // more involved though (need to save the previous frame). + if (!kParams.has_animation) ClearPreviousFrame(); glutPostRedisplay(); } }