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

Unified Diff: bench/DecodingBench.cpp

Issue 1344993003: Add nanobench tests for BitmapRegionDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/CodecBenchPriv.h ('k') | bench/nanobench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/DecodingBench.cpp
diff --git a/bench/DecodingBench.cpp b/bench/DecodingBench.cpp
index 421cabe34a6c421ed28c6cd0a0d7c006daf8cb52..7b6ad2bb0a6023414303a370349b07568e9f5eca 100644
--- a/bench/DecodingBench.cpp
+++ b/bench/DecodingBench.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "CodecBenchPriv.h"
#include "DecodingBench.h"
#include "SkBitmap.h"
#include "SkData.h"
@@ -25,21 +26,7 @@ DecodingBench::DecodingBench(SkString path, SkColorType colorType)
{
// Parse filename and the color type to give the benchmark a useful name
SkString baseName = SkOSPath::Basename(path.c_str());
- const char* colorName;
- switch(colorType) {
- case kN32_SkColorType:
- colorName = "N32";
- break;
- case kRGB_565_SkColorType:
- colorName = "565";
- break;
- case kAlpha_8_SkColorType:
- colorName = "Alpha8";
- break;
- default:
- colorName = "Unknown";
- }
- fName.printf("Decode_%s_%s", baseName.c_str(), colorName);
+ fName.printf("Decode_%s_%s", baseName.c_str(), color_type_to_str(colorType));
#ifdef SK_DEBUG
// Ensure that we can create a decoder.
« no previous file with comments | « bench/CodecBenchPriv.h ('k') | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698