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
diff --git a/bench/SkBenchmark.cpp b/bench/SkBenchmark.cpp
index 7bc87ee..8dd66f0 100644
--- a/bench/SkBenchmark.cpp
+++ b/bench/SkBenchmark.cpp
@@ -3,7 +3,8 @@
template BenchRegistry* BenchRegistry::gHead;
-SkBenchmark::SkBenchmark() {
+SkBenchmark::SkBenchmark(void* defineDict) {
+ fDict = reinterpret_cast<const SkTDict<const char*>*>(defineDict);
fForceAlpha = 0xFF;
fForceAA = true;
}
@@ -26,6 +27,16 @@
paint->setFilterBitmap(fForceFilter);
}
+const char* SkBenchmark::findDefine(const char* key) const {
+ if (fDict) {
+ const char* value;
+ if (fDict->find(key, &value)) {
+ return value;
+ }
+ }
+ return NULL;
+}
+
///////////////////////////////////////////////////////////////////////////////
SkIPoint SkBenchmark::onGetSize() {