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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
11 #include "SkPath.h" | |
12 #include "SkString.h" | 11 #include "SkString.h" |
13 | 12 |
14 struct BezierRec { | 13 struct BezierRec { |
15 SkCanvas* fCanvas; | 14 SkCanvas* fCanvas; |
16 SkPaint fPaint; | 15 SkPaint fPaint; |
17 SkPath fQuad; | 16 SkPath fQuad; |
18 SkPath fCubic; | 17 SkPath fCubic; |
19 }; | 18 }; |
20 | 19 |
21 typedef const char* (*DrawProc)(const BezierRec*, int); | 20 typedef const char* (*DrawProc)(const BezierRec*, int); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 typedef Benchmark INHERITED; | 92 typedef Benchmark INHERITED; |
94 }; | 93 }; |
95 | 94 |
96 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d
raw_quad); ) | 95 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d
raw_quad); ) |
97 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10
, draw_quad); ) | 96 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10
, draw_quad); ) |
98 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50,
draw_quad); ) | 97 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50,
draw_quad); ) |
99 | 98 |
100 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d
raw_cubic); ) | 99 DEF_BENCH( return new BezierBench(SkPaint::kButt_Cap, SkPaint::kRound_Join, 2, d
raw_cubic); ) |
101 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10
, draw_cubic); ) | 100 DEF_BENCH( return new BezierBench(SkPaint::kSquare_Cap, SkPaint::kBevel_Join, 10
, draw_cubic); ) |
102 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50,
draw_cubic); ) | 101 DEF_BENCH( return new BezierBench(SkPaint::kRound_Cap, SkPaint::kMiter_Join, 50,
draw_cubic); ) |
OLD | NEW |