summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2010-01-18 16:36:06 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2010-01-18 16:36:06 +0000
commit39e51cc66e0f9d2afc82515958c1719fdac43332 (patch)
treed98edee3da5435309248d387b5cd21d89f5c9b00 /apps
parent26542ddc8455842cd52938df4e1c0e83e6e44ba3 (diff)
downloadrockbox-39e51cc66e0f9d2afc82515958c1719fdac43332.tar.gz
rockbox-39e51cc66e0f9d2afc82515958c1719fdac43332.tar.bz2
rockbox-39e51cc66e0f9d2afc82515958c1719fdac43332.zip
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
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/fractals/fractal.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/apps/plugins/fractals/fractal.c b/apps/plugins/fractals/fractal.c
index 5023b2c450..ff768a9516 100644
--- a/apps/plugins/fractals/fractal.c
+++ b/apps/plugins/fractals/fractal.c
@@ -46,9 +46,10 @@ static unsigned char *gbuf;
static size_t gbuf_size = 0;
#endif
-#define REDRAW_NONE 0
-#define REDRAW_PARTIAL 1
-#define REDRAW_FULL 2
+#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)
{
- MYLCD(clear_display)();
- MYLCD_UPDATE();
- rects_queue_init();
+ 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;