Title: [110499] trunk/Source/WebCore
- Revision
- 110499
- Author
- [email protected]
- Date
- 2012-03-12 16:23:56 -0700 (Mon, 12 Mar 2012)
Log Message
[Skia] Release CGImage used to apply color space conversion to SkBitmap
https://bugs.webkit.org/show_bug.cgi?id=80892
Patch by Brian Salomon <[email protected]> on 2012-03-12
Reviewed by Adam Barth.
Regressions should be covered by any test that does image decode on the mac.
* platform/image-decoders/skia/ImageDecoderSkia.cpp:
(WebCore::resolveColorSpace):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (110498 => 110499)
--- trunk/Source/WebCore/ChangeLog 2012-03-12 23:15:45 UTC (rev 110498)
+++ trunk/Source/WebCore/ChangeLog 2012-03-12 23:23:56 UTC (rev 110499)
@@ -1,3 +1,15 @@
+2012-03-12 Brian Salomon <[email protected]>
+
+ [Skia] Release CGImage used to apply color space conversion to SkBitmap
+ https://bugs.webkit.org/show_bug.cgi?id=80892
+
+ Reviewed by Adam Barth.
+
+ Regressions should be covered by any test that does image decode on the mac.
+
+ * platform/image-decoders/skia/ImageDecoderSkia.cpp:
+ (WebCore::resolveColorSpace):
+
2012-03-12 Levi Weintraub <[email protected]>
Update LayoutUnit usage in RenderMathML* classes
Modified: trunk/Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp (110498 => 110499)
--- trunk/Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp 2012-03-12 23:15:45 UTC (rev 110498)
+++ trunk/Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp 2012-03-12 23:23:56 UTC (rev 110499)
@@ -119,7 +119,7 @@
{
int width = bitmap.width();
int height = bitmap.height();
- CGImageRef srcImage = SkCreateCGImageRefWithColorspace(bitmap, colorSpace);
+ RetainPtr<CGImageRef> srcImage(AdoptCF, SkCreateCGImageRefWithColorspace(bitmap, colorSpace));
SkAutoLockPixels lock(bitmap);
void* pixels = bitmap.getPixels();
RetainPtr<CGContextRef> cgBitmap(AdoptCF, CGBitmapContextCreate(pixels, width, height, 8, width * 4, deviceRGBColorSpaceRef(), kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedFirst));
@@ -127,7 +127,7 @@
return;
CGContextSetBlendMode(cgBitmap.get(), kCGBlendModeCopy);
CGRect bounds = { {0, 0}, {width, height} };
- CGContextDrawImage(cgBitmap.get(), bounds, srcImage);
+ CGContextDrawImage(cgBitmap.get(), bounds, srcImage.get());
}
static CGColorSpaceRef createColorSpace(const ColorProfile& colorProfile)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes