Fractals: Use overlay (do not clear the screen and paint the same region) when changing precision

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24275 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tomer Shalev 2010-01-18 16:36:06 +00:00
parent 26542ddc84
commit 39e51cc66e

View file

@ -49,6 +49,7 @@ static size_t gbuf_size = 0;
#define REDRAW_NONE 0
#define REDRAW_PARTIAL 1
#define REDRAW_FULL 2
#define REDRAW_FULL_OVERLAY 3
PLUGIN_HEADER
@ -139,11 +140,17 @@ enum plugin_status plugin_start(const void* parameter)
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
rb->cpu_boost(true);
#endif
if (redraw == REDRAW_FULL)
switch (redraw)
{
case REDRAW_FULL:
MYLCD(clear_display)();
MYLCD_UPDATE();
/* fall-through */
case REDRAW_FULL_OVERLAY:
rects_queue_init();
break;
default:
break;
}
/* paint all rects */
@ -229,7 +236,7 @@ enum plugin_status plugin_start(const void* parameter)
break;
#endif
if (ops->precision(-1))
redraw = REDRAW_FULL;
redraw = REDRAW_FULL_OVERLAY;
break;
@ -239,7 +246,7 @@ enum plugin_status plugin_start(const void* parameter)
break;
#endif
if (ops->precision(+1))
redraw = REDRAW_FULL;
redraw = REDRAW_FULL_OVERLAY;
break;