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
This commit is contained in:
parent
cf6510567a
commit
df8749d6d7
7 changed files with 11 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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): */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue