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

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

Issue 1392833006: Revert of small tidy of benchmarkstream (Closed) Base URL: https://skia.googlesource.com/skia.git@vb4b
Patch Set: 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 | « no previous file | 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. 41 * The caller should call this when they are ready to move to the next bench mark. The caller
42 * must call this with the *last* benchmark so post draw hooks can be invoke d
42 */ 43 */
43 void nextBenchmark(); 44 void nextBenchmark(SkCanvas*, Benchmark*);
44 45
45 /* 46 /*
46 * When TimingStateMachine returns kTimingFinished_ParentEvents, then the ow ner can call 47 * When TimingStateMachine returns kTimingFinished_ParentEvents, then the ow ner can call
47 * lastMeasurement() to get the time 48 * lastMeasurement() to get the time
48 */ 49 */
49 double lastMeasurement() const { return fLastMeasurement; } 50 double lastMeasurement() const { return fLastMeasurement; }
50 51
51 int loops() const { return fLoops; } 52 int loops() const { return fLoops; }
52 53
53 private: 54 private:
(...skipping 12 matching lines...) Expand all
66 67
67 int fCurrentFrame; 68 int fCurrentFrame;
68 int fLoops; 69 int fLoops;
69 double fLastMeasurement; 70 double fLastMeasurement;
70 WallTimer fTimer; 71 WallTimer fTimer;
71 State fState; 72 State fState;
72 InnerState fInnerState; 73 InnerState fInnerState;
73 }; 74 };
74 75
75 #endif 76 #endif
OLDNEW
« no previous file with comments | « no previous file | tools/VisualBench/TimingStateMachine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698