summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-04-06 13:59:31 +0000
committerJens Arnold <amiconn@rockbox.org>2008-04-06 13:59:31 +0000
commitdf8749d6d7a52034b7b1872ee421c4c6012f8c0a (patch)
treeed2ae2c520cc391dcd30d9f0a2372373a21449e6
parentcf6510567a5e5ebe2386b1348f72d387dee1f256 (diff)
downloadrockbox-df8749d6d7a52034b7b1872ee421c4c6012f8c0a.tar.gz
rockbox-df8749d6d7a52034b7b1872ee421c4c6012f8c0a.tar.bz2
rockbox-df8749d6d7a52034b7b1872ee421c4c6012f8c0a.zip
Adapt the remaining plugins to put the greyscale isr on cop. Now they can be used while playing music without making the audio stutter. Needs the new SHAREDBSS_ATTR.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16987 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/fire.c3
-rw-r--r--apps/plugins/greyscale.c2
-rw-r--r--apps/plugins/jpeg.c3
-rw-r--r--apps/plugins/lib/grey.h2
-rw-r--r--apps/plugins/mandelbrot.c3
-rw-r--r--apps/plugins/plasma.c2
-rw-r--r--apps/plugins/test_fps.c3
7 files changed, 11 insertions, 7 deletions
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c
index 35432377f9..c26822c8dc 100644
--- a/apps/plugins/fire.c
+++ b/apps/plugins/fire.c
@@ -278,7 +278,8 @@ int init_grey(void)
/* get the remainder of the plugin buffer */
gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
- if (!grey_init(rb, gbuf, gbuf_size, 0, FIRE_WIDTH, LCD_HEIGHT, NULL)){
+ if (!grey_init(rb, gbuf, gbuf_size, GREY_ON_COP,
+ FIRE_WIDTH, LCD_HEIGHT, NULL)){
rb->splash(HZ, "not enough memory");
return PLUGIN_ERROR;
}
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c
index 42ba08f22e..aba5dcc05b 100644
--- a/apps/plugins/greyscale.c
+++ b/apps/plugins/greyscale.c
@@ -210,7 +210,7 @@ int main(void)
/* initialize the greyscale buffer:
Archos: 112 pixels wide, 7 rows (56 pixels) high.
H1x0: 160 pixels wide, 30 rows (120 pixels) high. */
- if (!grey_init(rb, gbuf, gbuf_size, GREY_BUFFERED,
+ if (!grey_init(rb, gbuf, gbuf_size, GREY_BUFFERED|GREY_ON_COP,
LCD_WIDTH, GFX_HEIGHT, NULL))
{
rb->splash(HZ, "Not enough memory.");
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index f128558c5a..710772f270 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -3333,7 +3333,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#endif
#ifdef USEGSLIB
- if (!grey_init(rb, buf, buf_size, 0, LCD_WIDTH, LCD_HEIGHT, &greysize))
+ if (!grey_init(rb, buf, buf_size, GREY_ON_COP,
+ LCD_WIDTH, LCD_HEIGHT, &greysize))
{
rb->splash(HZ, "grey buf error");
return PLUGIN_ERROR;
diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h
index 95dca6beb6..7bb8c5ff98 100644
--- a/apps/plugins/lib/grey.h
+++ b/apps/plugins/lib/grey.h
@@ -41,7 +41,7 @@
/* Greyscale library management structure declaration. You need one of these
* in every plugin using the library, depending on whether the structure should
* use IRAM or not. */
-#define GREY_INFO_STRUCT struct _grey_info _grey_info;
+#define GREY_INFO_STRUCT struct _grey_info _grey_info SHAREDBSS_ATTR;
#define GREY_INFO_STRUCT_IRAM struct _grey_info _grey_info IBSS_ATTR;
/* Features you can request on library init (ORed together): */
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c
index 4a4872b827..244d94b157 100644
--- a/apps/plugins/mandelbrot.c
+++ b/apps/plugins/mandelbrot.c
@@ -650,7 +650,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
/* initialize the greyscale buffer.*/
- if (!grey_init(rb, gbuf, gbuf_size, 0, LCD_WIDTH, LCD_HEIGHT, NULL))
+ if (!grey_init(rb, gbuf, gbuf_size, GREY_ON_COP,
+ LCD_WIDTH, LCD_HEIGHT, NULL))
{
rb->splash(HZ, "Couldn't init greyscale display");
return 0;
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c
index 2e04bd59b5..f013cefb85 100644
--- a/apps/plugins/plasma.c
+++ b/apps/plugins/plasma.c
@@ -233,7 +233,7 @@ int main(void)
/* get the remainder of the plugin buffer */
gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
- grey_init(rb, gbuf, gbuf_size, 0, LCD_WIDTH, LCD_HEIGHT, NULL);
+ grey_init(rb, gbuf, gbuf_size, GREY_ON_COP, LCD_WIDTH, LCD_HEIGHT, NULL);
/* switch on greyscale overlay */
grey_show(true);
#endif
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c
index da61a4f348..46a94a91ec 100644
--- a/apps/plugins/test_fps.c
+++ b/apps/plugins/test_fps.c
@@ -286,7 +286,8 @@ static void time_greyscale(void)
int fps, load;
gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
- if (!grey_init(rb, gbuf, gbuf_size, GREY_ON_COP, LCD_WIDTH, LCD_HEIGHT, NULL))
+ if (!grey_init(rb, gbuf, gbuf_size, GREY_ON_COP,
+ LCD_WIDTH, LCD_HEIGHT, NULL))
{
log_text("greylib: out of memory.");
return;