summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-08 10:56:35 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-12 13:40:20 +0900
commitff706b7e53050365026d919536ec45f1767dc7f2 (patch)
treed8d04f64b5dbcf1bf433e48ee318b418110c97fe /src/lib/evas/canvas
parent512fb7f193975d411b4f471c14e1f0171e52e7d3 (diff)
Evas render: Minor debug code improvements
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_render.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index a47e550fde..c2900f6dc7 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -13,12 +13,13 @@
13#include "evas_render2.h" 13#include "evas_render2.h"
14 14
15/* Enable this for extra verbose rendering debug logs */ 15/* Enable this for extra verbose rendering debug logs */
16//#define REND_DBG 16//#define REND_DBG 1
17#define STDOUT_DBG 17#define STDOUT_DBG
18 18
19#ifdef REND_DBG 19#ifdef REND_DBG
20static FILE *dbf = NULL; 20static FILE *dbf = NULL;
21static int __RD_level = 0; 21static int __RD_level = 0;
22static int __RD_enable = REND_DBG;
22 23
23static void 24static void
24rend_dbg(const char *txt) 25rend_dbg(const char *txt)
@@ -36,7 +37,7 @@ rend_dbg(const char *txt)
36 fflush(dbf); 37 fflush(dbf);
37} 38}
38#define RD(xxxx, args...) \ 39#define RD(xxxx, args...) \
39 do { \ 40 do { if (__RD_enable) { \
40 char __tmpbuf[4096]; int __tmpi; \ 41 char __tmpbuf[4096]; int __tmpi; \
41 __RD_level = xxxx; \ 42 __RD_level = xxxx; \
42 if (xxxx) { \ 43 if (xxxx) { \
@@ -47,9 +48,9 @@ rend_dbg(const char *txt)
47 } \ 48 } \
48 snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ 49 snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
49 rend_dbg(__tmpbuf); \ 50 rend_dbg(__tmpbuf); \
50 } while (0) 51 } } while (0)
51#define IFRD(ifcase, xxxx, args...) \ 52#define IFRD(ifcase, xxxx, args...) \
52 if (ifcase) { \ 53 if (__RD_enable && (ifcase)) { \
53 char __tmpbuf[4096]; int __tmpi; \ 54 char __tmpbuf[4096]; int __tmpi; \
54 __RD_level = xxxx; \ 55 __RD_level = xxxx; \
55 if (xxxx) { \ 56 if (xxxx) { \
@@ -2218,7 +2219,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
2218 int fx, int fy, 2219 int fx, int fy,
2219 Eina_Bool alpha, 2220 Eina_Bool alpha,
2220 Eina_Bool do_async, 2221 Eina_Bool do_async,
2221 unsigned int *offset) 2222 unsigned int *offset, int level)
2222{ 2223{
2223 Evas_Object *eo_obj; 2224 Evas_Object *eo_obj;
2224 Evas_Object_Protected_Data *obj; 2225 Evas_Object_Protected_Data *obj;
@@ -2227,7 +2228,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
2227 Eina_Bool clean_them = EINA_FALSE; 2228 Eina_Bool clean_them = EINA_FALSE;
2228 2229
2229 eina_evlog("+render_setup", eo_e, 0.0, NULL); 2230 eina_evlog("+render_setup", eo_e, 0.0, NULL);
2230 RD(0, " [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh); 2231 RD(level, " [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh);
2231 2232
2232 off_x = cx - ux; 2233 off_x = cx - ux;
2233 off_y = cy - uy; 2234 off_y = cy - uy;
@@ -2281,9 +2282,9 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
2281 if (obj == top) break; 2282 if (obj == top) break;
2282 2283
2283 /* if it's in our outpout rect and it doesn't clip anything */ 2284 /* if it's in our outpout rect and it doesn't clip anything */
2284 RD(0, " OBJ: [%p", obj); 2285 RD(level, " OBJ: [%p", obj);
2285 IFRD(obj->name, 0, " '%s'", obj->name); 2286 IFRD(obj->name, 0, " '%s'", obj->name);
2286 RD(0, "] '%s' %i %i %ix%i\n", obj->type, obj->cur->geometry.x, obj->cur->geometry.y, obj->cur->geometry.w, obj->cur->geometry.h); 2287 RD(level, "] '%s' %i %i %ix%i\n", obj->type, obj->cur->geometry.x, obj->cur->geometry.y, obj->cur->geometry.w, obj->cur->geometry.h);
2287 if ((evas_object_is_in_output_rect(eo_obj, obj, ux - fx, uy - fy, uw, uh) || 2288 if ((evas_object_is_in_output_rect(eo_obj, obj, ux - fx, uy - fy, uw, uh) ||
2288 (obj->is_smart)) && 2289 (obj->is_smart)) &&
2289 (!obj->clip.clipees) && 2290 (!obj->clip.clipees) &&
@@ -2295,7 +2296,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
2295 { 2296 {
2296 int x, y, w, h; 2297 int x, y, w, h;
2297 2298
2298 RD(0, " DRAW (vis: %i, a: %i, clipees: %p)\n", obj->cur->visible, obj->cur->color.a, obj->clip.clipees); 2299 RD(level, " DRAW (vis: %i, a: %i, clipees: %p)\n", obj->cur->visible, obj->cur->color.a, obj->clip.clipees);
2299 if ((e->temporary_objects.count > *offset) && 2300 if ((e->temporary_objects.count > *offset) &&
2300 (eina_array_data_get(&e->temporary_objects, *offset) == obj)) 2301 (eina_array_data_get(&e->temporary_objects, *offset) == obj))
2301 (*offset)++; 2302 (*offset)++;
@@ -2370,7 +2371,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
2370 surface, off_x + fx, 2371 surface, off_x + fx,
2371 off_y + fy, 0, 2372 off_y + fy, 0,
2372 cx, cy, cw, ch, 2373 cx, cy, cw, ch,
2373 NULL, 4, 2374 NULL, level + 3,
2374 EINA_FALSE, 2375 EINA_FALSE,
2375 do_async); 2376 do_async);
2376 e->engine.func->context_cutout_clear(e->engine.data.output, 2377 e->engine.func->context_cutout_clear(e->engine.data.output,
@@ -2388,7 +2389,8 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
2388 eina_evlog("-render_objects", eo_e, 0.0, NULL); 2389 eina_evlog("-render_objects", eo_e, 0.0, NULL);
2389 /* free obscuring objects list */ 2390 /* free obscuring objects list */
2390 OBJS_ARRAY_CLEAN(&e->temporary_objects); 2391 OBJS_ARRAY_CLEAN(&e->temporary_objects);
2391 RD(0, " ---]\n"); 2392 if (top) RD(level, " ---] SNAPSHOT [obj:%p sfc:%p]\n", top, surface);
2393 else RD(level, " ---]\n");
2392 2394
2393 return clean_them; 2395 return clean_them;
2394} 2396}
@@ -2706,6 +2708,7 @@ evas_render_updates_internal(Evas *eo_e,
2706 2708
2707 pseudo_canvas = _evas_object_image_surface_get(obj->object, obj); 2709 pseudo_canvas = _evas_object_image_surface_get(obj->object, obj);
2708 2710
2711 RD(0, " SNAPSHOT [obj:%p sfc:%p ur:%d,%d %dx%d]\n", obj, pseudo_canvas, ur.x, ur.y, ur.w, ur.h);
2709 ctx = e->engine.func->context_new(e->engine.data.output); 2712 ctx = e->engine.func->context_new(e->engine.data.output);
2710 clean_them |= evas_render_updates_internal_loop(eo_e, e, pseudo_canvas, ctx, 2713 clean_them |= evas_render_updates_internal_loop(eo_e, e, pseudo_canvas, ctx,
2711 obj, 2714 obj,
@@ -2713,7 +2716,7 @@ evas_render_updates_internal(Evas *eo_e,
2713 cr.x, cr.y, cr.w, cr.h, 2716 cr.x, cr.y, cr.w, cr.h,
2714 fx, fy, alpha, 2717 fx, fy, alpha,
2715 do_async, 2718 do_async,
2716 &offset); 2719 &offset, 1);
2717 e->engine.func->context_free(e->engine.data.output, ctx); 2720 e->engine.func->context_free(e->engine.data.output, ctx);
2718 2721
2719 // Force the object has changed for filter to take it into 2722 // Force the object has changed for filter to take it into
@@ -2753,7 +2756,7 @@ evas_render_updates_internal(Evas *eo_e,
2753 cx, cy, cw, ch, 2756 cx, cy, cw, ch,
2754 fx, fy, alpha, 2757 fx, fy, alpha,
2755 do_async, 2758 do_async,
2756 &offset); 2759 &offset, 0);
2757 if (!do_async) 2760 if (!do_async)
2758 { 2761 {
2759 eina_evlog("+render_push", eo_e, 0.0, NULL); 2762 eina_evlog("+render_push", eo_e, 0.0, NULL);