| 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 19ed900844e6134debd272d79dc5a90b4a48d498..6bd22c923ea3ab9b77ed1e4398427c6af54cfd5c 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| @@ -384,10 +384,17 @@ bool BitmapImage::frameHasAlphaAtIndex(size_t index)
|
| if (m_frames.size() <= index)
|
| return true;
|
|
|
| + if (m_frames[index].m_haveMetadata && !m_frames[index].m_hasAlpha)
|
| + return false;
|
| +
|
| + // m_hasAlpha may change after m_haveMetadata is set to true, so always ask
|
| + // ImageSource for the value if the cached value is the default value.
|
| + bool hasAlpha = m_source.frameHasAlphaAtIndex(index);
|
| +
|
| if (m_frames[index].m_haveMetadata)
|
| - return m_frames[index].m_hasAlpha;
|
| + m_frames[index].m_hasAlpha = hasAlpha;
|
|
|
| - return m_source.frameHasAlphaAtIndex(index);
|
| + return hasAlpha;
|
| }
|
|
|
| bool BitmapImage::currentFrameKnownToBeOpaque(MetadataMode metadataMode)
|
|
|