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

Unified Diff: include/core/SkStream.h

Issue 68773009: Remove backward compatibility shims from SkStream.h. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkStream.h
===================================================================
--- include/core/SkStream.h (revision 12241)
+++ include/core/SkStream.h (working copy)
@@ -60,22 +60,14 @@
* @return the actual number bytes that could be skipped.
*/
size_t skip(size_t size) {
- //return this->read(NULL, size);
- //TODO: remove this old logic after updating existing implementations
- return 0 == size ? 0 : this->read(NULL, size);
+ return this->read(NULL, size);
}
/** Returns true when all the bytes in the stream have been read.
* This may return true early (when there are no more bytes to be read)
* or late (after the first unsuccessful read).
- *
- * In Progress: do not use until all implementations are updated.
- * TODO: after this is implemented everywhere, make pure virtual.
*/
- virtual bool isAtEnd() const {
- SkASSERT(false);
- return true;
- }
+ virtual bool isAtEnd() const = 0;
int8_t readS8();
int16_t readS16();
@@ -133,11 +125,7 @@
/** Returns true if this stream can report it's total length. */
virtual bool hasLength() const { return false; }
/** Returns the total length of the stream. If this cannot be done, returns 0. */
- virtual size_t getLength() const {
- //return 0;
- //TODO: remove the following after everyone is updated.
- return ((SkStream*)this)->read(NULL, 0);
- }
+ virtual size_t getLength() const { return 0; }
//SkStreamMemory
/** Returns the starting address for the data. If this cannot be done, returns NULL. */
@@ -151,11 +139,6 @@
/** SkStreamRewindable is a SkStream for which rewind and duplicate are required. */
class SK_API SkStreamRewindable : public SkStream {
public:
- //TODO: remove the following after everyone is updated (ensures new behavior on new classes).
- virtual bool isAtEnd() const SK_OVERRIDE = 0;
- //TODO: remove the following after everyone is updated (ensures new behavior on new classes).
- virtual size_t getLength() const SK_OVERRIDE { return 0; }
-
virtual bool rewind() SK_OVERRIDE = 0;
virtual SkStreamRewindable* duplicate() const SK_OVERRIDE = 0;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698