blob: a5793b3ac9f623f28432b01fb8a2a32f9f33da6f [file] [log] [blame]
mtkleinfd731ce2014-09-10 12:19:30 -07001/*
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
14class RecordingBench : public Benchmark {
15public:
mtklein8c1a4f82016-08-08 06:56:22 -070016 RecordingBench(const char* name, const SkPicture*, bool useBBH, bool lite);
mtkleinfd731ce2014-09-10 12:19:30 -070017
18protected:
mtklein36352bf2015-03-25 18:17:31 -070019 const char* onGetName() override;
20 bool isSuitableFor(Backend) override;
mtkleina1ebeb22015-10-01 09:43:39 -070021 void onDraw(int loops, SkCanvas*) override;
mtklein36352bf2015-03-25 18:17:31 -070022 SkIPoint onGetSize() override;
mtkleinfd731ce2014-09-10 12:19:30 -070023
24private:
mtklein8c1a4f82016-08-08 06:56:22 -070025 sk_sp<const SkPicture> fSrc;
mtkleinfd731ce2014-09-10 12:19:30 -070026 SkString fName;
27 bool fUseBBH;
mtklein8c1a4f82016-08-08 06:56:22 -070028 bool fLite;
mtkleinfd731ce2014-09-10 12:19:30 -070029
30 typedef Benchmark INHERITED;
31};
32
33#endif//RecordingBench_DEFINED