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

Unified Diff: bench/SkBenchmark.cpp

Issue 23478013: Major bench refactoring. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: merge with head agani Created 7 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/SkBenchmark.h ('k') | bench/SortBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkBenchmark.cpp
diff --git a/bench/SkBenchmark.cpp b/bench/SkBenchmark.cpp
index 43f78b0f2ddc50eb15d8ebddd617e1fdfd9b319b..09e109e83da22eec944bee13cce9d69fb3a85ecd 100644
--- a/bench/SkBenchmark.cpp
+++ b/bench/SkBenchmark.cpp
@@ -9,18 +9,19 @@
#include "SkPaint.h"
#include "SkParse.h"
+const char* SkTriState::Name[] = { "default", "true", "false" };
+
SK_DEFINE_INST_COUNT(SkBenchmark)
template BenchRegistry* BenchRegistry::gHead;
-SkBenchmark::SkBenchmark(void* defineDict) {
- fDict = reinterpret_cast<const SkTDict<const char*>*>(defineDict);
+SkBenchmark::SkBenchmark(void* /*ignored*/) {
fForceAlpha = 0xFF;
fForceAA = true;
fDither = SkTriState::kDefault;
- fHasStrokeWidth = false;
fIsRendering = true;
fOrMask = fClearMask = 0;
+ fLoops = 1;
}
const char* SkBenchmark::getName() {
@@ -55,33 +56,6 @@ void SkBenchmark::setupPaint(SkPaint* paint) {
}
}
-const char* SkBenchmark::findDefine(const char* key) const {
- if (fDict) {
- const char* value;
- if (fDict->find(key, &value)) {
- return value;
- }
- }
- return NULL;
-}
-
-bool SkBenchmark::findDefine32(const char* key, int32_t* value) const {
- const char* valueStr = this->findDefine(key);
- if (valueStr) {
- SkParse::FindS32(valueStr, value);
- return true;
- }
- return false;
-}
-
-bool SkBenchmark::findDefineScalar(const char* key, SkScalar* value) const {
- const char* valueStr = this->findDefine(key);
- if (valueStr) {
- SkParse::FindScalar(valueStr, value);
- return true;
- }
- return false;
-}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « bench/SkBenchmark.h ('k') | bench/SortBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698