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

Unified Diff: tools/VisualBench/VisualBench.h

Issue 1240633005: Some cleanups of VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualBench.h
diff --git a/tools/VisualBench/VisualBench.h b/tools/VisualBench/VisualBench.h
index b8cd2bdb771a866171f32c25ab40c9920641dcc2..e5064b9affd098dbe52a4aa8ec61bce8583d8504 100644
--- a/tools/VisualBench/VisualBench.h
+++ b/tools/VisualBench/VisualBench.h
@@ -39,6 +39,14 @@ protected:
void onSizeChange() override;
private:
+ enum State {
bsalomon 2015/07/17 15:18:22 Needs some comments here... This is pretty complic
+ kPreWarmLoopsPerCanvasPreDraw_State,
+ kPreWarmLoops_State,
+ kTuneLoops_State,
+ kPreWarmTimingPerCanvasPreDraw_State,
+ kPreWarmTiming_State,
+ kTiming_State,
+ };
void setTitle();
bool setupBackend();
void resetContext();
@@ -47,19 +55,21 @@ private:
void printStats();
bool advanceRecordIfNecessary(SkCanvas*);
inline void renderFrame(SkCanvas*);
+ inline void nextState(State);
+ void perCanvasPreDraw(SkCanvas*, State);
+ void preWarm(State nextState);
+ void scaleLoops(double elapsedMs);
+ inline void tuneLoops();
+ inline void timing(SkCanvas*);
+ inline double elapsed();
+ void resetTimingState();
+ void postDraw(SkCanvas*);
+ void recordMeasurement();
struct Record {
SkTArray<double> fMeasurements;
};
- enum State {
- kPreWarmLoops_State,
- kTuneLoops_State,
- kPreWarmTiming_State,
- kTiming_State,
- };
- void preWarm(State nextState);
-
int fCurrentSample;
int fCurrentFrame;
int fFlushes;
« no previous file with comments | « no previous file | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698