aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PathTest.cpp')
-rw-r--r--tests/PathTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 032b646d4e..483d14ec48 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)));