diff options
Diffstat (limited to 'bench/RecordingBench.h')
-rw-r--r-- | bench/RecordingBench.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bench/RecordingBench.h b/bench/RecordingBench.h new file mode 100644 index 0000000000..4c0340127c --- /dev/null +++ b/bench/RecordingBench.h @@ -0,0 +1,32 @@ +/* + * Copyright 2014 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef RecordingBench_DEFINED +#define RecordingBench_DEFINED + +#include "Benchmark.h" +#include "SkPicture.h" + +class RecordingBench : public Benchmark { +public: + RecordingBench(const char* name, const SkPicture*, bool useBBH); + +protected: + virtual const char* onGetName() SK_OVERRIDE; + virtual bool isSuitableFor(Backend) SK_OVERRIDE; + virtual void onDraw(const int loops, SkCanvas*) SK_OVERRIDE; + virtual SkIPoint onGetSize() SK_OVERRIDE; + +private: + SkAutoTUnref<const SkPicture> fSrc; + SkString fName; + bool fUseBBH; + + typedef Benchmark INHERITED; +}; + +#endif//RecordingBench_DEFINED |