2016-04-08 14:24:09 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef Slide_DEFINED
|
|
|
|
#define Slide_DEFINED
|
|
|
|
|
|
|
|
#include "SkRefCnt.h"
|
2016-04-21 14:59:44 +00:00
|
|
|
#include "SkSize.h"
|
2016-04-08 14:24:09 +00:00
|
|
|
#include "SkString.h"
|
|
|
|
|
|
|
|
class SkCanvas;
|
2016-04-08 19:51:45 +00:00
|
|
|
class SkAnimTimer;
|
2016-04-08 14:24:09 +00:00
|
|
|
|
|
|
|
class Slide : public SkRefCnt {
|
|
|
|
public:
|
|
|
|
virtual ~Slide() {}
|
|
|
|
|
2016-04-21 14:59:44 +00:00
|
|
|
virtual SkISize getDimensions() const = 0;
|
|
|
|
|
2016-04-08 14:24:09 +00:00
|
|
|
virtual void draw(SkCanvas* canvas) = 0;
|
2016-04-08 19:51:45 +00:00
|
|
|
virtual bool animate(const SkAnimTimer&) { return false; }
|
|
|
|
virtual void load() {}
|
|
|
|
virtual void unload() {}
|
|
|
|
|
2016-04-08 14:24:09 +00:00
|
|
|
SkString getName() { return fName; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
SkString fName;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|