Base SkAutoTUnref on skstd::unique_ptr.
To further consolidate the various unique owning classes, this bases
SkAutoTUnref on skstd::unique_ptr. Users are updated because of two
breaking changes, swap now takes a reference and reset no longer
returns its argument.
Review URL: https://codereview.chromium.org/1370803002
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 21bb933..19ee7b5 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -76,7 +76,7 @@
return;
}
- fPicture.reset(pict)->ref();
+ fPicture.reset(SkRef(pict));
fCanvas.reset(this->setupCanvas());
}
@@ -503,7 +503,7 @@
// Do not call INHERITED::init(), which would create a (potentially large) canvas which is not
// used by bench_pictures.
- fPicture.reset(pict)->ref();
+ fPicture.reset(SkRef(pict));
this->CopyString(&fWritePath, writePath);
this->CopyString(&fMismatchPath, mismatchPath);
this->CopyString(&fInputFilename, inputFilename);