Chromium Code Reviews| Index: Source/platform/graphics/BitmapImage.cpp |
| diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp |
| index e7d12346128df415b7b2c3c559ba0f91b8398056..2ed24eb786e0b8e74064b30f5d647ab323a330f1 100644 |
| --- a/Source/platform/graphics/BitmapImage.cpp |
| +++ b/Source/platform/graphics/BitmapImage.cpp |
| @@ -146,8 +146,9 @@ void BitmapImage::destroyDecodedDataIfNecessary() |
| for (size_t i = 0; i < m_frames.size(); ++i) |
| allFrameBytes += m_frames[i].m_frameBytes; |
| - if (allFrameBytes > cLargeAnimationCutoff) |
| + if (allFrameBytes > cLargeAnimationCutoff) { |
| destroyDecodedData(false); |
| + } |
| } |
| void BitmapImage::destroyMetadataAndNotify(size_t frameBytesCleared) |
| @@ -311,13 +312,6 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const Fl |
| startAnimation(); |
| } |
| -void BitmapImage::resetDecoder() |
| -{ |
| - ASSERT(isMainThread()); |
| - |
| - m_source.resetDecoder(); |
| -} |
| - |
| size_t BitmapImage::frameCount() |
| { |
| if (!m_haveFrameCount) { |
| @@ -603,7 +597,7 @@ bool BitmapImage::internalAdvanceAnimation(bool skippingFrames) |
| // repetition count before, we should have decoded the whole image by |
| // now, so it should now be available. |
| // Note that we don't need to special-case cAnimationLoopOnce here |
| - // because it is 0 (see comments on its declaration in ImageSource.h). |
| + // because it is 0 (see comments on its declaration in ImageDecoder.h). |
|
Stephen White
2015/03/13 20:21:41
ImageDecoder.h -> ImageAnimation.h
|
| if ((repetitionCount(true) != cAnimationLoopInfinite && m_repetitionsComplete > m_repetitionCount) |
| || (m_animationPolicy == ImageAnimationPolicyAnimateOnce && m_repetitionsComplete > 0)) { |
| m_animationFinished = true; |