aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/WritePixelsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/WritePixelsTest.cpp')
-rw-r--r--tests/WritePixelsTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 2937e0ef00..1c5ce81cbf 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -263,8 +263,8 @@ static bool alloc_row_bytes(SkBitmap* bm, const SkImageInfo& info, size_t rowByt
if (!bm->setInfo(info, rowBytes)) {
return false;
}
- SkPixelRef* pr = SkMallocPixelRef::NewAllocate(info, rowBytes, nullptr);
- bm->setPixelRef(pr)->unref();
+ sk_sp<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, rowBytes, nullptr));
+ bm->setPixelRef(std::move(pr), 0, 0);
return true;
}