[webkit-reviews] review granted: [Bug 9955] Colors scaled from [0, 1] range to [0, 255] incorrectly : [Attachment 9490] patch

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sun Jul 16 07:53:13 PDT 2006


Darin Adler <darin at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 9955: Colors scaled from [0, 1] range to [0, 255] incorrectly
http://bugzilla.opendarwin.org/show_bug.cgi?id=9955

Attachment 9490: patch
http://bugzilla.opendarwin.org/attachment.cgi?id=9490&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
Looks good.

+    float alpha = static_cast<float>(a) / 255.0f;

The cast above seems unneeded.

+		 c.setRGB(238, 238, 238); // FIXME: if this is a constant it
should be specified as one.

I agree that would be nice to fix, but I don't think the FIXME adds much.

+    const double scaleFactor = nextafter(256.0, +0.0);

I think the use of + here on +0.0 is a bit queer. We could have + in front of
all our floating point constants but we don't.

Looks good, those are minor quibbles. r=me



More information about the webkit-reviews mailing list