• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright 2016 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 GMSlide_DEFINED
9 #define GMSlide_DEFINED
10 
11 #include "gm/gm.h"
12 #include "tools/viewer/Slide.h"
13 
14 class GMSlide : public Slide {
15 public:
16     GMSlide(std::unique_ptr<skiagm::GM> gm);
17     ~GMSlide() override;
18 
getDimensions()19     SkISize getDimensions() const override { return fGM->getISize(); }
20 
21     void draw(SkCanvas* canvas) override;
22     bool animate(double nanos) override;
23 
24     bool onChar(SkUnichar c) override;
25 
26     bool onGetControls(SkMetaData*) override;
27     void onSetControls(const SkMetaData&) override;
28 
29 private:
30     std::unique_ptr<skiagm::GM> fGM;
31 };
32 
33 
34 #endif
35