Chromium Code Reviews| 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..f8f9c6a6cc65194654698759b061d0cdf8999f1c 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_isComplete = m_source.frameIsFullyReceivedAtIndex(index); |
|
Peter Kasting
2016/05/10 00:00:13
This field should be renamed m_isFullyReceived.
.
aleksandar.stojiljkovic
2016/05/10 21:59:30
The reason I left the name is because of work ongo
|
| if (repetitionCount(false) != cAnimationNone) |
| m_frames[index].m_duration = m_source.frameDurationAtIndex(index); |
| m_frames[index].m_hasAlpha = m_source.frameHasAlphaAtIndex(index); |
| @@ -229,7 +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 |
| + // NOTE: Don't call frameIsFullyReceivedAtIndex() here, that will try to |
|
scroggo_chromium
2016/05/09 21:54:33
Is this comment true?
Peter Kasting
2016/05/10 00:00:13
I don't think so.
aleksandar.stojiljkovic
2016/05/10 21:59:30
Removed.
Seems that it was once the case and that
|
| // 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) |
| @@ -358,12 +358,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) |
| return true; |
| - return m_source.frameIsCompleteAtIndex(index); |
| + return m_source.frameIsFullyReceivedAtIndex(index); |
| } |
| float BitmapImage::frameDurationAtIndex(size_t index) |
| @@ -411,9 +411,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 +471,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 +518,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) |