Flutter Engine
The Flutter Engine
GMSlide.h
Go to the documentation of this file.
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
13#include "include/core/SkSize.h"
15#include "tools/viewer/Slide.h"
16
17#include <memory>
18class SkCanvas;
19class SkMetaData;
20
21class GMSlide : public Slide {
22public:
23 GMSlide(std::unique_ptr<skiagm::GM> gm);
24 ~GMSlide() override;
25
26 SkISize getDimensions() const override { return fGM->getISize(); }
27
28 void gpuTeardown() override;
29 void draw(SkCanvas* canvas) override;
30 bool animate(double nanos) override;
31
32 bool onChar(SkUnichar c) override;
33
34 bool onGetControls(SkMetaData*) override;
35 void onSetControls(const SkMetaData&) override;
36
37private:
38 std::unique_ptr<skiagm::GM> fGM;
39};
40
41
42#endif
int32_t SkUnichar
Definition: SkTypes.h:175
GMSlide(std::unique_ptr< skiagm::GM > gm)
Definition: GMSlide.cpp:22
void onSetControls(const SkMetaData &) override
Definition: GMSlide.cpp:53
bool onGetControls(SkMetaData *) override
Definition: GMSlide.cpp:49
void draw(SkCanvas *canvas) override
Definition: GMSlide.cpp:34
bool animate(double nanos) override
Definition: GMSlide.cpp:45
void gpuTeardown() override
Definition: GMSlide.cpp:30
SkISize getDimensions() const override
Definition: GMSlide.h:26
bool onChar(SkUnichar c) override
Definition: GMSlide.cpp:47
~GMSlide() override
Definition: Slide.h:29
Definition: SkSize.h:16