| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "Benchmark.h" | 8 #include "Benchmark.h" |
| 9 #include "SkGeometry.h" | 9 #include "SkGeometry.h" |
| 10 #include "SkRandom.h" | 10 #include "SkRandom.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 //////// | 179 //////// |
| 180 | 180 |
| 181 class EvalQuadTangentAt0 : public QuadBenchBase { | 181 class EvalQuadTangentAt0 : public QuadBenchBase { |
| 182 public: | 182 public: |
| 183 EvalQuadTangentAt0() : QuadBenchBase("evalquadtangentat0") {} | 183 EvalQuadTangentAt0() : QuadBenchBase("evalquadtangentat0") {} |
| 184 protected: | 184 protected: |
| 185 void onDraw(const int loops, SkCanvas* canvas) override { | 185 void onDraw(const int loops, SkCanvas* canvas) override { |
| 186 SkPoint result; | 186 SkPoint result; |
| 187 for (int outer = 0; outer < loops; ++outer) { | 187 for (int outer = 0; outer < loops; ++outer) { |
| 188 SkEvalQuadAt(fPts, 0.5f, NULL, &result); | 188 SkEvalQuadAt(fPts, 0.5f, nullptr, &result); |
| 189 SkEvalQuadAt(fPts, 0.5f, NULL, &result); | 189 SkEvalQuadAt(fPts, 0.5f, nullptr, &result); |
| 190 SkEvalQuadAt(fPts, 0.5f, NULL, &result); | 190 SkEvalQuadAt(fPts, 0.5f, nullptr, &result); |
| 191 SkEvalQuadAt(fPts, 0.5f, NULL, &result); | 191 SkEvalQuadAt(fPts, 0.5f, nullptr, &result); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 }; | 194 }; |
| 195 DEF_BENCH( return new EvalQuadTangentAt0; ) | 195 DEF_BENCH( return new EvalQuadTangentAt0; ) |
| 196 | 196 |
| 197 class EvalQuadTangentAt1 : public QuadBenchBase { | 197 class EvalQuadTangentAt1 : public QuadBenchBase { |
| 198 public: | 198 public: |
| 199 EvalQuadTangentAt1() : QuadBenchBase("evalquadtangentat1") {} | 199 EvalQuadTangentAt1() : QuadBenchBase("evalquadtangentat1") {} |
| 200 protected: | 200 protected: |
| 201 void onDraw(const int loops, SkCanvas* canvas) override { | 201 void onDraw(const int loops, SkCanvas* canvas) override { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 for (int outer = 0; outer < loops; ++outer) { | 237 for (int outer = 0; outer < loops; ++outer) { |
| 238 SkChopCubicAt(fPts, dst, 0.5f); | 238 SkChopCubicAt(fPts, dst, 0.5f); |
| 239 SkChopCubicAt(fPts, dst, 0.5f); | 239 SkChopCubicAt(fPts, dst, 0.5f); |
| 240 SkChopCubicAt(fPts, dst, 0.5f); | 240 SkChopCubicAt(fPts, dst, 0.5f); |
| 241 SkChopCubicAt(fPts, dst, 0.5f); | 241 SkChopCubicAt(fPts, dst, 0.5f); |
| 242 } | 242 } |
| 243 } | 243 } |
| 244 }; | 244 }; |
| 245 DEF_BENCH( return new ChopCubicAt; ) | 245 DEF_BENCH( return new ChopCubicAt; ) |
| 246 | 246 |
| OLD | NEW |