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

Unified Diff: tools/VisualBench/TimingStateMachine.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/VisualBench/TimingStateMachine.h ('k') | tools/VisualBench/VisualInteractiveModule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/TimingStateMachine.cpp
diff --git a/tools/VisualBench/TimingStateMachine.cpp b/tools/VisualBench/TimingStateMachine.cpp
index c7f2f134709ea9fda4a4c171b28951989e073c0d..d7e4cf4a77a409e7cef1b028efa91df94d81ccef 100644
--- a/tools/VisualBench/TimingStateMachine.cpp
+++ b/tools/VisualBench/TimingStateMachine.cpp
@@ -100,19 +100,11 @@ void TimingStateMachine::recordMeasurement() {
fLastMeasurement = this->elapsed() / (FLAGS_frames * fLoops);
}
-void TimingStateMachine::nextBenchmark(SkCanvas* canvas, Benchmark* benchmark) {
- benchmark->postDraw(canvas);
- benchmark->perCanvasPostDraw(canvas);
- fLoops = 1;
- this->nextState(kPreWarmLoopsPerCanvasPreDraw_State);
-}
-
inline TimingStateMachine::ParentEvents TimingStateMachine::timing(SkCanvas* canvas,
Benchmark* benchmark) {
if (fCurrentFrame >= FLAGS_frames) {
this->recordMeasurement();
this->resetTimingState();
- this->nextState(kPreWarmTimingPerCanvasPreDraw_State);
return kTimingFinished_ParentEvents;
} else {
fCurrentFrame++;
@@ -120,3 +112,17 @@ inline TimingStateMachine::ParentEvents TimingStateMachine::timing(SkCanvas* can
}
}
+void TimingStateMachine::nextBenchmark(SkCanvas* canvas, Benchmark* benchmark) {
+ benchmark->postDraw(canvas);
+ benchmark->perCanvasPostDraw(canvas);
+ fLoops = 1;
+ this->nextState(kPreWarmLoopsPerCanvasPreDraw_State);
+}
+
+void TimingStateMachine::nextSampleWithPrewarm() {
+ this->nextState(kPreWarmTimingPerCanvasPreDraw_State);
+}
+
+void TimingStateMachine::nextSample() {
+ fTimer.start();
+}
« no previous file with comments | « tools/VisualBench/TimingStateMachine.h ('k') | tools/VisualBench/VisualInteractiveModule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698