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

Unified Diff: bench/SKPBench.h

Issue 731973005: Add MultiPictureDraw to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Disable multithreading in nanobench Created 6 years, 1 month 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/Benchmark.cpp ('k') | bench/SKPBench.cpp » ('j') | bench/nanobench.cpp » ('J')
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 0b0e008d633b33598cf86b314e84bedb72ce1669..36d7dfd4cf5f7eb8aa36eb59e236e4730ed06038 100644
--- a/bench/SKPBench.h
+++ b/bench/SKPBench.h
@@ -17,14 +17,18 @@
*/
class SKPBench : public Benchmark {
public:
- SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScalar scale);
+ SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScalar scale,
+ bool useMultiPictureDraw);
+ ~SKPBench() SK_OVERRIDE;
protected:
- virtual const char* onGetName() SK_OVERRIDE;
- virtual const char* onGetUniqueName() SK_OVERRIDE;
- virtual bool isSuitableFor(Backend backend) SK_OVERRIDE;
- virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE;
- virtual SkIPoint onGetSize() SK_OVERRIDE;
+ const char* onGetName() SK_OVERRIDE;
+ const char* onGetUniqueName() SK_OVERRIDE;
+ void onPerCanvasPreDraw(SkCanvas*) SK_OVERRIDE;
+ void onPerCanvasPostDraw(SkCanvas*) SK_OVERRIDE;
+ bool isSuitableFor(Backend backend) SK_OVERRIDE;
+ void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE;
+ SkIPoint onGetSize() SK_OVERRIDE;
private:
SkAutoTUnref<const SkPicture> fPic;
@@ -33,6 +37,10 @@ private:
SkString fName;
SkString fUniqueName;
+ const bool fUseMultiPictureDraw;
+ SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw
+ SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw
+
typedef Benchmark INHERITED;
};
« no previous file with comments | « bench/Benchmark.cpp ('k') | bench/SKPBench.cpp » ('j') | bench/nanobench.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698