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; |
}; |