| 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 e2055c514df784768c78aed32fba7f7dc501aa07..05fc79f46483b31f66381fad2503a9aab25ff733 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| @@ -160,7 +160,7 @@ void BitmapImage::cacheFrame(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);
|
| @@ -218,10 +218,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);
|
| }
|
|
|
| @@ -344,12 +341,12 @@ PassRefPtr<SkImage> BitmapImage::frameAtIndex(size_t index)
|
| return m_frames[index].m_frame;
|
| }
|
|
|
| -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)
|
| @@ -397,9 +394,9 @@ bool BitmapImage::currentFrameKnownToBeOpaque(MetadataMode metadataMode)
|
| return !frameHasAlphaAtIndex(currentFrame());
|
| }
|
|
|
| -bool BitmapImage::currentFrameIsComplete()
|
| +bool BitmapImage::currentFrameIsFullyReceived()
|
| {
|
| - return frameIsCompleteAtIndex(currentFrame());
|
| + return frameIsFullyReceivedAtIndex(currentFrame());
|
| }
|
|
|
| bool BitmapImage::currentFrameIsLazyDecoded()
|
| @@ -457,7 +454,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
|
| @@ -504,7 +501,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)
|
|
|