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

Unified Diff: include/core/SkStream.h

Issue 22861028: Handle SkStream::rewind properly. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: More refinement. Created 7 years, 4 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
« no previous file with comments | « no previous file | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkStream.h
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index d7a105d3b84e1080fdc4157b1d40f52a1c68750c..e68901049d7b2b5c6666785dfead888bf890ce6a 100644
--- a/include/core/SkStream.h
+++ b/include/core/SkStream.h
@@ -96,7 +96,13 @@ public:
SkData* readData();
//SkStreamRewindable
- /** Rewinds to the beginning of the stream. If this cannot be done, return false. */
+ /** Rewinds to the beginning of the stream. The current position is not affected
+ * when false is returned.
+ *
+ * Returns false iff after this call one of the following is true:
+ * * The stream is known to be somewhere other than the beginning.
+ * * It is unknown whether the stream is at the beginning.
reed1 2013/08/27 20:00:37 Are both of these iff clauses true at the same tim
scroggo 2013/08/27 20:12:56 No. An implementation could return false if the st
+ */
virtual bool rewind() { return false; }
/** Duplicates this stream. If this cannot be done, returns NULL.
« no previous file with comments | « no previous file | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698