[Webkit-unassigned] [Bug 80571] [mac] Restore color space switching code to run-webkit-tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 7 22:38:03 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=80571





--- Comment #5 from Tim Horton <timothy_horton at apple.com>  2012-03-07 22:38:03 PST ---
(In reply to comment #4)
> (From update of attachment 130771 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=130771&action=review
> 
> > Tools/ChangeLog:11
> > +        causes system color profile to not affect results on Lion.
> 
> _the_ system color profile?
> 
> I'd call it the display color profile, too.

*Main* display, even.

> > Tools/DumpRenderTree/mac/LayoutTestHelper.m:58
> > +    CFUUIDRef displayRef = CGDisplayCreateUUIDFromDisplayID(CGMainDisplayID());
> > +    
> > +    if (!sInitialProfileURL) {
> > +        CFDictionaryRef deviceInfo = ColorSyncDeviceCopyDeviceInfo(kColorSyncDisplayDeviceClass, displayRef);
> > +        CFDictionaryRef profileInfo = (CFDictionaryRef)CFDictionaryGetValue(deviceInfo, kColorSyncCustomProfiles);
> > +        if (profileInfo)
> > +            sInitialProfileURL = (CFURLRef)CFDictionaryGetValue(profileInfo, CFSTR("1"));
> > +    }
> 
> I guess it doesn't really matter that this function leaks like a sieve?

Not really? But, we might as well clean up anyway.

> > Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm:56
> > -    RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
> > +    // Creating this bitmap in generic RGB (which matches the device color space as we have set it) prevents any color conversion when the image of the web view is drawn into it.
> > +    RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB));
> 
> Hrm, are these changes necessary? Will they affect existing pixel results?

I expect they could be necessary in the case where interpretation of deviceRGB (which is unfortunately not actually defined to mean anything specific) changes, causing conversion between data in other color spaces and this to be different. It's one dimension I haven't had a chance to double check yet (and one of the reasons I didn't set r? yet). The old code (before https://bugs.webkit.org/show_bug.cgi?id=75662) also used Generic RGB here, just in a slightly more roundabout way.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list