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:
parent
26542ddc84
commit
39e51cc66e
1 changed files with 16 additions and 9 deletions
|
@ -46,9 +46,10 @@ static unsigned char *gbuf;
|
||||||
static size_t gbuf_size = 0;
|
static size_t gbuf_size = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define REDRAW_NONE 0
|
#define REDRAW_NONE 0
|
||||||
#define REDRAW_PARTIAL 1
|
#define REDRAW_PARTIAL 1
|
||||||
#define REDRAW_FULL 2
|
#define REDRAW_FULL 2
|
||||||
|
#define REDRAW_FULL_OVERLAY 3
|
||||||
|
|
||||||
PLUGIN_HEADER
|
PLUGIN_HEADER
|
||||||
|
|
||||||
|
@ -139,11 +140,17 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
rb->cpu_boost(true);
|
rb->cpu_boost(true);
|
||||||
#endif
|
#endif
|
||||||
if (redraw == REDRAW_FULL)
|
switch (redraw)
|
||||||
{
|
{
|
||||||
MYLCD(clear_display)();
|
case REDRAW_FULL:
|
||||||
MYLCD_UPDATE();
|
MYLCD(clear_display)();
|
||||||
rects_queue_init();
|
MYLCD_UPDATE();
|
||||||
|
/* fall-through */
|
||||||
|
case REDRAW_FULL_OVERLAY:
|
||||||
|
rects_queue_init();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* paint all rects */
|
/* paint all rects */
|
||||||
|
@ -229,7 +236,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
if (ops->precision(-1))
|
if (ops->precision(-1))
|
||||||
redraw = REDRAW_FULL;
|
redraw = REDRAW_FULL_OVERLAY;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -239,7 +246,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
if (ops->precision(+1))
|
if (ops->precision(+1))
|
||||||
redraw = REDRAW_FULL;
|
redraw = REDRAW_FULL_OVERLAY;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue