aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/GameBench.cpp
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-10 19:23:38 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-10 19:23:38 +0000
commitc289743864e2ab926a95e617a5cd1d29b26d1825 (patch)
tree2c559da19185181efd8bd92791fb758af5969800 /bench/GameBench.cpp
parent55ebe8eca0063ab1f3979d629749bc41ec409ac1 (diff)
Major bench refactoring.
- Use FLAGS_. - Remove outer repeat loop. - Tune inner loop automatically. BUG=skia:1590 R=epoger@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/23478013 git-svn-id: http://skia.googlecode.com/svn/trunk@11187 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/GameBench.cpp')
-rw-r--r--bench/GameBench.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/bench/GameBench.cpp b/bench/GameBench.cpp
index 44f92cb8e6..5fc9c03288 100644
--- a/bench/GameBench.cpp
+++ b/bench/GameBench.cpp
@@ -144,8 +144,7 @@ protected:
SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode))->unref();
- for (int i = 0; i < kNumRects; ++i, ++fNumSaved) {
-
+ for (int i = 0; i < this->getLoops(); ++i, ++fNumSaved) {
if (0 == i % kNumBeforeClear) {
if (kPartial_Clear == fClear) {
for (int j = 0; j < fNumSaved; ++j) {
@@ -229,15 +228,7 @@ private:
(kNumAtlasedX+1) * kAtlasSpacer;
static const int kTotAtlasHeight = kNumAtlasedY * kAtlasCellHeight +
(kNumAtlasedY+1) * kAtlasSpacer;
-
-#ifdef SK_DEBUG
- static const int kNumRects = 100;
- static const int kNumBeforeClear = 10;
-#else
- static const int kNumRects = 5000;
- static const int kNumBeforeClear = 300;
-#endif
-
+ static const int kNumBeforeClear = 100;
Type fType;
Clear fClear;