Index: src/images/SkStreamHelpers.h |
diff --git a/src/images/SkStreamHelpers.h b/src/images/SkStreamHelpers.h |
index 7e766b7eccc45e15e89fe830ec6cc71f142a8961..008dd8e17a05f75b60e309a44578c2aa0b5c04d3 100644 |
--- a/src/images/SkStreamHelpers.h |
+++ b/src/images/SkStreamHelpers.h |
@@ -10,6 +10,7 @@ |
class SkAutoMalloc; |
class SkStream; |
+class SkData; |
/** |
* Copy the provided stream to memory allocated by storage. |
@@ -24,4 +25,12 @@ class SkStream; |
*/ |
size_t CopyStreamToStorage(SkAutoMalloc* storage, SkStream* stream); |
+/** |
+ * Copy the provided stream to an SkData variable. Used by SkImageDecoder_libktx. |
+ * @param stream SkStream to be copied into data. |
+ * @return SkData* The resulting SkData after the copy. This data will have a |
+ * ref count of one upon return and belongs to the caller. Returns NULL on failure. |
+ */ |
+SkData *CopyStreamToData(SkStream* stream); |
+ |
#endif // SkStreamHelpers_DEFINED |