diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-11-22 17:29:12 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-11-22 17:36:03 +0300 |
commit | be876b8db684685605d18ea70b935ba5e40a03bc (patch) | |
tree | 21e2ea00802901c533008c25e615c8ef322c98af /source/blender/editors/sculpt_paint/paint_intern.h | |
parent | 178947dec331e2c53b514c9bc2dbc69556cd66be (diff) |
Painting: Performance curve masks.
This patch separates the static-part from the dynamic-part when
generate brush masks. This makes the generation of brush masks 2-5 times
faster depending on the size of the brush.
More improvements can be done, this was just low hanging fruit.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_intern.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index 13ae2b34860..62320defbb3 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -258,6 +258,18 @@ void PAINT_OT_add_simple_uvs(struct wmOperatorType *ot); */ typedef struct CurveMaskCache { /** + * \brief Last #CurveMapping.changed_timestamp being read. + * + * When different the input cache needs to be recalculated. + */ + int last_curve_timestamp; + + /** + * \brief sampled version of the brush curvemapping. + */ + float *sampled_curve; + + /** * \brief Size in bytes of the curve_mask field. * * Used to determine if the curve_mask needs to be re-allocated. |