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.cpp

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 | « tools/VisualBench/TimingStateMachine.h ('k') | tools/VisualBench/VisualBenchmarkStream.h » ('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 #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
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() { 94 void TimingStateMachine::nextBenchmark(SkCanvas* canvas, Benchmark* benchmark) {
95 benchmark->postDraw(canvas);
96 benchmark->perCanvasPostDraw(canvas);
95 fLoops = 1; 97 fLoops = 1;
96 fInnerState = kTuning_InnerState; 98 fInnerState = kTuning_InnerState;
97 fState = kPreWarm_State; 99 fState = kPreWarm_State;
98 } 100 }
OLDNEW
« no previous file with comments | « tools/VisualBench/TimingStateMachine.h ('k') | tools/VisualBench/VisualBenchmarkStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698