blob: 2f8379356f2a04b48a43ccbd67da7472e1177117 [file] [log] [blame]
Tom Hudson2880df22015-10-29 09:55:42 -04001/*
2 * Copyright 2015 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
9#ifndef VisualModule_DEFINED
10#define VisualModule_DEFINED
11
12#include "SkRefCnt.h"
13
14class SkCanvas;
15
16/*
17 * VisualModule is the base class for all of the various types of activities VisualBench supports.
18 *
19 * The common theme tying these all together is they need to display an image to the screen. Later,
20 * on we some modules will also be interactive
21 */
22class VisualModule : public SkRefCnt {
23public:
24 virtual ~VisualModule() {}
25
26 virtual void draw(SkCanvas* canvas)=0;
27
28 virtual bool onHandleChar(SkUnichar unichar) = 0;
29
30private:
31 typedef SkRefCnt INHERITED;
32};
33
34#endif