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

Unified Diff: bench/nanobench.cpp

Issue 1402863002: Implementation of SkBitmapRegionDecoder using SkAndroidCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@split1
Patch Set: Add AndroidCodec strategy to benchmark Created 5 years, 2 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/BitmapRegionDecoderBench.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 16523545fa3da14eaca5dd34bb1dfed916633523..054fbb27b1a795b3f22d2c03afc8a9d6e9d14cf1 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -596,9 +596,8 @@ static bool valid_subset_bench(const SkString& path, SkColorType colorType, bool
static bool valid_brd_bench(SkData* encoded, SkBitmapRegionDecoderInterface::Strategy strategy,
SkColorType colorType, uint32_t sampleSize, uint32_t minOutputSize, int* width,
int* height) {
- SkStreamRewindable* stream = new SkMemoryStream(encoded);
SkAutoTDelete<SkBitmapRegionDecoderInterface> brd(
- SkBitmapRegionDecoderInterface::CreateBitmapRegionDecoder(stream, strategy));
+ SkBitmapRegionDecoderInterface::CreateBitmapRegionDecoder(encoded, strategy));
if (nullptr == brd.get()) {
// This is indicates that subset decoding is not supported for a particular image format.
return false;
@@ -962,8 +961,9 @@ public:
SkBitmapRegionDecoderInterface::Strategy fStrategy;
const char* fName;
} strategies[] = {
- { SkBitmapRegionDecoderInterface::kOriginal_Strategy, "BRD" },
- { SkBitmapRegionDecoderInterface::kCanvas_Strategy, "BRD_canvas" },
+ { SkBitmapRegionDecoderInterface::kOriginal_Strategy, "BRD" },
+ { SkBitmapRegionDecoderInterface::kCanvas_Strategy, "BRD_canvas" },
+ { SkBitmapRegionDecoderInterface::kAndroidCodec_Strategy, "BRD_android_codec" },
};
// We intend to create benchmarks that model the use cases in
« no previous file with comments | « bench/BitmapRegionDecoderBench.cpp ('k') | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698