aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/skottie/Skottie.h
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-05-04 15:10:54 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-04 19:58:13 +0000
commitfa7e9a813e44f283b14f686eeb857d0d00735811 (patch)
tree8524acb13c15e157b644379862292f0e2f910a40 /experimental/skottie/Skottie.h
parent0b0d93dbe432b6de4fd8df9a84e2ba3f2cc5b07e (diff)
[skottie] Switch to RapidJSON
- pull latest RapidJSON under third_party/externals/rapidjson (note: and older RS version is already pulled as part of angle2, and it is also checked in G3) - add a thin Json porting layer (SkottieJson) to isolate RS idiosyncrasies - convert Skottie to use the new helpers - parse the DOM in-place (based on local experiments this is the fastest method) Ta-da: Skottie now parses JSON ~10x faster! Change-Id: Ida9099638f88ed025fee83055c8cd8680ee27176 Reviewed-on: https://skia-review.googlesource.com/125744 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'experimental/skottie/Skottie.h')
-rw-r--r--experimental/skottie/Skottie.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/experimental/skottie/Skottie.h b/experimental/skottie/Skottie.h
index 44541fd81b..275127aa4e 100644
--- a/experimental/skottie/Skottie.h
+++ b/experimental/skottie/Skottie.h
@@ -11,8 +11,6 @@
#include "SkRefCnt.h"
#include "SkSize.h"
#include "SkString.h"
-#include "SkTArray.h"
-#include "SkTHash.h"
#include "SkTypes.h"
#include <memory>
@@ -21,12 +19,12 @@ class SkCanvas;
struct SkRect;
class SkStream;
-namespace Json { class Value; }
-
namespace sksg { class Scene; }
namespace skottie {
+namespace json { class ValueRef; }
+
class ResourceProvider : public SkNoncopyable {
public:
virtual ~ResourceProvider() = default;
@@ -63,9 +61,8 @@ public:
void setShowInval(bool show);
private:
- Animation(const ResourceProvider&,
- SkString ver, const SkSize& size, SkScalar fps,
- const Json::Value&, Stats*);
+ Animation(const ResourceProvider&, SkString ver, const SkSize& size, SkScalar fps,
+ const json::ValueRef&, Stats*);
SkString fVersion;
SkSize fSize;