[Webkit-unassigned] [Bug 138477] Don't premultiply and then unpremultiply PNGs on iOS.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 6 15:42:54 PST 2014


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

Brent Fulgham <bfulgham at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #241136|review?                     |review-
              Flags|                            |

--- Comment #3 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 241136
  --> https://bugs.webkit.org/attachment.cgi?id=241136
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241136&action=review

Looks good, but I think it could be better if we were using RetainPtrs so you didn't have to have a block of releases when these objects go out of scope.

> Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp:364
> +        CFMutableDictionaryRef providerOptions = CFDictionaryCreateMutable(0, 0, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);

Couldn't this be a RetainPtr<CFMutableDictionaryRef>?

> Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp:367
> +        CGImageProviderRef provider = CGImageGetImageProvider(image.get());

Probably could use pngImage here.

> Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp:387
> +        CFDataRef data = CFDataCreate(0, pngData, CGImageBlockGetBytesPerRow(block) * (size_t)CGRectGetHeight(blockRect));

Couldn't this be a RetainPtr<CFDataRef>?

> Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp:390
> +        CGDataProviderRef imgDataProvider = CGDataProviderCreateWithCFData(data);

RetainPtr?

> Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp:398
> +        CFRelease(providerOptions);

... these could go away if we were using RetainPtrs for the objects.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141106/e3126b22/attachment-0002.html>


More information about the webkit-unassigned mailing list