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

Unified Diff: bench/SKPBench.h

Issue 1203193002: Add loopSKP flag to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 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/SKPAnimationBench.cpp ('k') | bench/SKPBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SKPBench.h
diff --git a/bench/SKPBench.h b/bench/SKPBench.h
index 3b645e97346df2d13bd428794caa82324ed56069..e1c66bf2ecfe5029ef0c4736872f5d9ddd3b70e7 100644
--- a/bench/SKPBench.h
+++ b/bench/SKPBench.h
@@ -18,9 +18,13 @@
class SKPBench : public Benchmark {
public:
SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScalar scale,
- bool useMultiPictureDraw);
+ bool useMultiPictureDraw, bool doLooping);
~SKPBench() override;
+ int calculateLoops(int defaultLoops) const override {
+ return fDoLooping ? defaultLoops : 1;
+ }
+
protected:
const char* onGetName() override;
const char* onGetUniqueName() override;
@@ -48,6 +52,8 @@ private:
SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw
SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw
+ const bool fDoLooping;
+
typedef Benchmark INHERITED;
};
« no previous file with comments | « bench/SKPAnimationBench.cpp ('k') | bench/SKPBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698