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

Unified Diff: include/core/SkStream.h

Issue 568683002: use SkData::NewUninitialized (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add SkStream::readIntoData Created 6 years, 3 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 | « no previous file | src/core/SkPictureData.cpp » ('j') | tools/lua/lua_pictures.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkStream.h
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index 516b036a55e67162227374bf94350eb028ad7327..51ced24e56cf8a6c083ff88f7435e2d132e24909 100644
--- a/include/core/SkStream.h
+++ b/include/core/SkStream.h
@@ -56,6 +56,13 @@ public:
*/
virtual size_t read(void* buffer, size_t size) = 0;
+ /**
+ * Attempt to read size bytes into a SkData. If the read success, return the data,
+ * else return NULL. Either way the stream's cursor may have been changed as a result
+ * of calling read().
+ */
+ SkData* readIntoData(size_t size);
bungeman-skia 2014/09/12 14:50:27 Eck, not another thing on SkStream... It seems li
reed1 2014/09/12 18:55:17 Done.
+
/** Skip size number of bytes.
* @return the actual number bytes that could be skipped.
*/
« no previous file with comments | « no previous file | src/core/SkPictureData.cpp » ('j') | tools/lua/lua_pictures.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698