expedite: enable benchmarking of async renderer.

SVN revision: 81777
This commit is contained in:
Cedric BAIL 2012-12-28 03:24:07 +00:00
parent 1477f6b155
commit f0bca469a9
3 changed files with 68 additions and 5 deletions

View File

@ -1380,7 +1380,18 @@ main(int argc, char **argv)
{
engine_loop();
ui_loop();
evas_render(evas);
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(NULL, NULL, &ret));
}
else
{
evas_render(evas);
}
}
evas_free(evas);

View File

@ -22,6 +22,8 @@ struct _Menu_Item
void (*func) (void);
};
int async_render = 0;
static Evas_Object *o_bg = NULL;
static Evas_Object *o_wallpaper = NULL;
static Evas_Object *o_title = NULL;
@ -257,12 +259,34 @@ _ui_all(void)
{
engine_loop();
ui_loop();
evas_render(evas);
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(NULL, NULL, &ret));
}
else
{
evas_render(evas);
}
}
/* This give time to delete the objects of the previous test and make
the result of next test more accurate. Draw back, some time is not
counted at all. */
evas_render(evas);
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(NULL, NULL, &ret));
}
else
{
evas_render(evas);
}
t_count++;
fps += p_fps;
wfps += (p_fps * weights[t_count]);
@ -362,12 +386,34 @@ _ui_num(int n)
{
ui_loop();
engine_loop();
evas_render(evas);
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(NULL, NULL, &ret));
}
else
{
evas_render(evas);
}
}
/* This give time to delete the objects of the previous test and make
the result of next test more accurate. Draw back, some time is not
counted at all. */
evas_render(evas);
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(NULL, NULL, &ret));
}
else
{
evas_render(evas);
}
t_count++;
fps += p_fps;
wfps += (p_fps * weights[n]);
@ -698,6 +744,10 @@ ui_args(int argc, char **argv)
{
cmp_report = 1;
}
else if (!strcmp(argv[i], "-y"))
{
async_render = 1;
}
}
_ui_setup();
start = get_time();

View File

@ -1,6 +1,8 @@
#ifndef UI_H
#define UI_H
extern int async_render;
void ui_args(int argc, char **argv);
void ui_loop(void);
void ui_menu(void);