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

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

Issue 1382883003: move visual bench interactive module to timing state machine (Closed) Base URL: https://skia.googlesource.com/skia.git@vb
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 8
9 #ifndef TimingStateMachine_DEFINED 9 #ifndef TimingStateMachine_DEFINED
10 #define TimingStateMachine_DEFINED 10 #define TimingStateMachine_DEFINED
(...skipping 21 matching lines...) Expand all
32 enum ParentEvents { 32 enum ParentEvents {
33 kReset_ParentEvents, 33 kReset_ParentEvents,
34 kTiming_ParentEvents, 34 kTiming_ParentEvents,
35 kTimingFinished_ParentEvents,// This implies parent can read lastMeasure ment() and must 35 kTimingFinished_ParentEvents,// This implies parent can read lastMeasure ment() and must
36 // reset 36 // reset
37 }; 37 };
38 38
39 ParentEvents nextFrame(SkCanvas* canvas, Benchmark* benchmark); 39 ParentEvents nextFrame(SkCanvas* canvas, Benchmark* benchmark);
40 40
41 /* 41 /*
42 * Before taking another sample, the owner can choose to prewarm or not
43 */
44 void nextSampleWithPrewarm();
45 void nextSample();
46
47 /*
42 * The caller should call this when they are ready to move to the next bench mark. The caller 48 * The caller should call this when they are ready to move to the next bench mark. The caller
43 * must call this with the *last* benchmark so post draw hooks can be invoke d 49 * must call this with the *last* benchmark so post draw hooks can be invoke d
44 */ 50 */
45 void nextBenchmark(SkCanvas*, Benchmark*); 51 void nextBenchmark(SkCanvas*, Benchmark*);
46 52
47 53
48 /* 54 /*
49 * When TimingStateMachine returns kTimingFinished_ParentEvents, then the ow ner can call 55 * When TimingStateMachine returns kTimingFinished_ParentEvents, then the ow ner can call
50 * lastMeasurement() to get the time 56 * lastMeasurement() to get the time
51 */ 57 */
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void recordMeasurement(); 100 void recordMeasurement();
95 101
96 int fCurrentFrame; 102 int fCurrentFrame;
97 int fLoops; 103 int fLoops;
98 double fLastMeasurement; 104 double fLastMeasurement;
99 WallTimer fTimer; 105 WallTimer fTimer;
100 State fState; 106 State fState;
101 }; 107 };
102 108
103 #endif 109 #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