blob: 6424b43d25d9c4c46bc653e2a9bfec7d98fac0a8 [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*);
Brian Salomond3b65972017-03-22 12:05:03 -040021 ~GMSampleView() override;
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:
mtklein36352bf2015-03-25 18:17:31 -070026 bool onQuery(SkEvent*) override;
27 bool onEvent(const SkEvent&) override;
28 void onDrawContent(SkCanvas*) override;
29 void onDrawBackground(SkCanvas*) override;
30 bool onAnimate(const SkAnimTimer&) 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