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

Unified Diff: src/core/SkStreamPriv.h

Issue 1604963002: SkStream/Priv cleanups (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update header description Created 4 years, 11 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/core/SkStream.cpp ('k') | src/images/SkImageDecoder_astc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStreamPriv.h
diff --git a/src/core/SkStreamPriv.h b/src/core/SkStreamPriv.h
index b82f7d84e9de0227705f864e4fe3724cbdc0aefb..75f7cce8df720667c19e7515f484b2680e0ef974 100644
--- a/src/core/SkStreamPriv.h
+++ b/src/core/SkStreamPriv.h
@@ -8,40 +8,22 @@
#ifndef SkStreamPriv_DEFINED
#define SkStreamPriv_DEFINED
-class SkAutoMalloc;
-class SkStream;
-class SkStreamRewindable;
class SkData;
-
-/**
- * Copy the provided stream to memory allocated by storage.
- * Used by SkImageDecoder_libbmp and SkImageDecoder_libico.
- * @param storage Allocator to hold the memory. Will be reset to be large
- * enough to hold the entire stream. Upon successful return,
- * storage->get() will point to data holding the SkStream's entire
- * contents.
- * @param stream SkStream to be copied into storage.
- * @return size_t Total number of bytes in the SkStream, which is also the
- * number of bytes pointed to by storage->get(). Returns 0 on failure.
- */
-size_t SkCopyStreamToStorage(SkAutoMalloc* storage, SkStream* stream);
+class SkStream;
+class SkWStream;
/**
* Copy the provided stream to an SkData variable.
+ *
+ * Note: Assumes the stream is at the beginning. If it has a length,
+ * but is not at the beginning, this call will fail (return NULL).
+ *
* @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 nullptr on failure.
*/
-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). The position of the
- * input stream is left in an indeterminate state.
- */
-SkStreamRewindable* SkStreamRewindableFromSkStream(SkStream* stream);
+SkData* SkCopyStreamToData(SkStream* stream);
/**
* Copies the input stream from the current position to the end.
« no previous file with comments | « src/core/SkStream.cpp ('k') | src/images/SkImageDecoder_astc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698