blob: ca389de7020139de75908186c9fde4b130f25c9a [file] [log] [blame]
Brian Salomon31fddc32021-04-30 13:08:55 -04001/*
2 * Copyright 2021 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 MSKPBench_DEFINED
9#define MSKPBench_DEFINED
10
11#include "bench/Benchmark.h"
12
13class MSKPPlayer;
14
15class MSKPBench : public Benchmark {
16public:
17 MSKPBench(SkString name, std::unique_ptr<MSKPPlayer> player);
18 ~MSKPBench() override;
19
20protected:
21 void onDraw(int loops, SkCanvas*) override;
22 const char* onGetName() override;
23 SkIPoint onGetSize() override;
24 void onPreDraw(SkCanvas*) override;
25 void onPostDraw(SkCanvas*) override;
26
27private:
28 SkString fName;
29 std::unique_ptr<MSKPPlayer> fPlayer;
30};
31
32#endif