add copyToData() to dyanamicwstream
git-svn-id: http://skia.googlecode.com/svn/trunk@1695 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index c3d8185..9dfb8df 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 @@
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();