aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/skottie/SkottieAnimator.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/SkottieAnimator.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/SkottieAnimator.h')
-rw-r--r--experimental/skottie/SkottieAnimator.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/experimental/skottie/SkottieAnimator.h b/experimental/skottie/SkottieAnimator.h
index 77be06b809..6dc8f6c759 100644
--- a/experimental/skottie/SkottieAnimator.h
+++ b/experimental/skottie/SkottieAnimator.h
@@ -12,14 +12,14 @@
#include <functional>
-namespace Json { class Value; }
-
namespace skottie {
+namespace json { class ValueRef; }
+
// This is the workhorse for property binding: depending on whether the property is animated,
// it will either apply immediately or instantiate and attach a keyframe animator.
template <typename T>
-bool BindProperty(const Json::Value&,
+bool BindProperty(const json::ValueRef&,
sksg::AnimatorList*,
std::function<void(const T&)>&&,
const T* noop = nullptr);