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

Unified Diff: Source/core/platform/image-decoders/ico/ICOImageDecoder.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/image-decoders/ico/ICOImageDecoder.cpp
diff --git a/Source/core/platform/image-decoders/ico/ICOImageDecoder.cpp b/Source/core/platform/image-decoders/ico/ICOImageDecoder.cpp
index 6cd4379d83008a213a597537704da56e474016bd..6615c9e89a8ea78455eb011ef2ae89d38dbde7f0 100644
--- a/Source/core/platform/image-decoders/ico/ICOImageDecoder.cpp
+++ b/Source/core/platform/image-decoders/ico/ICOImageDecoder.cpp
@@ -102,8 +102,10 @@ size_t ICOImageDecoder::frameCount()
decode(0, true);
if (m_frameBufferCache.isEmpty()) {
m_frameBufferCache.resize(m_dirEntries.size());
- for (size_t i = 0; i < m_dirEntries.size(); ++i)
+ for (size_t i = 0; i < m_dirEntries.size(); ++i) {
m_frameBufferCache[i].setPremultiplyAlpha(m_premultiplyAlpha);
+ m_frameBufferCache[i].setRequiredPreviousFrameIndex(notFound);
+ }
}
// CAUTION: We must not resize m_frameBufferCache again after this, as
// decodeAtIndex() may give a BMPImageReader a pointer to one of the

Powered by Google App Engine
This is Rietveld 408576698