Changeset 84213 in webkit
- Timestamp:
- Apr 18, 2011 6:35:15 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84208 r84213 1 2011-04-18 John Bauman <jbauman@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Don't cast BitmapImageSingleFrameSkia to BitmapImage 6 https://bugs.webkit.org/show_bug.cgi?id=58821 7 8 BitmapImageSingleFrameSkia has isBitmap return true, but 9 can't be cast to a BitmapImage. Instead of using BitmapImage, 10 use isOpaque from SkBitmap to determine if the image has alpha. 11 12 No new tests. 13 14 * platform/graphics/skia/GraphicsContext3DSkia.cpp: 15 (WebCore::GraphicsContext3D::getImageData): 16 1 17 2011-04-18 Jessie Berlin <jberlin@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
r82728 r84213 52 52 return false; 53 53 OwnPtr<NativeImageSkia> pixels; 54 NativeImageSkia* skiaImage = 0;54 NativeImageSkia* skiaImage = image->nativeImageForCurrentFrame(); 55 55 AlphaOp neededAlphaOp = AlphaDoNothing; 56 bool hasAlpha = image->isBitmapImage() ? static_cast<BitmapImage*>(image)->frameHasAlphaAtIndex(0) : true;57 if (( ignoreGammaAndColorProfile || (hasAlpha && !premultiplyAlpha)) && image->data()) {56 bool hasAlpha = skiaImage ? !skiaImage->isOpaque() : true; 57 if ((!skiaImage || ignoreGammaAndColorProfile || (hasAlpha && !premultiplyAlpha)) && image->data()) { 58 58 ImageSource decoder(ImageSource::AlphaNotPremultiplied, 59 59 ignoreGammaAndColorProfile ? ImageSource::GammaAndColorProfileIgnored : ImageSource::GammaAndColorProfileApplied); … … 72 72 if (hasAlpha && premultiplyAlpha) 73 73 neededAlphaOp = AlphaDoPremultiply; 74 } else { 75 skiaImage = image->nativeImageForCurrentFrame(); 76 if (!premultiplyAlpha && hasAlpha) 77 neededAlphaOp = AlphaDoUnmultiply; 78 } 74 } else if (!premultiplyAlpha && hasAlpha) 75 neededAlphaOp = AlphaDoUnmultiply; 79 76 if (!skiaImage) 80 77 return false;
Note: See TracChangeset
for help on using the changeset viewer.