}
struct accumulator {
- double total, min, max;
+ double total, min, max, draw_start_time;
int samples;
const char *what;
};
};
static void
-_accumulate_time(double before, struct accumulator *acc)
+_accumulate_time(double before, Eina_Bool async)
{
+ static Eina_Bool async_start = EINA_TRUE;
+ static double cache_before;
+ struct accumulator *acc = &sync_accumulator;
+ if (async)
+ {
+ acc = &async_accumulator;
+ if (async_start)
+ {
+ async_start = EINA_FALSE;
+ cache_before = before;
+ return;
+ }
+ else
+ {
+ async_start = EINA_TRUE;
+ before = cache_before;
+ }
+ }
+
double diff = _time_get() - before;
acc->total += diff;
int redraw_all = 0;
Eina_Bool haveup = 0;
Evas_Render_Mode render_mode = EVAS_RENDER_MODE_UNDEF;
-#ifdef EVAS_RENDER_DEBUG_TIMING
- double start_time = _time_get();
-#endif
+
Eina_Rectangle clip_rect;
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
}
}
+#ifdef EVAS_RENDER_DEBUG_TIMING
+ double start_time = _time_get();
+#endif
+
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
evas_cserve2_dispatch();
RD(0, "---]\n");
#ifdef EVAS_RENDER_DEBUG_TIMING
- _accumulate_time(start_time, do_async ? &async_accumulator : &sync_accumulator);
+ _accumulate_time(start_time, do_async);
#endif
return EINA_TRUE;
evas_render_updates_free(ret_updates);
eo_unref(eo_e);
+
+#ifdef EVAS_RENDER_DEBUG_TIMING
+ _accumulate_time(0, EINA_TRUE);
+#endif
}
static void