diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-04 06:05:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-04 06:05:11 +0400 |
commit | 7bbaf4853ae81344761fceac90b08785520c18d0 (patch) | |
tree | fdfb403a573188312e43bf134a13c9a2e0d36e7e /source/blender/imbuf/intern | |
parent | 47fffc86bc94318aa34f50c035c99cfe8c7bad42 (diff) |
code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss()
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 1e6fac4f4f0..a74f28e79c9 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -2808,7 +2808,7 @@ int IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSetting /* Configures GLSL shader for conversion from scene linear to display space */ int IMB_colormanagement_setup_glsl_draw(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, - int predivide) + int predivide) { return IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings, NULL, predivide); diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 20d51fddb35..e69460de040 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -664,13 +664,13 @@ void IMB_float_from_rect(ImBuf *ibuf) /* no profile conversion */ void IMB_color_to_bw(ImBuf *ibuf) { - float *rctf = ibuf->rect_float; + float *rct_fl = ibuf->rect_float; uchar *rct = (uchar *)ibuf->rect; int i; - if (rctf) { - for (i = ibuf->x * ibuf->y; i > 0; i--, rctf += 4) - rctf[0] = rctf[1] = rctf[2] = rgb_to_grayscale(rctf); + if (rct_fl) { + for (i = ibuf->x * ibuf->y; i > 0; i--, rct_fl += 4) + rct_fl[0] = rct_fl[1] = rct_fl[2] = rgb_to_grayscale(rct_fl); } if (rct) { @@ -713,7 +713,7 @@ void IMB_saturation(ImBuf *ibuf, float sat) { int i; unsigned char *rct = (unsigned char *)ibuf->rect; - float *rctf = ibuf->rect_float; + float *rct_fl = ibuf->rect_float; float hsv[3]; if (rct) { @@ -726,10 +726,10 @@ void IMB_saturation(ImBuf *ibuf, float sat) } } - if (rctf) { - for (i = ibuf->x * ibuf->y; i > 0; i--, rctf += 4) { - rgb_to_hsv_v(rctf, hsv); - hsv_to_rgb(hsv[0], hsv[1] * sat, hsv[2], rctf, rctf + 1, rctf + 2); + if (rct_fl) { + for (i = ibuf->x * ibuf->y; i > 0; i--, rct_fl += 4) { + rgb_to_hsv_v(rct_fl, hsv); + hsv_to_rgb(hsv[0], hsv[1] * sat, hsv[2], rct_fl, rct_fl + 1, rct_fl + 2); } } } |