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

Unified Diff: include/core/SkStream.h

Issue 101973005: SkDecodingImageGenerator now uses SkStreamRewindable (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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: include/core/SkStream.h
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index 50ed691e5ae4b0e26a882850141b60aa1bba1cca..d2eff2cb48c9ed1eb052b2ef1acd05b8cac9c7be 100644
--- a/include/core/SkStream.h
+++ b/include/core/SkStream.h
@@ -126,6 +126,11 @@ public:
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; }
+ /** Returns a ref to the data, if it can be created
+ inexpensively. If non-null is returned, the caller is
+ responsible for calling unref() on the data when it is
+ finished. */
+ virtual SkData* getData() const { return NULL; }
bungeman-skia 2013/12/05 21:03:44 I would put this down with SkStreamMemory, replaci
hal.canary 2013/12/05 22:29:29 Done.
//SkStreamMemory
/** Returns the starting address for the data. If this cannot be done, returns NULL. */
@@ -269,6 +274,7 @@ public:
virtual size_t getLength() const SK_OVERRIDE;
+ virtual SkData* getData() const SK_OVERRIDE;
virtual const void* getMemoryBase() SK_OVERRIDE;
private:
@@ -341,6 +347,7 @@ public:
virtual size_t getLength() const SK_OVERRIDE;
+ virtual SkData* getData() const SK_OVERRIDE;
virtual const void* getMemoryBase() SK_OVERRIDE;
private:

Powered by Google App Engine
This is Rietveld 408576698