Chromium Code Reviews| Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| index 21cc9616ae5159c5e1f62bbe3c868348cf5a06d0..b541b4690f82d139ee0db2b2e9fc9748f5e88c77 100644 |
| --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| @@ -153,6 +153,12 @@ public: |
| return !m_failed && m_sizeAvailable; |
| } |
| + // Whether the requested frame is fully decoded. |
| + inline bool frameIsCompleteAtIndex(size_t frameIndex) const |
|
scroggo_chromium
2016/05/09 21:54:33
Should there be tests for this new method?
Also,
aleksandar.stojiljkovic
2016/05/10 21:59:31
It is public because it is called from PNGImageRea
|
| + { |
| + return (frameIndex < m_frameBufferCache.size()) && (m_frameBufferCache[frameIndex].getStatus() == ImageFrame::FrameComplete); |
| + } |
| + |
| virtual IntSize size() const { return m_size; } |
| // Decoders which downsample images should override this method to |
| @@ -212,7 +218,7 @@ public: |
| virtual bool frameHasAlphaAtIndex(size_t) const; |
| // Whether or not the frame is fully received. |
| - virtual bool frameIsCompleteAtIndex(size_t) const; |
| + virtual bool frameIsFullyReceivedAtIndex(size_t) const; |
| // Duration for displaying a frame in seconds. This method is only used by |
| // animated images. |