[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60543] trunk/blender/source/blender/imbuf /intern/colormanagement.c: Changing dither value will now invalidate cached display buffer
Sergey Sharybin
sergey.vfx at gmail.com
Fri Oct 4 12:07:32 CEST 2013
Revision: 60543
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60543
Author: nazgul
Date: 2013-10-04 10:07:32 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
Changing dither value will now invalidate cached display buffer
Modified Paths:
--------------
trunk/blender/source/blender/imbuf/intern/colormanagement.c
Modified: trunk/blender/source/blender/imbuf/intern/colormanagement.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/colormanagement.c 2013-10-04 08:27:54 UTC (rev 60542)
+++ trunk/blender/source/blender/imbuf/intern/colormanagement.c 2013-10-04 10:07:32 UTC (rev 60543)
@@ -196,6 +196,7 @@
int view;
float exposure;
float gamma;
+ float dither;
CurveMapping *curve_mapping;
} ColormanageCacheViewSettings;
@@ -213,6 +214,7 @@
int look; /* Additional artistics transform */
float exposure; /* exposure value cached buffer is calculated with */
float gamma; /* gamma value cached buffer is calculated with */
+ float dither; /* dither value cached buffer is calculated with */
CurveMapping *curve_mapping; /* curve mapping used for cached buffer */
int curve_mapping_timestamp; /* time stamp of curve mapping used for cached buffer */
} ColormnaageCacheData;
@@ -291,7 +293,8 @@
ibuf->colormanage_cache->data = data;
}
-static void colormanage_view_settings_to_cache(ColormanageCacheViewSettings *cache_view_settings,
+static void colormanage_view_settings_to_cache(ImBuf *ibuf,
+ ColormanageCacheViewSettings *cache_view_settings,
const ColorManagedViewSettings *view_settings)
{
int look = IMB_colormanagement_look_get_named_index(view_settings->look);
@@ -301,6 +304,7 @@
cache_view_settings->view = view;
cache_view_settings->exposure = view_settings->exposure;
cache_view_settings->gamma = view_settings->gamma;
+ cache_view_settings->dither = ibuf->dither;
cache_view_settings->flag = view_settings->flag;
cache_view_settings->curve_mapping = view_settings->curve_mapping;
}
@@ -378,6 +382,7 @@
if (cache_data->look != view_settings->look ||
cache_data->exposure != view_settings->exposure ||
cache_data->gamma != view_settings->gamma ||
+ cache_data->dither != view_settings->dither ||
cache_data->flag != view_settings->flag ||
cache_data->curve_mapping != curve_mapping ||
cache_data->curve_mapping_timestamp != curve_mapping_timestamp)
@@ -424,6 +429,7 @@
cache_data->look = view_settings->look;
cache_data->exposure = view_settings->exposure;
cache_data->gamma = view_settings->gamma;
+ cache_data->dither = view_settings->dither;
cache_data->flag = view_settings->flag;
cache_data->curve_mapping = curve_mapping;
cache_data->curve_mapping_timestamp = curve_mapping_timestamp;
@@ -2024,7 +2030,7 @@
return (unsigned char *) ibuf->rect;
}
- colormanage_view_settings_to_cache(&cache_view_settings, applied_view_settings);
+ colormanage_view_settings_to_cache(ibuf, &cache_view_settings, applied_view_settings);
colormanage_display_settings_to_cache(&cache_display_settings, display_settings);
if (ibuf->invalid_rect.xmin != ibuf->invalid_rect.xmax) {
@@ -2735,7 +2741,7 @@
unsigned char *display_buffer = NULL;
int view_flag, display_index, buffer_width;
- colormanage_view_settings_to_cache(&cache_view_settings, view_settings);
+ colormanage_view_settings_to_cache(ibuf, &cache_view_settings, view_settings);
colormanage_display_settings_to_cache(&cache_display_settings, display_settings);
view_flag = 1 << (cache_view_settings.view - 1);
More information about the Bf-blender-cvs
mailing list