| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "Benchmark.h" | 8 #include "Benchmark.h" |
| 9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| 11 #include "SkDashPathEffect.h" | 11 #include "SkDashPathEffect.h" |
| 12 #include "SkPaint.h" | 12 #include "SkPaint.h" |
| 13 #include "SkPath.h" | 13 #include "SkPath.h" |
| 14 #include "SkRandom.h" | 14 #include "SkRandom.h" |
| 15 #include "SkString.h" | 15 #include "SkString.h" |
| 16 #include "SkStrokeRec.h" |
| 16 #include "SkTDArray.h" | 17 #include "SkTDArray.h" |
| 17 | 18 |
| 18 | 19 |
| 19 /* | 20 /* |
| 20 * Cases to consider: | 21 * Cases to consider: |
| 21 * | 22 * |
| 22 * 1. antialiasing on/off (esp. width <= 1) | 23 * 1. antialiasing on/off (esp. width <= 1) |
| 23 * 2. strokewidth == 0, 1, 2 | 24 * 2. strokewidth == 0, 1, 2 |
| 24 * 3. hline, vline, diagonal, rect, oval | 25 * 3. hline, vline, diagonal, rect, oval |
| 25 * 4. dots [1,1] ([N,N] where N=strokeWidth?) or arbitrary (e.g. [2,1] or [1,2,
3,2]) | 26 * 4. dots [1,1] ([N,N] where N=strokeWidth?) or arbitrary (e.g. [2,1] or [1,2,
3,2]) |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 // hori_2 is just too slow to enable at the moment | 480 // hori_2 is just too slow to enable at the moment |
| 480 DEF_BENCH( return new GiantDashBench(GiantDashBench::kHori_LineType, 2); ) | 481 DEF_BENCH( return new GiantDashBench(GiantDashBench::kHori_LineType, 2); ) |
| 481 DEF_BENCH( return new GiantDashBench(GiantDashBench::kVert_LineType, 2); ) | 482 DEF_BENCH( return new GiantDashBench(GiantDashBench::kVert_LineType, 2); ) |
| 482 DEF_BENCH( return new GiantDashBench(GiantDashBench::kDiag_LineType, 2); ) | 483 DEF_BENCH( return new GiantDashBench(GiantDashBench::kDiag_LineType, 2); ) |
| 483 | 484 |
| 484 DEF_BENCH( return new DashGridBench(1, 1, true); ) | 485 DEF_BENCH( return new DashGridBench(1, 1, true); ) |
| 485 DEF_BENCH( return new DashGridBench(1, 1, false); ) | 486 DEF_BENCH( return new DashGridBench(1, 1, false); ) |
| 486 DEF_BENCH( return new DashGridBench(3, 1, true); ) | 487 DEF_BENCH( return new DashGridBench(3, 1, true); ) |
| 487 DEF_BENCH( return new DashGridBench(3, 1, false); ) | 488 DEF_BENCH( return new DashGridBench(3, 1, false); ) |
| 488 #endif | 489 #endif |
| OLD | NEW |