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 fad71475e10d2082229bafd35d958a839138e19c..37dcd4ac81841146f5112f4d23282074c14cf538 100644 |
--- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
@@ -163,7 +163,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); |
@@ -229,10 +229,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); |
} |
@@ -358,12 +355,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) |
@@ -411,9 +408,9 @@ bool BitmapImage::currentFrameKnownToBeOpaque(MetadataMode metadataMode) |
return !frameHasAlphaAtIndex(currentFrame()); |
} |
-bool BitmapImage::currentFrameIsComplete() |
+bool BitmapImage::currentFrameIsFullyReceived() |
{ |
- return frameIsCompleteAtIndex(currentFrame()); |
+ return frameIsFullyReceivedAtIndex(currentFrame()); |
} |
bool BitmapImage::currentFrameIsLazyDecoded() |
@@ -471,7 +468,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 |
@@ -518,7 +515,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) |