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

Unified Diff: src/core/SkStream.cpp

Issue 943423002: SkStream: Add SkDynamicMemoryWStream::writeToStream(SkWStream*) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-02-23 (Monday) 15:03:08 EST Created 5 years, 10 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 | « include/core/SkStream.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStream.cpp
diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp
index 38432c4b693067ab7f167f8bfee69bd2357dc51e..65e1bee1a08f1f97dfccabcc1e8b0ce129b2b01c 100644
--- a/src/core/SkStream.cpp
+++ b/src/core/SkStream.cpp
@@ -621,6 +621,12 @@ void SkDynamicMemoryWStream::copyTo(void* dst) const
}
}
+void SkDynamicMemoryWStream::writeToStream(SkWStream* dst) const {
+ for (Block* block = fHead; block != NULL; block = block->fNext) {
+ dst->write(block->start(), block->written());
+ }
+}
+
void SkDynamicMemoryWStream::padToAlign4()
{
// cast to remove unary-minus warning
« no previous file with comments | « include/core/SkStream.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698