Index: bench/DecodingBench.cpp |
diff --git a/bench/DecodingBench.cpp b/bench/DecodingBench.cpp |
index 421cabe34a6c421ed28c6cd0a0d7c006daf8cb52..764c556f4e1be01813ea04cc6c142d8fdf28ef39 100644 |
--- a/bench/DecodingBench.cpp |
+++ b/bench/DecodingBench.cpp |
@@ -7,6 +7,7 @@ |
#include "DecodingBench.h" |
#include "SkBitmap.h" |
+#include "SkCodecBenchPriv.h" |
#include "SkData.h" |
#include "SkImageDecoder.h" |
#include "SkMallocPixelRef.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. |