[gnome-color-manager] trivial: don't use the global 'gamma' in gcm-profile.c



commit 99ab2c3e0644540bc87a2bff839a16d9c077def0
Author: Richard Hughes <richard hughsie com>
Date:   Sat Mar 26 18:18:43 2011 +0000

    trivial: don't use the global 'gamma' in gcm-profile.c
    
    Man, math.h sucks.

 src/gcm-profile.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-profile.c b/src/gcm-profile.c
index bcdcebd..1e3edb2 100644
--- a/src/gcm-profile.c
+++ b/src/gcm-profile.c
@@ -34,6 +34,7 @@
 #include <gio/gio.h>
 #include <lcms2.h>
 #include <colord.h>
+#include <math.h>
 
 #include "gcm-profile.h"
 #include "gcm-color.h"
@@ -1136,7 +1137,8 @@ gcm_profile_set_data (GcmProfile *profile, const gchar *key, const gchar *data)
  * Return value: %TRUE for success
  **/
 gboolean
-gcm_profile_create_from_chroma (GcmProfile *profile, gdouble gamma,
+gcm_profile_create_from_chroma (GcmProfile *profile,
+				gdouble localgamma,
 				const GcmColorYxy *red,
 				const GcmColorYxy *green,
 				const GcmColorYxy *blue,
@@ -1168,7 +1170,7 @@ gcm_profile_create_from_chroma (GcmProfile *profile, gdouble gamma,
 	white_point.Y = 1.0;
 
 	/* estimate the transfer function for the gamma */
-	transfer_curve[0] = transfer_curve[1] = transfer_curve[2] = cmsBuildGamma (NULL, gamma);
+	transfer_curve[0] = transfer_curve[1] = transfer_curve[2] = cmsBuildGamma (NULL, localgamma);
 
 	/* create our generated profile */
 	priv->lcms_profile = cmsCreateRGBProfile (&white_point, &chroma, transfer_curve);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]