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

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

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.h
diff --git a/Source/core/platform/graphics/ImageSource.h b/Source/core/platform/graphics/ImageSource.h
index 045232c03ac8fbabbc6ccfb93644580865139bc1..761df6518aef36caab5c5ba6ed32c3a11a3a6746 100644
--- a/Source/core/platform/graphics/ImageSource.h
+++ b/Source/core/platform/graphics/ImageSource.h
@@ -81,8 +81,8 @@ public:
~ImageSource();
// Tells the ImageSource that the Image no longer cares about decoded frame
- // data -- at all (if |destroyAll| is true), or before frame
- // |clearBeforeFrame| (if |destroyAll| is false). The ImageSource should
+ // data -- at all (if |destroyAll| is true), or except frame
+ // |clearExceptFrame| (if |destroyAll| is false). The ImageSource should
// delete cached decoded data for these frames where possible to keep memory
// usage low. When |destroyAll| is true, the ImageSource should also reset
// any local state so that decoding can begin again.
@@ -93,18 +93,11 @@ public:
// asked to decode frames they can't decode due to the loss of previous
// decoded frames.
//
- // Callers should not call clear(false, n) and subsequently call
- // createFrameAtIndex(m) with m < n, unless they first call clear(true).
- // This ensures that stateful ImageSources/decoders will work properly.
- //
// The |data| and |allDataReceived| parameters should be supplied by callers
// who set |destroyAll| to true if they wish to be able to continue using
// the ImageSource. This way implementations which choose to destroy their
// decoders in some cases can reconstruct them correctly.
- void clear(bool destroyAll,
- size_t clearBeforeFrame = 0,
- SharedBuffer* data = NULL,
- bool allDataReceived = false);
+ void clear(bool destroyAll, size_t clearExceptFrame = 0, SharedBuffer* data = 0, bool allDataReceived = false);
bool initialized() const;

Powered by Google App Engine
This is Rietveld 408576698