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

Unified Diff: include/core/SkStream.h

Issue 19677002: Add a detachAsStream to SkDynamicMemoryWStream. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Line length. Created 7 years, 5 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 | « gm/gmmain.cpp ('k') | src/core/SkStream.cpp » ('j') | 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 10125)
+++ include/core/SkStream.h (working copy)
@@ -280,7 +280,7 @@
virtual size_t getLength() const SK_OVERRIDE;
- const void* getMemoryBase() SK_OVERRIDE;
+ virtual const void* getMemoryBase() SK_OVERRIDE;
private:
SkFILE* fFILE;
@@ -423,7 +423,10 @@
*/
SkData* copyToData() const;
- // reset the stream to its original state
+ /** Reset, returning a reader stream with the current content. */
+ SkStreamAsset* detatchAsStream();
+
+ /** Reset the stream to its original, empty, state. */
void reset();
void padToAlign4();
private:
@@ -435,6 +438,10 @@
void invalidateCopy();
+ // For access to the Block type.
+ friend class SkBlockMemoryStream;
+ friend class SkBlockMemoryRefCnt;
+
typedef SkWStream INHERITED;
};
« no previous file with comments | « gm/gmmain.cpp ('k') | src/core/SkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698