blob: 8e0e12ee966f355ea77ff46b0d5f6b4f6ea0d304 [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"
mtklein1d65fe22016-08-10 12:09:34 -070013#include "SkLiteDL.h"
mtkleinfd731ce2014-09-10 12:19:30 -070014
15class RecordingBench : public Benchmark {
16public:
mtklein8c1a4f82016-08-08 06:56:22 -070017 RecordingBench(const char* name, const SkPicture*, bool useBBH, bool lite);
mtkleinfd731ce2014-09-10 12:19:30 -070018
19protected:
mtklein36352bf2015-03-25 18:17:31 -070020 const char* onGetName() override;
21 bool isSuitableFor(Backend) override;
mtkleina1ebeb22015-10-01 09:43:39 -070022 void onDraw(int loops, SkCanvas*) override;
mtklein36352bf2015-03-25 18:17:31 -070023 SkIPoint onGetSize() override;
mtkleinfd731ce2014-09-10 12:19:30 -070024
25private:
mtklein8c1a4f82016-08-08 06:56:22 -070026 sk_sp<const SkPicture> fSrc;
mtkleinfd731ce2014-09-10 12:19:30 -070027 SkString fName;
mtklein1d65fe22016-08-10 12:09:34 -070028 sk_sp<SkLiteDL> fDL;
mtkleinfd731ce2014-09-10 12:19:30 -070029 bool fUseBBH;
mtkleinfd731ce2014-09-10 12:19:30 -070030
31 typedef Benchmark INHERITED;
32};
33
34#endif//RecordingBench_DEFINED