| 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 |
| 11 #include "Benchmark.h" | 11 #include "Benchmark.h" |
| 12 #include "SkCanvas.h" | 12 #include "SkCanvas.h" |
| 13 #include "SkPicture.h" | 13 #include "SkPicture.h" |
| 14 #include "SkTDArray.h" | |
| 15 | |
| 16 class SkSurface; | |
| 17 | 14 |
| 18 /** | 15 /** |
| 19 * Runs an SkPicture as a benchmark by repeatedly drawing it scaled inside a dev
ice clip. | 16 * Runs an SkPicture as a benchmark by repeatedly drawing it scaled inside a dev
ice clip. |
| 20 */ | 17 */ |
| 21 class SKPBench : public Benchmark { | 18 class SKPBench : public Benchmark { |
| 22 public: | 19 public: |
| 23 SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScala
r scale, | 20 SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScala
r scale, |
| 24 bool useMultiPictureDraw, bool doLooping); | 21 bool useMultiPictureDraw, bool doLooping); |
| 25 ~SKPBench() override; | 22 ~SKPBench() override; |
| 26 | 23 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 54 const bool fUseMultiPictureDraw; | 51 const bool fUseMultiPictureDraw; |
| 55 SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw | 52 SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw |
| 56 SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw | 53 SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw |
| 57 | 54 |
| 58 const bool fDoLooping; | 55 const bool fDoLooping; |
| 59 | 56 |
| 60 typedef Benchmark INHERITED; | 57 typedef Benchmark INHERITED; |
| 61 }; | 58 }; |
| 62 | 59 |
| 63 #endif | 60 #endif |
| OLD | NEW |