OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkMatrix.h" | 10 #include "SkMatrix.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 public: | 267 public: |
268 | 268 |
269 IsFiniteBench(int index) { | 269 IsFiniteBench(int index) { |
270 SkRandom rand; | 270 SkRandom rand; |
271 | 271 |
272 for (int i = 0; i < N; ++i) { | 272 for (int i = 0; i < N; ++i) { |
273 fData[i] = rand.nextSScalar1(); | 273 fData[i] = rand.nextSScalar1(); |
274 } | 274 } |
275 | 275 |
276 if (index < 0) { | 276 if (index < 0) { |
277 fProc = NULL; | 277 fProc = nullptr; |
278 fName = "isfinite_rect"; | 278 fName = "isfinite_rect"; |
279 } else { | 279 } else { |
280 fProc = gRec[index].fProc; | 280 fProc = gRec[index].fProc; |
281 fName = gRec[index].fName; | 281 fName = gRec[index].fName; |
282 } | 282 } |
283 } | 283 } |
284 | 284 |
285 bool isSuitableFor(Backend backend) override { | 285 bool isSuitableFor(Backend backend) override { |
286 return backend == kNonRendering_Backend; | 286 return backend == kNonRendering_Backend; |
287 } | 287 } |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 599 |
600 DEF_BENCH( return new FloorBench(false); ) | 600 DEF_BENCH( return new FloorBench(false); ) |
601 DEF_BENCH( return new FloorBench(true); ) | 601 DEF_BENCH( return new FloorBench(true); ) |
602 | 602 |
603 DEF_BENCH( return new CLZBench(false); ) | 603 DEF_BENCH( return new CLZBench(false); ) |
604 DEF_BENCH( return new CLZBench(true); ) | 604 DEF_BENCH( return new CLZBench(true); ) |
605 | 605 |
606 DEF_BENCH( return new NormalizeBench(); ) | 606 DEF_BENCH( return new NormalizeBench(); ) |
607 | 607 |
608 DEF_BENCH( return new FixedMathBench(); ) | 608 DEF_BENCH( return new FixedMathBench(); ) |
OLD | NEW |