| Index: third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| index 80d9482b1ad892bd8a88d69a286dbfa96fa314f8..38cbbf4e99cc85906d010162e9da773bf0b1b5b3 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| @@ -436,8 +436,13 @@ bool BitmapImage::frameHasAlphaAtIndex(size_t index)
|
| return m_source.frameHasAlphaAtIndex(index);
|
| }
|
|
|
| -bool BitmapImage::currentFrameKnownToBeOpaque()
|
| +bool BitmapImage::currentFrameKnownToBeOpaque(MetadataMode metadataMode)
|
| {
|
| + if (metadataMode == PreCacheMetadata) {
|
| + // frameHasAlphaAtIndex() conservatively returns false for uncached frames. To increase the
|
| + // chance of an accurate answer, pre-cache the current frame metadata.
|
| + frameAtIndex(currentFrame());
|
| + }
|
| return !frameHasAlphaAtIndex(currentFrame());
|
| }
|
|
|
|
|