diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-10-07 22:19:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-10-07 22:20:19 +0400 |
commit | d5e300e14d17f3a9fb42f3b0d23b2d5eba78d140 (patch) | |
tree | 190d5029086b939a669d3751f7a316ccf9e49ba9 /source/blender/editors/sculpt_paint/paint_stroke.c | |
parent | 26083d5de52cd44c4aff99306cf7ee702043246f (diff) |
Paint: add debug print to time strokes
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 101d176b00f..9c4701d0a01 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -68,6 +68,12 @@ #include <float.h> #include <math.h> +// #define DEBUG_TIME + +#ifdef DEBUG_TIME +# include "PIL_time_utildefines.h" +#endif + typedef struct PaintSample { float mouse[2]; float pressure; @@ -910,6 +916,7 @@ static void paint_stroke_line_end(bContext *C, wmOperator *op, PaintStroke *stro static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *stroke) { Brush *br = stroke->brush; + if (br->flag & BRUSH_CURVE) { const Scene *scene = CTX_data_scene(C); const float spacing = paint_space_stroke_spacing(scene, stroke, 1.0f, 1.0f); @@ -921,6 +928,10 @@ static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *str if (!pc) return true; +#ifdef DEBUG_TIME + TIMEIT_START(stroke); +#endif + pcp = pc->points; stroke->ups->overlap_factor = paint_stroke_integrate_overlap(br, 1.0); @@ -956,6 +967,11 @@ static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *str } stroke_done(C, op); + +#ifdef DEBUG_TIME + TIMEIT_END(stroke); +#endif + return true; } |