• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
13 class MSKPPlayer;
14 
15 class MSKPBench : public Benchmark {
16 public:
17     MSKPBench(SkString name, std::unique_ptr<MSKPPlayer> player);
18     ~MSKPBench() override;
19 
20 protected:
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 
27 private:
28     SkString fName;
29     std::unique_ptr<MSKPPlayer> fPlayer;
30 };
31 
32 #endif
33