| 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 2f3b925fa0913a5cab7cee801239036ab77c9431..14b7d370cd2c6a40507486c89b13585d73d05dec 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| @@ -146,7 +146,7 @@ PassRefPtr<SkImage> BitmapImage::decodeAndCacheFrame(size_t index)
|
|
|
| m_frames[index].m_orientation = m_source.orientationAtIndex(index);
|
| m_frames[index].m_haveMetadata = true;
|
| - m_frames[index].m_isComplete = m_source.frameIsCompleteAtIndex(index);
|
| + m_frames[index].m_isFullyReceived = m_source.frameIsFullyReceivedAtIndex(index);
|
| if (repetitionCount(false) != cAnimationNone)
|
| m_frames[index].m_duration = m_source.frameDurationAtIndex(index);
|
| m_frames[index].m_hasAlpha = m_source.frameHasAlphaAtIndex(index);
|
| @@ -205,10 +205,7 @@ bool BitmapImage::dataChanged(bool allDataReceived)
|
| // frame affected by appending new data here. Thus we have to clear all the
|
| // incomplete frames to be safe.
|
| for (size_t i = 0; i < m_frames.size(); ++i) {
|
| - // NOTE: Don't call frameIsCompleteAtIndex() here, that will try to
|
| - // decode any uncached (i.e. never-decoded or
|
| - // cleared-on-a-previous-pass) frames!
|
| - if (m_frames[i].m_haveMetadata && !m_frames[i].m_isComplete) {
|
| + if (m_frames[i].m_haveMetadata && !m_frames[i].m_isFullyReceived) {
|
| m_frames[i].clear(true);
|
| if (i == m_cachedFrameIndex)
|
| m_cachedFrame.clear();
|
| @@ -326,12 +323,12 @@ PassRefPtr<SkImage> BitmapImage::frameAtIndex(size_t index)
|
| return decodeAndCacheFrame(index);
|
| }
|
|
|
| -bool BitmapImage::frameIsCompleteAtIndex(size_t index)
|
| +bool BitmapImage::frameIsFullyReceivedAtIndex(size_t index)
|
| {
|
| - if (index < m_frames.size() && m_frames[index].m_haveMetadata && m_frames[index].m_isComplete)
|
| + if (index < m_frames.size() && m_frames[index].m_haveMetadata && m_frames[index].m_isFullyReceived)
|
| return true;
|
|
|
| - return m_source.frameIsCompleteAtIndex(index);
|
| + return m_source.frameIsFullyReceivedAtIndex(index);
|
| }
|
|
|
| float BitmapImage::frameDurationAtIndex(size_t index)
|
| @@ -379,9 +376,9 @@ bool BitmapImage::currentFrameKnownToBeOpaque(MetadataMode metadataMode)
|
| return !frameHasAlphaAtIndex(currentFrame());
|
| }
|
|
|
| -bool BitmapImage::currentFrameIsComplete()
|
| +bool BitmapImage::currentFrameIsFullyReceived()
|
| {
|
| - return frameIsCompleteAtIndex(currentFrame());
|
| + return frameIsFullyReceivedAtIndex(currentFrame());
|
| }
|
|
|
| bool BitmapImage::currentFrameIsLazyDecoded()
|
| @@ -439,7 +436,7 @@ void BitmapImage::startAnimation(CatchUpAnimation catchUpIfNecessary)
|
|
|
| // Don't advance the animation to an incomplete frame.
|
| size_t nextFrame = (m_currentFrame + 1) % frameCount();
|
| - if (!m_allDataReceived && !frameIsCompleteAtIndex(nextFrame))
|
| + if (!m_allDataReceived && !frameIsFullyReceivedAtIndex(nextFrame))
|
| return;
|
|
|
| // Don't advance past the last frame if we haven't decoded the whole image
|
| @@ -486,7 +483,7 @@ void BitmapImage::startAnimation(CatchUpAnimation catchUpIfNecessary)
|
| // See if we've also passed the time for frames after that to start, in
|
| // case we need to skip some frames entirely. Remember not to advance
|
| // to an incomplete frame.
|
| - for (size_t frameAfterNext = (nextFrame + 1) % frameCount(); frameIsCompleteAtIndex(frameAfterNext); frameAfterNext = (nextFrame + 1) % frameCount()) {
|
| + for (size_t frameAfterNext = (nextFrame + 1) % frameCount(); frameIsFullyReceivedAtIndex(frameAfterNext); frameAfterNext = (nextFrame + 1) % frameCount()) {
|
| // Should we skip the next frame?
|
| double frameAfterNextStartTime = m_desiredFrameStartTime + frameDurationAtIndex(nextFrame);
|
| if (time < frameAfterNextStartTime)
|
|
|