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

Unified Diff: bench/nanobench.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 years, 3 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/ColorCodecBench.cpp ('k') | dm/DM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index a2f931e98b1ad6c395edb5db770aab8153aea953..ae415fa06b694ee8c278f400b4ad94526d449d23 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -529,7 +529,7 @@ static Target* is_enabled(Benchmark* bench, const Config& config) {
return target;
}
-static bool valid_brd_bench(SkData* encoded, SkColorType colorType, uint32_t sampleSize,
+static bool valid_brd_bench(sk_sp<SkData> encoded, SkColorType colorType, uint32_t sampleSize,
uint32_t minOutputSize, int* width, int* height) {
SkAutoTDelete<SkBitmapRegionDecoder> brd(
SkBitmapRegionDecoder::Create(encoded, SkBitmapRegionDecoder::kAndroidCodec_Strategy));
@@ -756,7 +756,7 @@ public:
continue;
}
sk_sp<SkData> encoded(SkData::MakeFromFileName(path.c_str()));
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded.get()));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
if (!codec) {
// Nothing to time.
SkDebugf("Cannot find codec for %s\n", path.c_str());
@@ -840,7 +840,7 @@ public:
continue;
}
sk_sp<SkData> encoded(SkData::MakeFromFileName(path.c_str()));
- SkAutoTDelete<SkAndroidCodec> codec(SkAndroidCodec::NewFromData(encoded.get()));
+ SkAutoTDelete<SkAndroidCodec> codec(SkAndroidCodec::NewFromData(encoded));
if (!codec) {
// Nothing to time.
SkDebugf("Cannot find codec for %s\n", path.c_str());
@@ -896,7 +896,7 @@ public:
int width = 0;
int height = 0;
- if (!valid_brd_bench(encoded.get(), colorType, sampleSize, minOutputSize,
+ if (!valid_brd_bench(encoded, colorType, sampleSize, minOutputSize,
&width, &height)) {
break;
}
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698