Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1101)

Unified Diff: Source/core/platform/graphics/ImageSource.cpp

Issue 15350006: Decode GIF image frames on demand. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/ImageSource.cpp
diff --git a/Source/core/platform/graphics/ImageSource.cpp b/Source/core/platform/graphics/ImageSource.cpp
index e01f10149f38d527e5b5a6c78194fe195b77413d..d0ff643b3779b4b6f3db250eafa69197e98892ec 100644
--- a/Source/core/platform/graphics/ImageSource.cpp
+++ b/Source/core/platform/graphics/ImageSource.cpp
@@ -45,20 +45,13 @@ ImageSource::ImageSource(ImageSource::AlphaOption alphaOption, ImageSource::Gamm
ImageSource::~ImageSource()
{
- clear(true);
}
-void ImageSource::clear(bool destroyAll, size_t clearBeforeFrame, SharedBuffer* data, bool allDataReceived)
+size_t ImageSource::clearCacheExceptFrame(size_t clearExceptFrame)
{
- if (!destroyAll) {
- if (m_decoder)
- m_decoder->clearFrameBufferCache(clearBeforeFrame);
- return;
- }
-
- m_decoder.clear();
- if (data)
- setData(data, allDataReceived);
+ if (m_decoder)
Peter Kasting 2013/05/29 02:02:18 Nit: Simpler: return m_decoder ? m_decoder->c
Xianzhu 2013/05/29 18:37:01 Done.
+ return m_decoder->clearCacheExceptFrame(clearExceptFrame);
+ return 0;
}
bool ImageSource::initialized() const

Powered by Google App Engine
This is Rietveld 408576698