Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: bench/ShapesBench.cpp

Issue 2120163002: Enable blend optimizations with instanced draws (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_ingorecov
Patch Set: fixes for perf regressions Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 "SkCommandLineFlags.h" 10 #include "SkCommandLineFlags.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 SkRRect fRRect; 241 SkRRect fRRect;
242 SkRRect fInnerRect; 242 SkRRect fInnerRect;
243 SkRRect fInnerOval; 243 SkRRect fInnerOval;
244 SkRRect fInnerRRect; 244 SkRRect fInnerRRect;
245 SkTArray<ShapeInfo> fShapes; 245 SkTArray<ShapeInfo> fShapes;
246 246
247 247
248 typedef Benchmark INHERITED; 248 typedef Benchmark INHERITED;
249 }; 249 };
250 250
251 #if ENABLE_COMMAND_LINE_SHAPES_BENCH
252 DEF_BENCH(return new ShapesBench;)
253 #else
251 // Small primitives (CPU bound, in theory): 254 // Small primitives (CPU bound, in theory):
252 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kNo ne_ShapesType, 255 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kNo ne_ShapesType,
253 10000, SkISize::Make(32, 32), false);) 256 10000, SkISize::Make(32, 32), false);)
254 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,
255 10000, SkISize::Make(32, 32), false);) 258 10000, SkISize::Make(32, 32), false);)
256 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo ne_ShapesType, 259 DEF_BENCH(return new ShapesBench(ShapesBench::kOval_ShapesType, ShapesBench::kNo ne_ShapesType,
257 10000, SkISize::Make(32, 33), false);) 260 10000, SkISize::Make(32, 33), false);)
258 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kN one_ShapesType, 261 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kN one_ShapesType,
259 10000, SkISize::Make(32, 32), false);) 262 10000, SkISize::Make(32, 32), false);)
260 DEF_BENCH(return new ShapesBench(ShapesBench::kMixed_ShapesType, ShapesBench::kN one_ShapesType, 263 DEF_BENCH(return new ShapesBench(ShapesBench::kMixed_ShapesType, ShapesBench::kN one_ShapesType,
(...skipping 14 matching lines...) Expand all
275 // Donuts (small and large). These fall-back to path rendering due to non-orthog onal rotation 278 // Donuts (small and large). These fall-back to path rendering due to non-orthog onal rotation
276 // making them quite slow. Thus, reduce the counts substantially: 279 // making them quite slow. Thus, reduce the counts substantially:
277 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe ct_ShapesType, 280 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe ct_ShapesType,
278 500, SkISize::Make(32, 32), false);) 281 500, SkISize::Make(32, 32), false);)
279 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR Rect_ShapesType, 282 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR Rect_ShapesType,
280 500, SkISize::Make(32, 32), false);) 283 500, SkISize::Make(32, 32), false);)
281 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe ct_ShapesType, 284 DEF_BENCH(return new ShapesBench(ShapesBench::kRect_ShapesType, ShapesBench::kRe ct_ShapesType,
282 50, SkISize::Make(500, 500), false);) 285 50, SkISize::Make(500, 500), false);)
283 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR Rect_ShapesType, 286 DEF_BENCH(return new ShapesBench(ShapesBench::kRRect_ShapesType, ShapesBench::kR Rect_ShapesType,
284 50, SkISize::Make(500, 500), false);) 287 50, SkISize::Make(500, 500), false);)
285
286 #if ENABLE_COMMAND_LINE_SHAPES_BENCH
287 DEF_BENCH(return new ShapesBench;)
288 #endif 288 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698