forked from len0rd/rockbox
ImageViewer: Improve smoothness of animated gif playback
Don't disable grayscale overlay, don't show "resize" messages between frames and and don't clear display unless actually necessary Change-Id: I9f501d8280ce0c8f26f4345088d805d1b84cf143
This commit is contained in:
parent
3adeae2026
commit
fbdcfca085
2 changed files with 7 additions and 3 deletions
|
@ -210,7 +210,7 @@ static int get_image(struct image_info *info, int frame, int ds)
|
||||||
/* assign image buffer */
|
/* assign image buffer */
|
||||||
if (ds > 1)
|
if (ds > 1)
|
||||||
{
|
{
|
||||||
if (!iv->running_slideshow)
|
if (!iv->running_slideshow && (info->frames_count == 1))
|
||||||
{
|
{
|
||||||
rb->lcd_putsf(0, 3, "resizing %d*%d", info->width, info->height);
|
rb->lcd_putsf(0, 3, "resizing %d*%d", info->width, info->height);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
|
@ -915,6 +915,7 @@ static int load_and_show(char* filename, struct image_info *info)
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (frame == 0)
|
||||||
mylcd_ub_clear_display();
|
mylcd_ub_clear_display();
|
||||||
imgdec->draw_image_rect(info, 0, 0,
|
imgdec->draw_image_rect(info, 0, 0,
|
||||||
info->width-info->x, info->height-info->y);
|
info->width-info->x, info->height-info->y);
|
||||||
|
@ -956,6 +957,7 @@ static int load_and_show(char* filename, struct image_info *info)
|
||||||
get_view(info, &cx, &cy);
|
get_view(info, &cx, &cy);
|
||||||
cx /= zoom; /* prepare the position in the new image */
|
cx /= zoom; /* prepare the position in the new image */
|
||||||
cy /= zoom;
|
cy /= zoom;
|
||||||
|
mylcd_ub_clear_display();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
@ -969,12 +971,14 @@ static int load_and_show(char* filename, struct image_info *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USEGSLIB
|
#ifdef USEGSLIB
|
||||||
|
if (info->frames_count <= 1)
|
||||||
grey_show(false); /* switch off overlay */
|
grey_show(false); /* switch off overlay */
|
||||||
#endif
|
#endif
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
}
|
}
|
||||||
while (status > PLUGIN_OTHER);
|
while (status > PLUGIN_OTHER);
|
||||||
#ifdef USEGSLIB
|
#ifdef USEGSLIB
|
||||||
|
grey_show(false); /* switch off overlay */
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
#endif
|
#endif
|
||||||
return status;
|
return status;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue