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

Unified Diff: tests/PathTest.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: 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
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 032b646d4e194314f61be4caf0e58c7b9b791401..762722563ca565d95af1c5e929b0b2fe0ed61975 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.makeCopy();
REPORTER_ASSERT(reporter, data->size() == strlen(str));
if (strlen(str) > 0) {
REPORTER_ASSERT(reporter, !memcmp(data->data(), str, strlen(str)));

Powered by Google App Engine
This is Rietveld 408576698