[webkit-reviews] review granted: [Bug 75129] CIFilter version of Sepia Tone filter doesn't match software : [Attachment 121930] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 10 16:10:00 PST 2012


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Chris Marrin
<cmarrin at apple.com>'s request for review:
Bug 75129: CIFilter version of Sepia Tone filter doesn't match software
https://bugs.webkit.org/show_bug.cgi?id=75129

Attachment 121930: Patch
https://bugs.webkit.org/attachment.cgi?id=121930&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=121930&action=review


> Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:706
> +static double interp(double from, double to, double t)
> +{
> +    return from * (1 - t) + to * t;
> +}

This is what WebCore::blend() is for.

> Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:761
> +	       if (t < 0)
> +		   t = 0;
> +	       else if (t > 1)
> +		   t = 1;

Use std::min/max?

> Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:765
> +	       [caFilter setValue:[CIVector vectorWithX:interp(1, 0.393, t)
Y:interp(0, 0.769, t) Z:interp(0, 0.189, t) W:0] forKey:@"inputRVector"];
> +	       [caFilter setValue:[CIVector vectorWithX:interp(0, 0.349, t)
Y:interp(1, 0.686, t) Z:interp(0, 0.168, t) W:0] forKey:@"inputGVector"];
> +	       [caFilter setValue:[CIVector vectorWithX:interp(0, 0.272, t)
Y:interp(0, 0.534, t) Z:interp(1, 0.131, t) W:0] forKey:@"inputBVector"];

Is there a canonical reference for those numeric values?

> LayoutTests/ChangeLog:8
> +	   Updated hw sepia tone results to match changes. Updated sw results
because

hw -> hardware, or more specifically "Core Image filter on Core Animation
layer"


More information about the webkit-reviews mailing list