Index: src/core/SkStreamPriv.h |
diff --git a/src/core/SkStreamPriv.h b/src/core/SkStreamPriv.h |
index 5b5a73adef0f7368bc6df2159af55e116a9d48fd..fd11de932ab2f1603ff0423075f3a38cc15c11b4 100644 |
--- a/src/core/SkStreamPriv.h |
+++ b/src/core/SkStreamPriv.h |
@@ -10,6 +10,7 @@ |
class SkAutoMalloc; |
class SkStream; |
+class SkStreamRewindable; |
class SkData; |
/** |
@@ -34,4 +35,13 @@ size_t SkCopyStreamToStorage(SkAutoMalloc* storage, SkStream* stream); |
*/ |
SkData *SkCopyStreamToData(SkStream* stream); |
+/** |
+ * Attempt to convert this stream to a StreamRewindable in the |
+ * cheapest possible manner (calling duplicate() if possible, and |
+ * otherwise allocating memory for a copy). If duplicate() succeeds, |
+ * the input stream will be left as is; otherwise this function |
+ * calls rewind() on the input stream before returning. |
bungeman-skia
2014/07/14 15:05:00
There doesn't seem to be any actionable informatio
hal.canary
2014/07/14 15:08:52
Done.
|
+ */ |
+SkStreamRewindable* SkStreamRewindableFromSkStream(SkStream* stream); |
+ |
#endif // SkStreamPriv_DEFINED |