blob: f97ce92d2b25b97039d852fba43f63f717ccd7c5 [file] [log] [blame]
bsalomon@google.com48dd1a22011-10-31 14:18:20 +00001/*
2 * Copyright 2011 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
bsalomon@google.com48dd1a22011-10-31 14:18:20 +00008#ifndef GMSampleView_DEFINED
9#define GMSampleView_DEFINED
10
11#include "SampleCode.h"
12#include "gm.h"
13
14class GMSampleView : public SampleView {
15private:
reed@google.coma4f81372012-11-15 15:56:38 +000016 bool fShowSize;
bsalomon@google.com48dd1a22011-10-31 14:18:20 +000017 typedef skiagm::GM GM;
18
19public:
reed0ab326f2015-02-21 09:36:50 -080020 GMSampleView(GM*);
21 virtual ~GMSampleView();
rmistry@google.comae933ce2012-08-23 18:19:56 +000022
reed0ab326f2015-02-21 09:36:50 -080023 static SkEvent* NewShowSizeEvt(bool doShowSize);
reed@google.coma4f81372012-11-15 15:56:38 +000024
bsalomon@google.com48dd1a22011-10-31 14:18:20 +000025protected:
reed0ab326f2015-02-21 09:36:50 -080026 bool onQuery(SkEvent*) SK_OVERRIDE;
27 bool onEvent(const SkEvent&) SK_OVERRIDE;
28 void onDrawContent(SkCanvas*) SK_OVERRIDE;
29 void onDrawBackground(SkCanvas*) SK_OVERRIDE;
30 bool onAnimate(const SkAnimTimer&) SK_OVERRIDE;
reedd9adfe62015-02-01 19:01:04 -080031
bsalomon@google.com48dd1a22011-10-31 14:18:20 +000032private:
33 GM* fGM;
34 typedef SampleView INHERITED;
35};
36
37#endif