From 09b0eadaddf456cc35c9d6afc068a1f09b34841b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 May 2014 21:37:51 +1000 Subject: Add debug define for timing polyfill --- source/blender/blenlib/intern/polyfill2d.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/blender/blenlib/intern/polyfill2d.c') diff --git a/source/blender/blenlib/intern/polyfill2d.c b/source/blender/blenlib/intern/polyfill2d.c index 629c9ea6de6..fbe3c31dbc6 100644 --- a/source/blender/blenlib/intern/polyfill2d.c +++ b/source/blender/blenlib/intern/polyfill2d.c @@ -55,6 +55,12 @@ #define USE_CONVEX_SKIP // #define USE_CONVEX_SKIP_TEST +// #define DEBUG_TIME +#ifdef DEBUG_TIME +# include "PIL_time_utildefines.h" +#endif + + typedef signed char eSign; enum { CONCAVE = -1, @@ -392,6 +398,10 @@ void BLI_polyfill_calc_ex( unsigned int i; +#ifdef DEBUG_TIME + TIMEIT_START(polyfill2d); +#endif + /* assign all polyfill members here */ pf.indices = r_indices; pf.coords = coords; @@ -428,6 +438,10 @@ void BLI_polyfill_calc_ex( } pf_triangulate(&pf); + +#ifdef DEBUG_TIME + TIMEIT_END(polyfill2d); +#endif } void BLI_polyfill_calc_arena( -- cgit v1.2.3