2011-10-31 14:18:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GMSampleView_DEFINED
|
|
|
|
#define GMSampleView_DEFINED
|
|
|
|
|
|
|
|
#include "SampleCode.h"
|
|
|
|
#include "gm.h"
|
|
|
|
|
|
|
|
class GMSampleView : public SampleView {
|
|
|
|
private:
|
2012-11-15 15:56:38 +00:00
|
|
|
bool fShowSize;
|
2011-10-31 14:18:20 +00:00
|
|
|
typedef skiagm::GM GM;
|
|
|
|
|
|
|
|
public:
|
2015-02-21 17:36:50 +00:00
|
|
|
GMSampleView(GM*);
|
2017-03-22 16:05:03 +00:00
|
|
|
~GMSampleView() override;
|
2012-08-23 18:19:56 +00:00
|
|
|
|
2015-02-21 17:36:50 +00:00
|
|
|
static SkEvent* NewShowSizeEvt(bool doShowSize);
|
2012-11-15 15:56:38 +00:00
|
|
|
|
2011-10-31 14:18:20 +00:00
|
|
|
protected:
|
2015-03-26 01:17:31 +00:00
|
|
|
bool onQuery(SkEvent*) override;
|
|
|
|
bool onEvent(const SkEvent&) override;
|
|
|
|
void onDrawContent(SkCanvas*) override;
|
|
|
|
void onDrawBackground(SkCanvas*) override;
|
|
|
|
bool onAnimate(const SkAnimTimer&) override;
|
2015-02-02 03:01:04 +00:00
|
|
|
|
2011-10-31 14:18:20 +00:00
|
|
|
private:
|
|
|
|
GM* fGM;
|
|
|
|
typedef SampleView INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|