aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/PathBench.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp
index 6991db558d..757ffcc198 100644
--- a/bench/PathBench.cpp
+++ b/bench/PathBench.cpp
@@ -68,7 +68,7 @@ protected:
}
count >>= (3 * complexity());
- for (int i = 0; i < count; i++) {
+ for (int i = 0; i < SkTMax(1, count); i++) {
canvas->drawPath(path, paint);
}
}
@@ -1082,7 +1082,7 @@ class TightBoundsBench : public Benchmark {
public:
TightBoundsBench(SkRect (*proc)(const SkPath&), const char suffix[]) : fProc(proc) {
fName.printf("tight_bounds_%s", suffix);
-
+
const int N = 100;
SkRandom rand;
for (int i = 0; i < N; ++i) {
@@ -1102,13 +1102,13 @@ protected:
}
const char* onGetName() override { return fName.c_str(); }
-
+
void onDraw(int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops*100; ++i) {
fProc(fPath);
}
}
-
+
private:
typedef Benchmark INHERITED;
};