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

Unified Diff: bench/ScalarBench.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/RepeatTileBench.cpp ('k') | bench/ShaderMaskBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ScalarBench.cpp
diff --git a/bench/ScalarBench.cpp b/bench/ScalarBench.cpp
index 333dd229e1866f92f88919fc9aa54f302384e7e8..b1014f4836951925c8d8dadc80cd821741153724 100644
--- a/bench/ScalarBench.cpp
+++ b/bench/ScalarBench.cpp
@@ -13,7 +13,6 @@
class ScalarBench : public SkBenchmark {
SkString fName;
- enum { N = 100000 };
public:
ScalarBench(void* param, const char name[]) : INHERITED(param) {
fName.printf("scalar_%s", name);
@@ -30,8 +29,7 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) {
- int n = SkBENCHLOOP(N * this->mulLoopCount());
- for (int i = 0; i < n; i++) {
+ for (int i = 0; i < this->getLoops(); i++) {
this->performTest();
}
}
@@ -135,7 +133,6 @@ private:
class RectBoundsBench : public SkBenchmark {
enum {
PTS = 100,
- N = SkBENCHLOOP(10000)
};
SkPoint fPts[PTS];
@@ -156,7 +153,7 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkRect r;
- for (int i = 0; i < N; ++i) {
+ for (int i = 0; i < this->getLoops(); ++i) {
r.set(fPts, PTS);
}
}
« no previous file with comments | « bench/RepeatTileBench.cpp ('k') | bench/ShaderMaskBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698