diff options
author | 2011-06-23 21:48:04 +0000 | |
---|---|---|
committer | 2011-06-23 21:48:04 +0000 | |
commit | 70442a6cf73c9a822df23961f5e16dc3abc18f26 (patch) | |
tree | 13b2045326fadb9be3a5d9c78b4f6b3a7f2f30b1 /include | |
parent | 9df621da5024dda2ffd77cfa6e6c0a0f68e4aa86 (diff) |
add copyToData() to dyanamicwstream
git-svn-id: http://skia.googlecode.com/svn/trunk@1695 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkStream.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/core/SkStream.h b/include/core/SkStream.h index c3d8185a06..9dfb8df646 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -20,6 +20,8 @@ #include "SkRefCnt.h" #include "SkScalar.h" +class SkDataRef; + class SK_API SkStream : public SkRefCnt { public: virtual ~SkStream(); @@ -289,8 +291,14 @@ public: const char* getStream() const; // same as getStream, but additionally detach the flattened datat - const char* detach(); - + // DEPRECATED : use copyToData() instead + const char* detach() const; + + /** + * Return a copy of the data written so far + */ + SkDataRef* copyToData() const; + // reset the stream to its original state void reset(); void padToAlign4(); |