aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/skottie/Skottie.h
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-05-26 09:49:28 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-27 02:21:33 +0000
commit3d856bdeee7fae2ff36cdb6a9807c588fc030eb1 (patch)
treeb26aa52b2d2f8877bdc7a7c647e4a34fd3e96f35 /experimental/skottie/Skottie.h
parentd8eb7b6b12d5b155214031d4aa4d8f582ebb91a1 (diff)
[skottie] Relocate to modules/skottie
TBR= Change-Id: I218d251ca56578a3a7fd4fb86cba9abdc10fb3bd Reviewed-on: https://skia-review.googlesource.com/130322 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/skottie/Skottie.h')
-rw-r--r--experimental/skottie/Skottie.h80
1 files changed, 0 insertions, 80 deletions
diff --git a/experimental/skottie/Skottie.h b/experimental/skottie/Skottie.h
deleted file mode 100644
index 0a89ca0438..0000000000
--- a/experimental/skottie/Skottie.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2017 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef Skottie_DEFINED
-#define Skottie_DEFINED
-
-#include "SkRefCnt.h"
-#include "SkSize.h"
-#include "SkString.h"
-#include "SkTypes.h"
-
-#include <memory>
-
-class SkCanvas;
-struct SkRect;
-class SkStream;
-
-namespace sksg { class Scene; }
-
-namespace skottie {
-
-namespace json { class ValueRef; }
-
-class SK_API ResourceProvider : public SkNoncopyable {
-public:
- virtual ~ResourceProvider() = default;
-
- virtual std::unique_ptr<SkStream> openStream(const char resource[]) const = 0;
-};
-
-class SK_API Animation : public SkRefCnt {
-public:
- struct Stats {
- float fTotalLoadTimeMS,
- fJsonParseTimeMS,
- fSceneParseTimeMS;
- size_t fJsonSize,
- fAnimatorCount;
- };
-
- static sk_sp<Animation> Make(SkStream*, const ResourceProvider&, Stats* = nullptr);
- static sk_sp<Animation> MakeFromFile(const char path[], const ResourceProvider* = nullptr,
- Stats* = nullptr);
-
- ~Animation() override;
-
- void render(SkCanvas*, const SkRect* dst = nullptr) const;
-
- void animationTick(SkMSec);
-
- const SkString& version() const { return fVersion; }
- const SkSize& size() const { return fSize; }
- SkScalar frameRate() const { return fFrameRate; }
- SkScalar inPoint() const { return fInPoint; }
- SkScalar outPoint() const { return fOutPoint; }
-
- void setShowInval(bool show);
-
-private:
- Animation(const ResourceProvider&, SkString ver, const SkSize& size, SkScalar fps,
- const json::ValueRef&, Stats*);
-
- SkString fVersion;
- SkSize fSize;
- SkScalar fFrameRate,
- fInPoint,
- fOutPoint;
-
- std::unique_ptr<sksg::Scene> fScene;
-
- typedef SkRefCnt INHERITED;
-};
-
-} // namespace skottie
-
-#endif // Skottie_DEFINED