Index: Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp |
=================================================================== |
--- Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp (revision 104767) |
+++ Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp (working copy) |
@@ -158,7 +158,9 @@ |
if (m_status == FrameComplete) { |
m_bitmap.setDataComplete(); // Tell the bitmap it's done. |
#if PLATFORM(CHROMIUM) && OS(DARWIN) |
- if (m_colorProfile.isEmpty()) |
+ // resolveColorSpace() and callees assume that the alpha channel is |
+ // premultiplied, so don't apply the color profile if it isn't. |
+ if (m_colorProfile.isEmpty() || !m_premultiplyAlpha) |
return; |
RetainPtr<CGColorSpaceRef> cgColorSpace(AdoptCF, createColorSpace(m_colorProfile)); |
resolveColorSpace(m_bitmap.bitmap(), cgColorSpace.get()); |