OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SKPBench_DEFINED | 8 #ifndef SKPBench_DEFINED |
9 #define SKPBench_DEFINED | 9 #define SKPBench_DEFINED |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class SKPBench : public Benchmark { | 21 class SKPBench : public Benchmark { |
22 public: | 22 public: |
23 SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScala
r scale, | 23 SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScala
r scale, |
24 bool useMultiPictureDraw, bool doLooping); | 24 bool useMultiPictureDraw, bool doLooping); |
25 ~SKPBench() override; | 25 ~SKPBench() override; |
26 | 26 |
27 int calculateLoops(int defaultLoops) const override { | 27 int calculateLoops(int defaultLoops) const override { |
28 return fDoLooping ? defaultLoops : 1; | 28 return fDoLooping ? defaultLoops : 1; |
29 } | 29 } |
30 | 30 |
| 31 void getGpuStats(SkCanvas*, SkTArray<SkString>* keys, SkTArray<double>* valu
es) override; |
| 32 |
31 protected: | 33 protected: |
32 const char* onGetName() override; | 34 const char* onGetName() override; |
33 const char* onGetUniqueName() override; | 35 const char* onGetUniqueName() override; |
34 void onPerCanvasPreDraw(SkCanvas*) override; | 36 void onPerCanvasPreDraw(SkCanvas*) override; |
35 void onPerCanvasPostDraw(SkCanvas*) override; | 37 void onPerCanvasPostDraw(SkCanvas*) override; |
36 bool isSuitableFor(Backend backend) override; | 38 bool isSuitableFor(Backend backend) override; |
37 void onDraw(int loops, SkCanvas* canvas) override; | 39 void onDraw(int loops, SkCanvas* canvas) override; |
38 SkIPoint onGetSize() override; | 40 SkIPoint onGetSize() override; |
39 | 41 |
40 virtual void drawMPDPicture(); | 42 virtual void drawMPDPicture(); |
(...skipping 13 matching lines...) Expand all Loading... |
54 const bool fUseMultiPictureDraw; | 56 const bool fUseMultiPictureDraw; |
55 SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw | 57 SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw |
56 SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw | 58 SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw |
57 | 59 |
58 const bool fDoLooping; | 60 const bool fDoLooping; |
59 | 61 |
60 typedef Benchmark INHERITED; | 62 typedef Benchmark INHERITED; |
61 }; | 63 }; |
62 | 64 |
63 #endif | 65 #endif |
OLD | NEW |