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 SKPSlide_DEFINED
|
|
|
|
#define SKPSlide_DEFINED
|
|
|
|
|
|
|
|
#include "Slide.h"
|
|
|
|
#include "SkPicture.h"
|
|
|
|
|
|
|
|
class SKPSlide : public Slide {
|
|
|
|
public:
|
2016-04-08 19:51:45 +00:00
|
|
|
SKPSlide(const SkString& name, const SkString& path);
|
2016-04-08 14:24:09 +00:00
|
|
|
~SKPSlide() override;
|
|
|
|
|
2016-04-21 14:59:44 +00:00
|
|
|
SkISize getDimensions() const override { return fCullRect.size(); }
|
|
|
|
|
2016-04-08 14:24:09 +00:00
|
|
|
void draw(SkCanvas* canvas) override;
|
2016-06-16 16:52:35 +00:00
|
|
|
void load(SkScalar winWidth, SkScalar winHeight) override;
|
2016-04-08 19:51:45 +00:00
|
|
|
void unload() override;
|
2016-04-08 14:24:09 +00:00
|
|
|
|
|
|
|
private:
|
2016-04-08 19:51:45 +00:00
|
|
|
SkString fPath;
|
2016-04-08 14:24:09 +00:00
|
|
|
sk_sp<const SkPicture> fPic;
|
|
|
|
SkIRect fCullRect;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|