aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/TableBench.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/TableBench.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/TableBench.cpp')
-rw-r--r--bench/TableBench.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/bench/TableBench.cpp b/bench/TableBench.cpp
index e6efe25c48..8dcefbed5f 100644
--- a/bench/TableBench.cpp
+++ b/bench/TableBench.cpp
@@ -25,8 +25,6 @@ static const SkScalar kCellHeight = SkIntToScalar(10);
// This trio of drawRects is then repeat for the next cell.
class TableBench : public SkBenchmark {
public:
-
- static const int kNumIterations = SkBENCHLOOP(10);
static const int kNumRows = 48;
static const int kNumCols = 32;
@@ -40,14 +38,13 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) {
-
SkPaint cellPaint;
cellPaint.setColor(0xFFFFFFF);
SkPaint borderPaint;
borderPaint.setColor(0xFFCCCCCC);
- for (int i = 0; i < kNumIterations; ++i) {
+ for (int i = 0; i < this->getLoops(); ++i) {
for (int row = 0; row < kNumRows; ++row) {
for (int col = 0; col < kNumCols; ++col) {
SkRect cell = SkRect::MakeLTRB(col * kCellWidth,