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

Unified Diff: src/pdf/SkPDFUtils.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 | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFUtils.cpp
diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp
index e488f7da06956ede2d49139a788f3925ccd57b16..0a5be3b076c0e13e080dccf57bd5cd570f72198f 100644
--- a/src/pdf/SkPDFUtils.cpp
+++ b/src/pdf/SkPDFUtils.cpp
@@ -175,9 +175,7 @@ void SkPDFUtils::EmitPath(const SkPath& path, SkPaint::Style paintStyle,
case SkPath::kClose_Verb:
if (fillState != kSingleLine_SkipFillState) {
ClosePath(&currentSegment);
- SkData* data = currentSegment.copyToData();
- content->write(data->data(), data->size());
- data->unref();
+ currentSegment.writeToStream(content);
}
currentSegment.reset();
break;
@@ -187,9 +185,7 @@ void SkPDFUtils::EmitPath(const SkPath& path, SkPaint::Style paintStyle,
}
}
if (currentSegment.bytesWritten() > 0) {
- SkData* data = currentSegment.copyToData();
- content->write(data->data(), data->size());
- data->unref();
+ currentSegment.writeToStream(content);
}
}
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698