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 "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 static SkPaint paint_maker() { | 97 static SkPaint paint_maker() { |
98 SkPaint paint; | 98 SkPaint paint; |
99 paint.setStyle(SkPaint::kStroke_Style); | 99 paint.setStyle(SkPaint::kStroke_Style); |
100 paint.setStrokeWidth(X / 10); | 100 paint.setStrokeWidth(X / 10); |
101 paint.setStrokeJoin(SkPaint::kMiter_Join); | 101 paint.setStrokeJoin(SkPaint::kMiter_Join); |
102 paint.setStrokeCap(SkPaint::kSquare_Cap); | 102 paint.setStrokeCap(SkPaint::kSquare_Cap); |
103 return paint; | 103 return paint; |
104 } | 104 } |
105 | 105 |
106 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (line_path_maker(), paint_maker(), "li
ne_1", 1)); ) | 106 DEF_BENCH(return new StrokeBench(line_path_maker(), paint_maker(), "line_1", 1);
) |
107 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (quad_path_maker(), paint_maker(), "qu
ad_1", 1)); ) | 107 DEF_BENCH(return new StrokeBench(quad_path_maker(), paint_maker(), "quad_1", 1);
) |
108 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (conic_path_maker(), paint_maker(), "c
onic_1", 1)); ) | 108 DEF_BENCH(return new StrokeBench(conic_path_maker(), paint_maker(), "conic_1", 1
);) |
109 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (cubic_path_maker(), paint_maker(), "c
ubic_1", 1)); ) | 109 DEF_BENCH(return new StrokeBench(cubic_path_maker(), paint_maker(), "cubic_1", 1
);) |
110 | 110 |
111 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (line_path_maker(), paint_maker(), "li
ne_4", 4)); ) | 111 DEF_BENCH(return new StrokeBench(line_path_maker(), paint_maker(), "line_4", 4);
) |
112 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (quad_path_maker(), paint_maker(), "qu
ad_4", 4)); ) | 112 DEF_BENCH(return new StrokeBench(quad_path_maker(), paint_maker(), "quad_4", 4);
) |
113 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (conic_path_maker(), paint_maker(), "c
onic_4", 4)); ) | 113 DEF_BENCH(return new StrokeBench(conic_path_maker(), paint_maker(), "conic_4", 4
);) |
114 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (cubic_path_maker(), paint_maker(), "c
ubic_4", 4)); ) | 114 DEF_BENCH(return new StrokeBench(cubic_path_maker(), paint_maker(), "cubic_4", 4
);) |
115 | 115 |
116 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (line_path_maker(), paint_maker(), "li
ne_.25", .25f)); ) | 116 DEF_BENCH(return new StrokeBench(line_path_maker(), paint_maker(), "line_.25", .
25f);) |
117 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (quad_path_maker(), paint_maker(), "qu
ad_.25", .25f)); ) | 117 DEF_BENCH(return new StrokeBench(quad_path_maker(), paint_maker(), "quad_.25", .
25f);) |
118 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (conic_path_maker(), paint_maker(), "c
onic_.25", .25f)); ) | 118 DEF_BENCH(return new StrokeBench(conic_path_maker(), paint_maker(), "conic_.25",
.25f);) |
119 DEF_BENCH( return SkNEW_ARGS(StrokeBench, (cubic_path_maker(), paint_maker(), "c
ubic_.25", .25f)); ) | 119 DEF_BENCH(return new StrokeBench(cubic_path_maker(), paint_maker(), "cubic_.25",
.25f);) |
OLD | NEW |