SkBitmap::setPixelRef(): less reference churn
BUG=skia:
Change-Id: I9657e4af5fcc808f9175ff336155374ccc77999d
Reviewed-on: https://skia-review.googlesource.com/5461
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 221f0c9..62da1c2 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -38,7 +38,7 @@
SkBitmap bm;
const SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100);
bm.setInfo(info);
- bm.setPixelRef(new FailurePixelRef(info), 0, 0)->unref();
+ bm.setPixelRef(sk_make_sp<FailurePixelRef>(info), 0, 0);
// now our bitmap has a pixelref, but we know it will fail to lock
auto surface(SkSurface::MakeRasterN32Premul(200, 200));