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

Unified Diff: tools/VisualBench/VisualStreamTimingModule.h

Issue 1395703002: small tidy of benchmarkstream (Closed) Base URL: https://skia.googlesource.com/skia.git@vb4b
Patch Set: remove debug print 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/VisualBenchmarkStream.cpp ('k') | tools/VisualBench/VisualStreamTimingModule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualStreamTimingModule.h
diff --git a/tools/VisualBench/VisualStreamTimingModule.h b/tools/VisualBench/VisualStreamTimingModule.h
index ac06ed4307601782cdd257acd378d6a418c42649..5dbec693fa969d6294e09c267cf36c24cd11fef5 100644
--- a/tools/VisualBench/VisualStreamTimingModule.h
+++ b/tools/VisualBench/VisualStreamTimingModule.h
@@ -14,6 +14,8 @@
#include "VisualBench.h"
#include "VisualBenchmarkStream.h"
+class SkCanvas;
+
/*
* VisualStreamTimingModule is the base class for modules which want to time a stream of Benchmarks.
*
@@ -31,12 +33,17 @@ private:
// subclasses should return true to advance the stream
virtual bool timingFinished(Benchmark*, int loops, double measurement)=0;
- bool nextBenchmarkIfNecessary(SkCanvas*);
+ inline void handleInitState(SkCanvas*);
+ inline void handleTimingEvent(SkCanvas*, TimingStateMachine::ParentEvents);
TimingStateMachine fTSM;
SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream;
- SkAutoTUnref<Benchmark> fBenchmark;
- bool fReinitializeBenchmark;
+ enum InitState {
+ kNone_InitState,
+ kReset_InitState,
+ kNewBenchmark_InitState,
+ };
+ InitState fInitState;
bool fPreWarmBeforeSample;
// support framework
« no previous file with comments | « tools/VisualBench/VisualBenchmarkStream.cpp ('k') | tools/VisualBench/VisualStreamTimingModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698