aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DrawBitmapRectTest.cpp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-12-12 13:48:12 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-12 20:18:50 +0000
commit1b3387b5cfef150c3237c6a8700b2d6f3730e4ce (patch)
tree3b0e9690f1346e37631aa687650390d49f5f3c46 /tests/DrawBitmapRectTest.cpp
parent8615fe59fcc0246a8b0c11b37b3e75f82c9933dd (diff)
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>
Diffstat (limited to 'tests/DrawBitmapRectTest.cpp')
-rw-r--r--tests/DrawBitmapRectTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 221f0c9b91..62da1c2af8 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -38,7 +38,7 @@ static void test_faulty_pixelref(skiatest::Reporter* reporter) {
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));