summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-12-28 03:24:07 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-12-28 03:24:07 +0000
commitf0bca469a9359cce46905dd0bc9bf32ea4bb7126 (patch)
tree1476c9bcec3045d0f1656e2032e599c0d97383a3
parent1477f6b15598ca8ce760fb653de1102c0ee2313e (diff)
expedite: enable benchmarking of async renderer.
SVN revision: 81777
-rw-r--r--src/bin/main.c13
-rw-r--r--src/bin/ui.c58
-rw-r--r--src/bin/ui.h2
3 files changed, 68 insertions, 5 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 1c83299..02852af 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1380,7 +1380,18 @@ main(int argc, char **argv)
1380 { 1380 {
1381 engine_loop(); 1381 engine_loop();
1382 ui_loop(); 1382 ui_loop();
1383 evas_render(evas); 1383 if (async_render)
1384 {
1385 Eina_Bool ret = EINA_FALSE;
1386
1387 eo_do(evas,
1388 evas_canvas_sync(),
1389 evas_canvas_render_async(NULL, NULL, &ret));
1390 }
1391 else
1392 {
1393 evas_render(evas);
1394 }
1384 } 1395 }
1385 1396
1386 evas_free(evas); 1397 evas_free(evas);
diff --git a/src/bin/ui.c b/src/bin/ui.c
index b0063fc..dc11c38 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -22,6 +22,8 @@ struct _Menu_Item
22 void (*func) (void); 22 void (*func) (void);
23}; 23};
24 24
25int async_render = 0;
26
25static Evas_Object *o_bg = NULL; 27static Evas_Object *o_bg = NULL;
26static Evas_Object *o_wallpaper = NULL; 28static Evas_Object *o_wallpaper = NULL;
27static Evas_Object *o_title = NULL; 29static Evas_Object *o_title = NULL;
@@ -257,12 +259,34 @@ _ui_all(void)
257 { 259 {
258 engine_loop(); 260 engine_loop();
259 ui_loop(); 261 ui_loop();
260 evas_render(evas); 262 if (async_render)
263 {
264 Eina_Bool ret = EINA_FALSE;
265
266 eo_do(evas,
267 evas_canvas_sync(),
268 evas_canvas_render_async(NULL, NULL, &ret));
269 }
270 else
271 {
272 evas_render(evas);
273 }
261 } 274 }
262 /* This give time to delete the objects of the previous test and make 275 /* This give time to delete the objects of the previous test and make
263 the result of next test more accurate. Draw back, some time is not 276 the result of next test more accurate. Draw back, some time is not
264 counted at all. */ 277 counted at all. */
265 evas_render(evas); 278 if (async_render)
279 {
280 Eina_Bool ret = EINA_FALSE;
281
282 eo_do(evas,
283 evas_canvas_sync(),
284 evas_canvas_render_async(NULL, NULL, &ret));
285 }
286 else
287 {
288 evas_render(evas);
289 }
266 t_count++; 290 t_count++;
267 fps += p_fps; 291 fps += p_fps;
268 wfps += (p_fps * weights[t_count]); 292 wfps += (p_fps * weights[t_count]);
@@ -362,12 +386,34 @@ _ui_num(int n)
362 { 386 {
363 ui_loop(); 387 ui_loop();
364 engine_loop(); 388 engine_loop();
365 evas_render(evas); 389 if (async_render)
390 {
391 Eina_Bool ret = EINA_FALSE;
392
393 eo_do(evas,
394 evas_canvas_sync(),
395 evas_canvas_render_async(NULL, NULL, &ret));
396 }
397 else
398 {
399 evas_render(evas);
400 }
366 } 401 }
367 /* This give time to delete the objects of the previous test and make 402 /* This give time to delete the objects of the previous test and make
368 the result of next test more accurate. Draw back, some time is not 403 the result of next test more accurate. Draw back, some time is not
369 counted at all. */ 404 counted at all. */
370 evas_render(evas); 405 if (async_render)
406 {
407 Eina_Bool ret = EINA_FALSE;
408
409 eo_do(evas,
410 evas_canvas_sync(),
411 evas_canvas_render_async(NULL, NULL, &ret));
412 }
413 else
414 {
415 evas_render(evas);
416 }
371 t_count++; 417 t_count++;
372 fps += p_fps; 418 fps += p_fps;
373 wfps += (p_fps * weights[n]); 419 wfps += (p_fps * weights[n]);
@@ -698,6 +744,10 @@ ui_args(int argc, char **argv)
698 { 744 {
699 cmp_report = 1; 745 cmp_report = 1;
700 } 746 }
747 else if (!strcmp(argv[i], "-y"))
748 {
749 async_render = 1;
750 }
701 } 751 }
702 _ui_setup(); 752 _ui_setup();
703 start = get_time(); 753 start = get_time();
diff --git a/src/bin/ui.h b/src/bin/ui.h
index fce4a33..b4236da 100644
--- a/src/bin/ui.h
+++ b/src/bin/ui.h
@@ -1,6 +1,8 @@
1#ifndef UI_H 1#ifndef UI_H
2#define UI_H 2#define UI_H
3 3
4extern int async_render;
5
4void ui_args(int argc, char **argv); 6void ui_args(int argc, char **argv);
5void ui_loop(void); 7void ui_loop(void);
6void ui_menu(void); 8void ui_menu(void);