Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-21 18:43:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-21 18:43:51 +0400
commit8bd7c3fba2749fdf2b16c4f32abf1a35692bc5bb (patch)
treeec5506895139ed6a09921c60eaf61bd8eb7f2226 /source/blender/blenkernel/BKE_colortools.h
parent809fce9d00ecf8eea2c3d2ea52c3de2ec2ede1ee (diff)
change curve evaluation functions never to modify curve data (ensures thread safety), now initializations has to be done outside evaluation.
Diffstat (limited to 'source/blender/blenkernel/BKE_colortools.h')
-rw-r--r--source/blender/blenkernel/BKE_colortools.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h
index 249cb32a082..9ce2de79dbf 100644
--- a/source/blender/blenkernel/BKE_colortools.h
+++ b/source/blender/blenkernel/BKE_colortools.h
@@ -67,25 +67,31 @@ void curvemap_sethandle(struct CurveMap *cuma, int type);
void curvemapping_changed(struct CurveMapping *cumap, int rem_doubles);
void curvemapping_changed_all(struct CurveMapping *cumap);
+/* call before _all_ evaluation functions */
+void curvemapping_initialize(struct CurveMapping *cumap);
+
+/* keep these (const CurveMap) - to help with thread safety */
/* single curve, no table check */
-float curvemap_evaluateF(struct CurveMap *cuma, float value);
+float curvemap_evaluateF(const struct CurveMap *cuma, float value);
/* single curve, with table check */
-float curvemapping_evaluateF(struct CurveMapping *cumap, int cur, float value);
-void curvemapping_evaluate3F(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
-void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
-void curvemapping_evaluate_premulRGB(struct CurveMapping *cumap, unsigned char vecout_byte[3], const unsigned char vecin_byte[3]);
-void curvemapping_evaluate_premulRGBF_ex(struct CurveMapping *cumap, float vecout[3], const float vecin[3],
+float curvemapping_evaluateF(const struct CurveMapping *cumap, int cur, float value);
+void curvemapping_evaluate3F(const struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_evaluateRGBF(const struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_evaluate_premulRGB(const struct CurveMapping *cumap, unsigned char vecout_byte[3], const unsigned char vecin_byte[3]);
+void curvemapping_evaluate_premulRGBF_ex(const struct CurveMapping *cumap, float vecout[3], const float vecin[3],
const float black[3], const float bwmul[3]);
-void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_evaluate_premulRGBF(const struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+int curvemapping_RGBA_does_something(const struct CurveMapping *cumap);
+void curvemapping_table_RGBA(const struct CurveMapping *cumap, float **array, int *size);
+
+/* non-const, these modify the curve */
void curvemapping_do_ibuf(struct CurveMapping *cumap, struct ImBuf *ibuf);
void curvemapping_premultiply(struct CurveMapping *cumap, int restore);
-int curvemapping_RGBA_does_something(struct CurveMapping *cumap);
-void curvemapping_initialize(struct CurveMapping *cumap);
-void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size);
+
+
void BKE_histogram_update_sample_line(struct Histogram *hist, struct ImBuf *ibuf, const short use_color_management);
void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management);
void scopes_free(struct Scopes *scopes);
void scopes_new(struct Scopes *scopes);
#endif
-