aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/BitmapBench.cpp
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-09-02 21:12:42 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-09-02 21:12:42 +0000
commite9d0060f4d7b5a07a220182d83aae3a140784c4b (patch)
tree7d69dc75c6434c5ef7d07a9b0da108827e5056bf /bench/BitmapBench.cpp
parent34e85803c24224cf098c88f937dad9b2a1a96d51 (diff)
add decode bench
add dictionary for bench tools to see optional cmdline args git-svn-id: http://skia.googlecode.com/svn/trunk@351 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/BitmapBench.cpp')
-rw-r--r--bench/BitmapBench.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/bench/BitmapBench.cpp b/bench/BitmapBench.cpp
index 22c0a01d24..89dfa74bc4 100644
--- a/bench/BitmapBench.cpp
+++ b/bench/BitmapBench.cpp
@@ -96,7 +96,8 @@ class BitmapBench : public SkBenchmark {
SkString fName;
enum { N = 300 };
public:
- BitmapBench(SkBitmap::Config c, int tx = -1, int ty = -1) : fTileX(tx), fTileY(ty) {
+ BitmapBench(void* param, SkBitmap::Config c, int tx = -1, int ty = -1)
+ : INHERITED(param), fTileX(tx), fTileY(ty) {
const int w = 128;
const int h = 128;
SkBitmap bm;
@@ -153,10 +154,10 @@ private:
typedef SkBenchmark INHERITED;
};
-static SkBenchmark* Fact0(void*) { return new BitmapBench(SkBitmap::kARGB_8888_Config); }
-static SkBenchmark* Fact1(void*) { return new BitmapBench(SkBitmap::kRGB_565_Config); }
-static SkBenchmark* Fact2(void*) { return new BitmapBench(SkBitmap::kARGB_4444_Config); }
-static SkBenchmark* Fact3(void*) { return new BitmapBench(SkBitmap::kIndex8_Config); }
+static SkBenchmark* Fact0(void* p) { return new BitmapBench(p, SkBitmap::kARGB_8888_Config); }
+static SkBenchmark* Fact1(void* p) { return new BitmapBench(p, SkBitmap::kRGB_565_Config); }
+static SkBenchmark* Fact2(void* p) { return new BitmapBench(p, SkBitmap::kARGB_4444_Config); }
+static SkBenchmark* Fact3(void* p) { return new BitmapBench(p, SkBitmap::kIndex8_Config); }
static BenchRegistry gReg0(Fact0);
static BenchRegistry gReg1(Fact1);