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

Side by Side Diff: bench/Benchmark.h

Issue 1203193002: Add loopSKP flag to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 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 | bench/SKPAnimationBench.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef Benchmark_DEFINED 8 #ifndef Benchmark_DEFINED
9 #define Benchmark_DEFINED 9 #define Benchmark_DEFINED
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 kPDF_Backend, 58 kPDF_Backend,
59 kHWUI_Backend, 59 kHWUI_Backend,
60 }; 60 };
61 61
62 // Call to determine whether the benchmark is intended for 62 // Call to determine whether the benchmark is intended for
63 // the rendering mode. 63 // the rendering mode.
64 virtual bool isSuitableFor(Backend backend) { 64 virtual bool isSuitableFor(Backend backend) {
65 return backend != kNonRendering_Backend; 65 return backend != kNonRendering_Backend;
66 } 66 }
67 67
68 virtual int calculateLoops(int defaultLoops) const {
69 return defaultLoops;
70 }
71
68 // Call before draw, allows the benchmark to do setup work outside of the 72 // Call before draw, allows the benchmark to do setup work outside of the
69 // timer. When a benchmark is repeatedly drawn, this should be called once 73 // timer. When a benchmark is repeatedly drawn, this should be called once
70 // before the initial draw. 74 // before the initial draw.
71 void preDraw(); 75 void preDraw();
72 76
73 // Called once before and after a series of draw calls to a single canvas. 77 // Called once before and after a series of draw calls to a single canvas.
74 // The setup/break down in these calls is not timed. 78 // The setup/break down in these calls is not timed.
75 void perCanvasPreDraw(SkCanvas*); 79 void perCanvasPreDraw(SkCanvas*);
76 void perCanvasPostDraw(SkCanvas*); 80 void perCanvasPostDraw(SkCanvas*);
77 81
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 int fForceAlpha; 122 int fForceAlpha;
119 SkTriState::State fDither; 123 SkTriState::State fDither;
120 uint32_t fOrMask, fClearMask; 124 uint32_t fOrMask, fClearMask;
121 125
122 typedef SkRefCnt INHERITED; 126 typedef SkRefCnt INHERITED;
123 }; 127 };
124 128
125 typedef SkTRegistry<Benchmark*(*)(void*)> BenchRegistry; 129 typedef SkTRegistry<Benchmark*(*)(void*)> BenchRegistry;
126 130
127 #endif 131 #endif
OLDNEW
« no previous file with comments | « no previous file | bench/SKPAnimationBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698