[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49299] trunk/blender/source/blender: Move sRGB conversion initialization to init_exit routines

Sergey Sharybin sergey.vfx at gmail.com
Fri Jul 27 16:53:57 CEST 2012


Revision: 49299
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49299
Author:   nazgul
Date:     2012-07-27 14:53:57 +0000 (Fri, 27 Jul 2012)
Log Message:
-----------
Move sRGB conversion initialization to init_exit routines

It was a threading issue in color management project which potentially
could happen in trunk as well.

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/divers.c
    trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c

Modified: trunk/blender/source/blender/imbuf/intern/divers.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/divers.c	2012-07-27 14:17:05 UTC (rev 49298)
+++ trunk/blender/source/blender/imbuf/intern/divers.c	2012-07-27 14:53:57 UTC (rev 49299)
@@ -199,7 +199,6 @@
 	BLI_assert(profile_to != IB_PROFILE_NONE);
 	BLI_assert(profile_from != IB_PROFILE_NONE);
 
-	BLI_init_srgb_conversion();
 	if (dither)
 		di = create_dither_context(width, dither);
 
@@ -335,8 +334,6 @@
 	BLI_assert(profile_to != IB_PROFILE_NONE);
 	BLI_assert(profile_from != IB_PROFILE_NONE);
 
-	BLI_init_srgb_conversion();
-
 	/* RGBA input */
 	for (y = 0; y < height; y++) {
 		const uchar *from = rect_from + stride_from * y * 4;

Modified: trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c	2012-07-27 14:17:05 UTC (rev 49298)
+++ trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c	2012-07-27 14:53:57 UTC (rev 49299)
@@ -66,6 +66,7 @@
 #include "BKE_tracking.h" /* free tracking clipboard */
 
 #include "BLI_listbase.h"
+#include "BLI_math_color.h"
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
 
@@ -145,6 +146,10 @@
 	
 	BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */
 	BLF_lang_init();
+
+	/* initialize color stuff */
+	BLI_init_srgb_conversion();
+
 	/* get the default database, plus a wm */
 	WM_read_homefile(C, NULL, G.factory_startup);
 




More information about the Bf-blender-cvs mailing list