OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2016 Google Inc. | 3 * Copyright 2016 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 | 8 |
9 #include "Benchmark.h" | 9 #include "Benchmark.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 10000, SkISize::Make(32, 32), false);) | 256 10000, SkISize::Make(32, 32), false);) |
257 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo
ne_ShapesType, | 257 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo
ne_ShapesType, |
258 10000, SkISize::Make(32, 33), false);) | 258 10000, SkISize::Make(32, 33), false);) |
259 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kN
one_ShapesType, | 259 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kN
one_ShapesType, |
260 10000, SkISize::Make(32, 32), false);) | 260 10000, SkISize::Make(32, 32), false);) |
261 DEF_BENCH(return new ShapesBench(ShapesBench::kMixed_ShapesType, ShapesBench::kN
one_ShapesType, | 261 DEF_BENCH(return new ShapesBench(ShapesBench::kMixed_ShapesType, ShapesBench::kN
one_ShapesType, |
262 10000, SkISize::Make(32, 33), false);) | 262 10000, SkISize::Make(32, 33), false);) |
263 | 263 |
264 // Large primitives (GPU bound, in theory): | 264 // Large primitives (GPU bound, in theory): |
265 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kNo
ne_ShapesType, | 265 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kNo
ne_ShapesType, |
266 1000, SkISize::Make(500, 500), false);) | 266 100, SkISize::Make(500, 500), false);) |
267 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo
ne_ShapesType, | 267 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo
ne_ShapesType, |
268 1000, SkISize::Make(500, 500), false);) | 268 100, SkISize::Make(500, 500), false);) |
269 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo
ne_ShapesType, | 269 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo
ne_ShapesType, |
270 1000, SkISize::Make(500, 501), false);) | 270 100, SkISize::Make(500, 501), false);) |
271 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kN
one_ShapesType, | 271 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kN
one_ShapesType, |
272 1000, SkISize::Make(500, 500), false);) | 272 100, SkISize::Make(500, 500), false);) |
273 DEF_BENCH(return new ShapesBench(ShapesBench::kMixed_ShapesType, ShapesBench::kN
one_ShapesType, | 273 DEF_BENCH(return new ShapesBench(ShapesBench::kMixed_ShapesType, ShapesBench::kN
one_ShapesType, |
274 1000, SkISize::Make(500, 501), false);) | 274 100, SkISize::Make(500, 501), false);) |
275 | 275 |
276 // Donuts (small and large). These fall-back to path rendering due to non-orthog
onal rotation | 276 // Donuts (small and large). These fall-back to path rendering due to non-orthog
onal rotation |
277 // making them quite slow. Thus, reduce the counts substantially: | 277 // making them quite slow. Thus, reduce the counts substantially: |
278 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe
ct_ShapesType, | 278 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe
ct_ShapesType, |
279 500, SkISize::Make(32, 32), false);) | 279 500, SkISize::Make(32, 32), false);) |
280 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR
Rect_ShapesType, | 280 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR
Rect_ShapesType, |
281 500, SkISize::Make(32, 32), false);) | 281 500, SkISize::Make(32, 32), false);) |
282 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe
ct_ShapesType, | 282 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe
ct_ShapesType, |
283 50, SkISize::Make(500, 500), false);) | 283 50, SkISize::Make(500, 500), false);) |
284 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR
Rect_ShapesType, | 284 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR
Rect_ShapesType, |
285 50, SkISize::Make(500, 500), false);) | 285 50, SkISize::Make(500, 500), false);) |
286 | 286 |
287 #if ENABLE_COMMAND_LINE_SHAPES_BENCH | 287 #if ENABLE_COMMAND_LINE_SHAPES_BENCH |
288 DEF_BENCH(return new ShapesBench;) | 288 DEF_BENCH(return new ShapesBench;) |
289 #endif | 289 #endif |
OLD | NEW |