Convert SkAutoTUnref<SkData> to sk_sp<SkData>.
With the move from SkData::NewXXX to SkData::MakeXXX most
SkAutoTUnref<SkData> were changed to sk_sp<SkData>. However,
there are still a few SkAutoTUnref<SkData> around, so clean
them up.
Review-Url: https://codereview.chromium.org/2212493002
diff --git a/bench/CodecBench.cpp b/bench/CodecBench.cpp
index 9bd404d..e3bf1cc 100644
--- a/bench/CodecBench.cpp
+++ b/bench/CodecBench.cpp
@@ -26,7 +26,7 @@
alpha_type_to_str(alphaType));
#ifdef SK_DEBUG
// Ensure that we can create an SkCodec from this data.
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(fData));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(fData.get()));
SkASSERT(codec);
#endif
}
@@ -40,7 +40,7 @@
}
void CodecBench::onDelayedSetup() {
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(fData));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(fData.get()));
fInfo = codec->getInfo().makeColorType(fColorType)
.makeAlphaType(fAlphaType)
@@ -59,7 +59,7 @@
}
for (int i = 0; i < n; i++) {
colorCount = 256;
- codec.reset(SkCodec::NewFromData(fData));
+ codec.reset(SkCodec::NewFromData(fData.get()));
#ifdef SK_DEBUG
const SkCodec::Result result =
#endif