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

Unified Diff: Source/core/platform/image-decoders/ImageDecoder.h

Issue 14317005: Checking if frame is complete and access duration doesn't need a decode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: const Created 7 years, 8 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/ImageDecoder.h
diff --git a/Source/core/platform/image-decoders/ImageDecoder.h b/Source/core/platform/image-decoders/ImageDecoder.h
index 89ff44d9020644a02013366183e4ed7df77eef64..95f06b7ba627cc85222343923c7823ddc8bf7ca5 100644
--- a/Source/core/platform/image-decoders/ImageDecoder.h
+++ b/Source/core/platform/image-decoders/ImageDecoder.h
@@ -293,6 +293,13 @@ namespace WebCore {
// Make the best effort guess to check if the requested frame has alpha channel.
virtual bool frameHasAlphaAtIndex(size_t) const;
+ // Whether or not the frame is completely decoded or fully received.
+ // This method is used by animated images only.
Peter Kasting 2013/04/23 21:43:20 I'm not terribly comfortable with this comment. I
Alpha Left Google 2013/04/25 23:02:44 I'm pretty sure this API is used only for animated
Peter Kasting 2013/04/25 23:22:32 But you're adding the function in this CL, and the
+ virtual bool frameIsCompleteAtIndex(size_t) const { return false; }
+
+ // Duration for displaying a frame in seconds. This method is used by animated images only.
+ virtual float frameDurationAtIndex(size_t) const { return 0; }
+
// Number of bytes in the decoded frame requested. Return 0 if not yet decoded.
virtual unsigned frameBytesAtIndex(size_t) const;

Powered by Google App Engine
This is Rietveld 408576698