Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2970)

Unified Diff: bench/CodecBench.cpp

Issue 2212493002: Convert SkAutoTUnref<SkData> to sk_sp<SkData>. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/CodecBench.h ('k') | bench/EncoderBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/CodecBench.cpp
diff --git a/bench/CodecBench.cpp b/bench/CodecBench.cpp
index 9bd404db55e05658aaf41579abeee036489f5cf3..e3bf1ccb22bade5d6e134adeaa3f824994a0a028 100644
--- a/bench/CodecBench.cpp
+++ b/bench/CodecBench.cpp
@@ -26,7 +26,7 @@ CodecBench::CodecBench(SkString baseName, SkData* encoded, SkColorType colorType
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 @@ bool CodecBench::isSuitableFor(Backend backend) {
}
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 @@ void CodecBench::onDraw(int n, SkCanvas* canvas) {
}
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
« no previous file with comments | « bench/CodecBench.h ('k') | bench/EncoderBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698