aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/skottie/SkottieParser.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/SkottieParser.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/SkottieParser.h')
-rw-r--r--experimental/skottie/SkottieParser.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/experimental/skottie/SkottieParser.h b/experimental/skottie/SkottieParser.h
deleted file mode 100644
index b805484cd0..0000000000
--- a/experimental/skottie/SkottieParser.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2018 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkottieParser_DEFINED
-#define SkottieParser_DEFINED
-
-namespace Json { class Value; }
-
-namespace skottie {
-
-template <typename T>
-bool Parse(const Json::Value&, T*);
-
-template <typename T>
-static inline T ParseDefault(const Json::Value& jv, const T& defaultValue) {
- T v;
- if (!Parse<T>(jv, &v))
- v = defaultValue;
- return v;
-}
-
-} // nasmespace skottie
-
-#endif // SkottieParser_DEFINED