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

Side by Side Diff: tools/VisualBench/VisualLightweightBenchModule.cpp

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 | « tools/VisualBench/VisualInteractiveModule.cpp ('k') | no next file » | 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 #include "VisualLightweightBenchModule.h" 9 #include "VisualLightweightBenchModule.h"
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualInteractiveModule.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698