aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/PathBench.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-10-01 09:43:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-01 09:43:39 -0700
commita1ebeb25e9acfcd801e089e063311d716b83b8a5 (patch)
tree1ac61bbbb5700af13c511b3525822d9d602968ea /bench/PathBench.cpp
parentaa48d36397f8464dafd38c3f42fbdfb1419e8778 (diff)
Remove const from `const int loops`.
This drives me nuts, and prevents `while (loops --> 0)`. BUG=skia: Review URL: https://codereview.chromium.org/1379923005
Diffstat (limited to 'bench/PathBench.cpp')
-rw-r--r--bench/PathBench.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp
index e09fc3ecab..d0ede02ab7 100644
--- a/bench/PathBench.cpp
+++ b/bench/PathBench.cpp
@@ -51,7 +51,7 @@ protected:
return fName.c_str();
}
- void onDraw(const int loops, SkCanvas* canvas) override {
+ void onDraw(int loops, SkCanvas* canvas) override {
SkPaint paint(fPaint);
this->setupPaint(&paint);
@@ -329,7 +329,7 @@ protected:
this->createData(10, 100);
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
if (i % 1000 == 0) {
fPath.reset(); // PathRef memory can grow without bound otherwise.
@@ -363,7 +363,7 @@ protected:
}
this->finishedMakingPaths();
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
int idx = i & (kPathCnt - 1);
fCopies[idx] = fPaths[idx];
@@ -403,7 +403,7 @@ protected:
}
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
if (fInPlace) {
for (int i = 0; i < loops; ++i) {
fPaths[i & (kPathCnt - 1)].transform(fMatrix);
@@ -450,7 +450,7 @@ protected:
this->finishedMakingPaths();
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
int idx = i & (kPathCnt - 1);
fParity ^= (fPaths[idx] == fCopies[idx & ~0x1]);
@@ -514,7 +514,7 @@ protected:
this->finishedMakingPaths();
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
switch (fType) {
case kAdd_AddType:
for (int i = 0; i < loops; ++i) {
@@ -582,7 +582,7 @@ protected:
return fName.c_str();
}
- void onDraw(const int loops, SkCanvas* canvas) override {
+ void onDraw(int loops, SkCanvas* canvas) override {
SkPaint paint;
paint.setColor(SK_ColorBLACK);
@@ -688,7 +688,7 @@ protected:
SkASSERT(path->isConvex());
}
- void onDraw(const int loops, SkCanvas* canvas) override {
+ void onDraw(int loops, SkCanvas* canvas) override {
SkRandom rand;
SkRect r;
@@ -762,7 +762,7 @@ private:
return fName.c_str();
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
const SkRect& rect = fQueryRects[i % kQueryRectCnt];
fParity = fParity != fPath.conservativelyContainsRect(rect);
@@ -825,7 +825,7 @@ public:
private:
const char* onGetName() override { return fName.c_str(); }
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
fRQ.chop(fDst);
}
@@ -841,7 +841,7 @@ public:
ConicBench_EvalPos(bool useV2) : fUseV2(useV2) {
fName.printf("conic-eval-pos%d", useV2);
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
if (fUseV2) {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < 1000; ++j) {
@@ -866,7 +866,7 @@ public:
ConicBench_EvalTan(bool useV2) : fUseV2(useV2) {
fName.printf("conic-eval-tan%d", useV2);
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
if (fUseV2) {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < 1000; ++j) {
@@ -930,7 +930,7 @@ protected:
return "conic-compute-error";
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
SkVector err;
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < CONICS; ++j) {
@@ -952,7 +952,7 @@ protected:
return "conic-asQuadTol";
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < CONICS; ++j) {
fConics[j].asQuadTol(SK_ScalarHalf);
@@ -973,7 +973,7 @@ protected:
return "conic-quadPow2";
}
- void onDraw(const int loops, SkCanvas*) override {
+ void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < CONICS; ++j) {
fConics[j].computeQuadPOW2(SK_ScalarHalf);