Remove SkAutoTDelete.
Replace with std::unique_ptr.
Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index 4c34b87..3ee5cdb 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -847,9 +847,9 @@
sk_sp<SkData> encoded(SkData::MakeWithoutCopy(data, size));
sk_sp<SkImage> image(SkImage::MakeFromEncoded(std::move(encoded), nullptr));
- SkAutoTDelete<SkBitmap> bitmap(new SkBitmap());
+ std::unique_ptr<SkBitmap> bitmap(new SkBitmap());
if (nullptr != image) {
- if (!image->asLegacyBitmap(bitmap, SkImage::kRW_LegacyBitmapMode)) {
+ if (!image->asLegacyBitmap(bitmap.get(), SkImage::kRW_LegacyBitmapMode)) {
SkDebugf("image decode failed\n");
return nullptr;
}
@@ -2791,18 +2791,18 @@
, fYPos(y)
, fPaint(paint) {
- SkAutoTDelete<SkString> runsStr(new SkString);
+ std::unique_ptr<SkString> runsStr(new SkString);
fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: "));
fInfo.push(SkObjectParser::ScalarToString(y, "YPOS: "));
fInfo.push(SkObjectParser::RectToString(fBlob->bounds(), "Bounds: "));
- fInfo.push(runsStr);
+ fInfo.push(runsStr.get());
fInfo.push(SkObjectParser::PaintToString(paint));
unsigned runs = 0;
SkPaint runPaint(paint);
SkTextBlobRunIterator iter(fBlob.get());
while (!iter.done()) {
- SkAutoTDelete<SkString> tmpStr(new SkString);
+ std::unique_ptr<SkString> tmpStr(new SkString);
tmpStr->printf("==== Run [%d] ====", runs++);
fInfo.push(tmpStr.release());