| 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 9f29f85aaeb796b88454c0a80e4bfe5811f8bddc..0e2499801f2f64f0d8ab97072dd6a65f087e1611 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| @@ -118,6 +118,12 @@ void BitmapImage::destroyDecodedData()
|
| notifyMemoryChanged();
|
| }
|
|
|
| +bool BitmapImage::clear()
|
| +{
|
| + destroyDecodedData();
|
| + return m_source.clear();
|
| +}
|
| +
|
| PassRefPtr<SharedBuffer> BitmapImage::data()
|
| {
|
| return m_source.data();
|
| @@ -344,6 +350,11 @@ sk_sp<SkImage> BitmapImage::frameAtIndex(size_t index)
|
| if (index == m_cachedFrameIndex && m_cachedFrame)
|
| return m_cachedFrame;
|
|
|
| + if (m_source.isBufferCleared()) {
|
| + getImageObserver()->requireReloading(this);
|
| + return nullptr;
|
| + }
|
| +
|
| return decodeAndCacheFrame(index);
|
| }
|
|
|
|
|