Index: bench/CodecBench.cpp |
diff --git a/bench/CodecBench.cpp b/bench/CodecBench.cpp |
index 1e6b5207bfcb1318fd38667aab6763dc4bdc225a..a21aae1f0b909b73d6ab148290fc99895ad6e44d 100644 |
--- a/bench/CodecBench.cpp |
+++ b/bench/CodecBench.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "CodecBench.h" |
+#include "CodecBenchPriv.h" |
#include "SkBitmap.h" |
#include "SkCodec.h" |
#include "SkOSFile.h" |
@@ -15,21 +16,7 @@ CodecBench::CodecBench(SkString baseName, SkData* encoded, SkColorType colorType |
, fData(SkRef(encoded)) |
{ |
// Parse filename and the color type to give the benchmark a useful name |
- 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("Codec_%s_%s", baseName.c_str(), colorName); |
+ fName.printf("Codec_%s_%s", baseName.c_str(), color_type_to_str(colorType)); |
#ifdef SK_DEBUG |
// Ensure that we can create an SkCodec from this data. |
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(fData)); |