mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef RecordingBench_DEFINED |
| 9 | #define RecordingBench_DEFINED |
| 10 | |
| 11 | #include "Benchmark.h" |
| 12 | #include "SkPicture.h" |
| 13 | |
| 14 | class RecordingBench : public Benchmark { |
| 15 | public: |
| 16 | RecordingBench(const char* name, const SkPicture*, bool useBBH); |
| 17 | |
| 18 | protected: |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 19 | const char* onGetName() override; |
| 20 | bool isSuitableFor(Backend) override; |
mtklein | a1ebeb2 | 2015-10-01 09:43:39 -0700 | [diff] [blame] | 21 | void onDraw(int loops, SkCanvas*) override; |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 22 | SkIPoint onGetSize() override; |
mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 23 | |
| 24 | private: |
| 25 | SkAutoTUnref<const SkPicture> fSrc; |
| 26 | SkString fName; |
| 27 | bool fUseBBH; |
| 28 | |
| 29 | typedef Benchmark INHERITED; |
| 30 | }; |
| 31 | |
| 32 | #endif//RecordingBench_DEFINED |