[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36654] trunk/blender/source/blender/imbuf : remove imbuf crect and profile_filename when building without LCMS

Campbell Barton ideasman42 at gmail.com
Fri May 13 06:53:22 CEST 2011


Revision: 36654
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36654
Author:   campbellbarton
Date:     2011-05-13 04:53:20 +0000 (Fri, 13 May 2011)
Log Message:
-----------
remove imbuf crect and profile_filename when building without LCMS

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/CMakeLists.txt
    trunk/blender/source/blender/imbuf/IMB_imbuf_types.h
    trunk/blender/source/blender/imbuf/SConscript
    trunk/blender/source/blender/imbuf/intern/allocimbuf.c

Modified: trunk/blender/source/blender/imbuf/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/imbuf/CMakeLists.txt	2011-05-13 04:50:01 UTC (rev 36653)
+++ trunk/blender/source/blender/imbuf/CMakeLists.txt	2011-05-13 04:53:20 UTC (rev 36654)
@@ -146,4 +146,8 @@
 	add_definitions(-DWITH_HDR)
 endif()
 
+if(WITH_LCMS)
+	add_definitions(-DWITH_LCMS)
+endif()
+
 blender_add_lib(bf_imbuf "${SRC}" "${INC}")

Modified: trunk/blender/source/blender/imbuf/IMB_imbuf_types.h
===================================================================
--- trunk/blender/source/blender/imbuf/IMB_imbuf_types.h	2011-05-13 04:50:01 UTC (rev 36653)
+++ trunk/blender/source/blender/imbuf/IMB_imbuf_types.h	2011-05-13 04:53:20 UTC (rev 36654)
@@ -84,11 +84,15 @@
 
 	/* pixels */
 	unsigned int *rect;		/* pixel values stored here */
-	unsigned int *crect;	/* color corrected pixel values stored here */
 	float *rect_float;		/* floating point Rect equivalent
 							Linear RGB color space - may need gamma correction to 
 							sRGB when generating 8bit representations */
-	
+
+#ifdef WITH_LCMS
+	unsigned int *crect;	/* color corrected pixel values stored here */
+	char profile_filename[256];	/* to be implemented properly, specific filename for custom profiles */
+#endif
+
 	/* tiled pixel storage */
 	int tilex, tiley;
 	int xtiles, ytiles;
@@ -101,7 +105,6 @@
 	/* parameters used by conversion between byte and float */
 	float dither;				/* random dither value, for conversion from float -> byte rect */
 	short profile;				/* color space/profile preset that the byte rect buffer represents */
-	char profile_filename[256];	/* to be implemented properly, specific filename for custom profiles */
 
 	/* mipmapping */
 	struct ImBuf *mipmap[IB_MIPMAP_LEVELS]; /* MipMap levels, a series of halved images */

Modified: trunk/blender/source/blender/imbuf/SConscript
===================================================================
--- trunk/blender/source/blender/imbuf/SConscript	2011-05-13 04:50:01 UTC (rev 36653)
+++ trunk/blender/source/blender/imbuf/SConscript	2011-05-13 04:53:20 UTC (rev 36654)
@@ -48,4 +48,7 @@
     incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
     defs.append('WITH_QUICKTIME')
 
+if env['WITH_BF_LCMS']:
+    defs.append('WITH_LCMS')
+
 env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [185,115] )

Modified: trunk/blender/source/blender/imbuf/intern/allocimbuf.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/allocimbuf.c	2011-05-13 04:50:01 UTC (rev 36653)
+++ trunk/blender/source/blender/imbuf/intern/allocimbuf.c	2011-05-13 04:53:20 UTC (rev 36654)
@@ -84,17 +84,19 @@
 void imb_freerectImBuf(ImBuf *ibuf)
 {
 	if(ibuf==NULL) return;
-	
+
+#ifdef WITH_LCMS
 	if(ibuf->crect)
 		MEM_freeN(ibuf->crect);
+	ibuf->crect= NULL;
+#endif
 
 	if(ibuf->rect && (ibuf->mall & IB_rect))
 		MEM_freeN(ibuf->rect);
+	ibuf->rect= NULL;
 	
 	imb_freemipmapImBuf(ibuf);
-	
-	ibuf->rect= NULL;
-	ibuf->crect= NULL;
+
 	ibuf->mall &= ~IB_rect;
 }
 




More information about the Bf-blender-cvs mailing list