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

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: Rebased 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..07f164c7f9ba7f7500a520b572965b11cc40cdc7 100644
--- a/Source/core/platform/graphics/ImageSource.cpp
+++ b/Source/core/platform/graphics/ImageSource.cpp
@@ -45,20 +45,11 @@ 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);
+ return m_decoder ? m_decoder->clearCacheExceptFrame(clearExceptFrame) : 0;
}
bool ImageSource::initialized() const
« no previous file with comments | « Source/core/platform/graphics/ImageSource.h ('k') | Source/core/platform/graphics/chromium/DeferredImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698