Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
| diff --git a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
| index 05fff2ecdc2786020b8829daa16fd3241bf81bc8..350eee96dfc9bdcbf1905e297d4bbfb0cec7bedd 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
| +++ b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
| @@ -92,9 +92,13 @@ public: |
| return m_client->repetitionCount(); |
| } |
| - bool frameIsCompleteAtIndex(size_t) const override |
| + bool frameIsFullyReceivedAtIndex(size_t index) const override |
| { |
| - return m_client->status() == ImageFrame::FrameComplete; |
| + // All but the last frame are fully received. |
| + // For the last frame use base class implementation. |
| + if (index < m_frameBufferCache.size() - 1) |
| + return true; |
| + return ImageDecoder::frameIsFullyReceivedAtIndex(index); |
|
Peter Kasting
2016/06/10 00:10:02
Nit: Simpler:
return (index < m_frameBuff
|
| } |
| float frameDurationAtIndex(size_t) const override |