Make test_fps test the greylib on both cores of dual core targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28202 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e4bd9e3774
commit
3e9f797f6e
1 changed files with 63 additions and 50 deletions
|
@ -50,10 +50,6 @@ static int max_line;
|
|||
static int remote_line;
|
||||
static int remote_max_line;
|
||||
#endif
|
||||
#if LCD_DEPTH < 4
|
||||
static unsigned char *gbuf;
|
||||
static size_t gbuf_size;
|
||||
#endif
|
||||
|
||||
static void log_init(void)
|
||||
{
|
||||
|
@ -105,6 +101,8 @@ static void time_main_update(void)
|
|||
const int part14_y = LCD_HEIGHT/4; /* y-offset for 1/4 update test */
|
||||
const int part14_h = LCD_HEIGHT/2; /* y-size for 1/4 update test */
|
||||
|
||||
log_text("Main LCD Update");
|
||||
|
||||
/* Test 1: full LCD update */
|
||||
frame_count = 0;
|
||||
rb->sleep(0); /* sync to tick */
|
||||
|
@ -182,6 +180,8 @@ static void time_main_yuv(void)
|
|||
const int part14_y = YUV_HEIGHT/4; /* y-offset for 1/4 update test */
|
||||
const int part14_h = YUV_HEIGHT/2; /* y-size for 1/4 update test */
|
||||
|
||||
log_text("Main LCD YUV");
|
||||
|
||||
rb->memset(ydata, 128, sizeof(ydata)); /* medium grey */
|
||||
|
||||
/* Test 1: full LCD update */
|
||||
|
@ -232,6 +232,8 @@ static void time_remote_update(void)
|
|||
const int part14_y = LCD_REMOTE_HEIGHT/4; /* y-offset for 1/4 update test */
|
||||
const int part14_h = LCD_REMOTE_HEIGHT/2; /* y-size for 1/4 update test */
|
||||
|
||||
log_text("Remote LCD Update");
|
||||
|
||||
/* Test 1: full LCD update */
|
||||
frame_count = 0;
|
||||
rb->sleep(0); /* sync to tick */
|
||||
|
@ -284,9 +286,23 @@ static void time_greyscale(void)
|
|||
long time_1, time_2;
|
||||
int frames_1, frames_2;
|
||||
int fps, load;
|
||||
size_t gbuf_size;
|
||||
unsigned char *gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
|
||||
|
||||
gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
|
||||
if (!grey_init(gbuf, gbuf_size, GREY_ON_COP,
|
||||
#if NUM_CORES > 1
|
||||
int i;
|
||||
for (i = 0; i < NUM_CORES; i++)
|
||||
{
|
||||
rb->snprintf(str, sizeof(str), "Greyscale (%s)",
|
||||
(i > 0) ? "COP" : "CPU");
|
||||
log_text(str);
|
||||
#else
|
||||
const int i = 0;
|
||||
log_text("Greyscale library");
|
||||
{
|
||||
#endif
|
||||
|
||||
if (!grey_init(gbuf, gbuf_size, (i > 0) ? GREY_ON_COP : 0,
|
||||
LCD_WIDTH, LCD_HEIGHT, NULL))
|
||||
{
|
||||
log_text("greylib: out of memory.");
|
||||
|
@ -331,6 +347,7 @@ static void time_greyscale(void)
|
|||
else
|
||||
log_text("CPU load err (boost?)");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* plugin entry point */
|
||||
|
@ -350,18 +367,14 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#endif
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
|
||||
log_text("Main LCD Update");
|
||||
time_main_update();
|
||||
#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
|
||||
log_text("Main LCD YUV");
|
||||
time_main_yuv();
|
||||
#endif
|
||||
#if LCD_DEPTH < 4
|
||||
log_text("Greyscale library");
|
||||
time_greyscale();
|
||||
#endif
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
log_text("Remote LCD Update");
|
||||
time_remote_update();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue