qcms: avoid unnecessary promotion to double. r=ehsan
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 10 May 2011 12:01:48 -0400
changeset 69255 36e216fdf97a5b54037abcd537a186c81a5e47a9
parent 69254 f59eca5aea9f44f0205313c7645d71ee1ea43857
child 69256 24bd5f86695cbb29e935a51550f554e3877985e4
push id19896
push userjmuizelaar@mozilla.com
push dateTue, 10 May 2011 16:05:36 +0000
treeherdermozilla-central@36e216fdf97a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
qcms: avoid unnecessary promotion to double. r=ehsan
gfx/qcms/transform.c
--- a/gfx/qcms/transform.c
+++ b/gfx/qcms/transform.c
@@ -653,20 +653,20 @@ static uint16_t *build_pow_table(float g
 		result = floor(x*65535. + .5);
 		output[i] = result;
 	}
 	return output;
 }
 
 static float clamp_float(float a)
 {
-	if (a > 1.)
-		return 1.;
-	else if (a < 0.)
-		return 0.;
+	if (a > 1.f)
+		return 1.f;
+	else if (a < 0.f)
+		return 0.f;
 	else
 		return a;
 }
 
 #if 0
 static void qcms_transform_data_rgb_out_pow(qcms_transform *transform, unsigned char *src, unsigned char *dest, size_t length)
 {
 	int i;