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

Side by Side Diff: tools/VisualBench/TimingStateMachine.h

Issue 1395703002: small tidy of benchmarkstream (Closed) Base URL: https://skia.googlesource.com/skia.git@vb4b
Patch Set: remove debug print Created 5 years, 2 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 | « tools/VisualBench/CpuWrappedBenchmark.h ('k') | tools/VisualBench/TimingStateMachine.cpp » ('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 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 #ifndef TimingStateMachine_DEFINED 8 #ifndef TimingStateMachine_DEFINED
9 #define TimingStateMachine_DEFINED 9 #define TimingStateMachine_DEFINED
10 10
(...skipping 20 matching lines...) Expand all
31 enum ParentEvents { 31 enum ParentEvents {
32 kReset_ParentEvents, 32 kReset_ParentEvents,
33 kTiming_ParentEvents, 33 kTiming_ParentEvents,
34 kTimingFinished_ParentEvents,// This implies parent can read lastMeasure ment() and must 34 kTimingFinished_ParentEvents,// This implies parent can read lastMeasure ment() and must
35 // reset 35 // reset
36 }; 36 };
37 37
38 ParentEvents nextFrame(bool preWarmBetweenSamples); 38 ParentEvents nextFrame(bool preWarmBetweenSamples);
39 39
40 /* 40 /*
41 * The caller should call this when they are ready to move to the next bench mark. The caller 41 * The caller should call this when they are ready to move to the next bench mark.
42 * must call this with the *last* benchmark so post draw hooks can be invoke d
43 */ 42 */
44 void nextBenchmark(SkCanvas*, Benchmark*); 43 void nextBenchmark();
45 44
46 /* 45 /*
47 * When TimingStateMachine returns kTimingFinished_ParentEvents, then the ow ner can call 46 * When TimingStateMachine returns kTimingFinished_ParentEvents, then the ow ner can call
48 * lastMeasurement() to get the time 47 * lastMeasurement() to get the time
49 */ 48 */
50 double lastMeasurement() const { return fLastMeasurement; } 49 double lastMeasurement() const { return fLastMeasurement; }
51 50
52 int loops() const { return fLoops; } 51 int loops() const { return fLoops; }
53 52
54 private: 53 private:
(...skipping 12 matching lines...) Expand all
67 66
68 int fCurrentFrame; 67 int fCurrentFrame;
69 int fLoops; 68 int fLoops;
70 double fLastMeasurement; 69 double fLastMeasurement;
71 WallTimer fTimer; 70 WallTimer fTimer;
72 State fState; 71 State fState;
73 InnerState fInnerState; 72 InnerState fInnerState;
74 }; 73 };
75 74
76 #endif 75 #endif
OLDNEW
« no previous file with comments | « tools/VisualBench/CpuWrappedBenchmark.h ('k') | tools/VisualBench/TimingStateMachine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698