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 | 8 |
9 #include "VisualLightweightBenchModule.h" | 9 #include "VisualLightweightBenchModule.h" |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 case TimingStateMachine::kTiming_ParentEvents: | 156 case TimingStateMachine::kTiming_ParentEvents: |
157 break; | 157 break; |
158 case TimingStateMachine::kTimingFinished_ParentEvents: | 158 case TimingStateMachine::kTimingFinished_ParentEvents: |
159 fOwner->reset(); | 159 fOwner->reset(); |
160 fRecords.back().fMeasurements.push_back(fTSM.lastMeasurement()); | 160 fRecords.back().fMeasurements.push_back(fTSM.lastMeasurement()); |
161 if (++fCurrentSample > FLAGS_samples) { | 161 if (++fCurrentSample > FLAGS_samples) { |
162 this->printStats(); | 162 this->printStats(); |
163 fTSM.nextBenchmark(canvas, fBenchmark); | 163 fTSM.nextBenchmark(canvas, fBenchmark); |
164 fCurrentSample = 0; | 164 fCurrentSample = 0; |
165 fBenchmark.reset(nullptr); | 165 fBenchmark.reset(nullptr); |
| 166 } else { |
| 167 fTSM.nextSampleWithPrewarm(); |
166 } | 168 } |
167 break; | 169 break; |
168 } | 170 } |
169 | |
170 } | 171 } |
171 | 172 |
172 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) { | 173 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) { |
173 return true; | 174 return true; |
174 } | 175 } |
OLD | NEW |