OLD | NEW |
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 #include "TimingStateMachine.h" | 8 #include "TimingStateMachine.h" |
9 | 9 |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 void TimingStateMachine::resetTimingState() { | 85 void TimingStateMachine::resetTimingState() { |
86 fCurrentFrame = 0; | 86 fCurrentFrame = 0; |
87 fTimer = WallTimer(); | 87 fTimer = WallTimer(); |
88 } | 88 } |
89 | 89 |
90 void TimingStateMachine::recordMeasurement() { | 90 void TimingStateMachine::recordMeasurement() { |
91 fLastMeasurement = this->elapsed() / (FLAGS_frames * fLoops); | 91 fLastMeasurement = this->elapsed() / (FLAGS_frames * fLoops); |
92 } | 92 } |
93 | 93 |
94 void TimingStateMachine::nextBenchmark(SkCanvas* canvas, Benchmark* benchmark) { | 94 void TimingStateMachine::nextBenchmark() { |
95 benchmark->postDraw(canvas); | |
96 benchmark->perCanvasPostDraw(canvas); | |
97 fLoops = 1; | 95 fLoops = 1; |
98 fInnerState = kTuning_InnerState; | 96 fInnerState = kTuning_InnerState; |
99 fState = kPreWarm_State; | 97 fState = kPreWarm_State; |
100 } | 98 } |
OLD | NEW |