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

Unified Diff: src/images/SkStreamHelpers.h

Issue 302333002: Initial KTX file decoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More code comments Created 6 years, 7 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 | « src/images/SkImageDecoder_ktx.cpp ('k') | src/images/SkStreamHelpers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/images/SkImageDecoder_ktx.cpp ('k') | src/images/SkStreamHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698