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

Unified Diff: tools/PictureBenchmark.h

Issue 19862002: Do timer allocation and string building outside of bench loops (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: on top of tot Created 7 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 | « bench/benchmain.cpp ('k') | tools/PictureBenchmark.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureBenchmark.h
diff --git a/tools/PictureBenchmark.h b/tools/PictureBenchmark.h
index 70c56d994972d1f5a9f88f029c8977cbe099fe6c..1f01ce533ad726ac42e11a9c2a9fbb2f93beb88d 100644
--- a/tools/PictureBenchmark.h
+++ b/tools/PictureBenchmark.h
@@ -10,6 +10,7 @@
#include "SkTypes.h"
#include "PictureRenderer.h"
+#include "TimerData.h"
class BenchTimer;
class SkBenchLogger;
@@ -45,32 +46,19 @@ public:
PictureRenderer* setRenderer(PictureRenderer*);
- void setLogPerIter(bool log) { fLogPerIter = log; }
+ void setTimerResultType(TimerData::Result resultType) { fTimerResult = resultType; }
- void setPrintMin(bool min) { fPrintMin = min; }
-
- void setTimersToShow(bool wall, bool truncatedWall, bool cpu, bool truncatedCpu, bool gpu) {
- fShowWallTime = wall;
- fShowTruncatedWallTime = truncatedWall;
- fShowCpuTime = cpu;
- fShowTruncatedCpuTime = truncatedCpu;
- fShowGpuTime = gpu;
- }
+ void setTimersToShow(bool wall, bool truncatedWall, bool cpu, bool truncatedCpu, bool gpu);
void setLogger(SkBenchLogger* logger) { fLogger = logger; }
private:
- int fRepeats;
- SkBenchLogger* fLogger;
- PictureRenderer* fRenderer;
- bool fLogPerIter;
- bool fPrintMin;
- bool fShowWallTime;
- bool fShowTruncatedWallTime;
- bool fShowCpuTime;
- bool fShowTruncatedCpuTime;
- bool fShowGpuTime;
- bool fTimeIndividualTiles;
+ int fRepeats;
+ SkBenchLogger* fLogger;
+ PictureRenderer* fRenderer;
+ TimerData::Result fTimerResult;
+ uint32_t fTimerTypes; // bitfield of TimerData::TimerFlags values
+ bool fTimeIndividualTiles;
void logProgress(const char msg[]);
« no previous file with comments | « bench/benchmain.cpp ('k') | tools/PictureBenchmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698