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" |
mtklein | 1d65fe2 | 2016-08-10 12:09:34 -0700 | [diff] [blame] | 13 | #include "SkLiteDL.h" |
mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 14 | |
| 15 | class RecordingBench : public Benchmark { |
| 16 | public: |
mtklein | 8c1a4f8 | 2016-08-08 06:56:22 -0700 | [diff] [blame] | 17 | RecordingBench(const char* name, const SkPicture*, bool useBBH, bool lite); |
mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 18 | |
| 19 | protected: |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 20 | const char* onGetName() override; |
| 21 | bool isSuitableFor(Backend) override; |
mtklein | a1ebeb2 | 2015-10-01 09:43:39 -0700 | [diff] [blame] | 22 | void onDraw(int loops, SkCanvas*) override; |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 23 | SkIPoint onGetSize() override; |
mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 24 | |
| 25 | private: |
mtklein | 8c1a4f8 | 2016-08-08 06:56:22 -0700 | [diff] [blame] | 26 | sk_sp<const SkPicture> fSrc; |
mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 27 | SkString fName; |
mtklein | 1d65fe2 | 2016-08-10 12:09:34 -0700 | [diff] [blame] | 28 | sk_sp<SkLiteDL> fDL; |
mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 29 | bool fUseBBH; |
mtklein | fd731ce | 2014-09-10 12:19:30 -0700 | [diff] [blame] | 30 | |
| 31 | typedef Benchmark INHERITED; |
| 32 | }; |
| 33 | |
| 34 | #endif//RecordingBench_DEFINED |