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

Unified Diff: tests/PathTest.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 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 | « tests/PDFPrimitivesTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 032b646d4e194314f61be4caf0e58c7b9b791401..483d14ec48c7d5e4d8b75497312bddef90c9e879 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -4083,7 +4083,7 @@ static void compare_dump(skiatest::Reporter* reporter, const SkPath& path, bool
bool dumpAsHex, const char* str) {
SkDynamicMemoryWStream wStream;
path.dump(&wStream, force, dumpAsHex);
- sk_sp<SkData> data(wStream.copyToData());
+ sk_sp<SkData> data = wStream.detachAsData();
REPORTER_ASSERT(reporter, data->size() == strlen(str));
if (strlen(str) > 0) {
REPORTER_ASSERT(reporter, !memcmp(data->data(), str, strlen(str)));
« no previous file with comments | « tests/PDFPrimitivesTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698