aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/skottie/SkottieValue.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/SkottieValue.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/SkottieValue.h')
-rw-r--r--experimental/skottie/SkottieValue.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/experimental/skottie/SkottieValue.h b/experimental/skottie/SkottieValue.h
deleted file mode 100644
index cfdbd7aba7..0000000000
--- a/experimental/skottie/SkottieValue.h
+++ /dev/null
@@ -1,64 +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 SkottieValue_DEFINED
-#define SkottieValue_DEFINED
-
-#include "SkPath.h"
-#include "SkScalar.h"
-
-#include <vector>
-
-namespace skottie {
-
-template <typename T>
-struct ValueTraits {
- static size_t Cardinality(const T&);
-
- template <typename U>
- static U As(const T&);
-
- static T Lerp(const T&, const T&, float);
-};
-
-using ScalarValue = SkScalar;
-using VectorValue = std::vector<ScalarValue>;
-
-struct BezierVertex {
- SkPoint fInPoint, // "in" control point, relative to the vertex
- fOutPoint, // "out" control point, relative to the vertex
- fVertex;
-
- bool operator==(const BezierVertex& other) const {
- return fInPoint == other.fInPoint
- && fOutPoint == other.fOutPoint
- && fVertex == other.fVertex;
- }
-
- bool operator!=(const BezierVertex& other) const { return !(*this == other); }
-};
-
-struct ShapeValue {
- std::vector<BezierVertex> fVertices;
- bool fClosed : 1,
- fVolatile : 1;
-
- ShapeValue() : fClosed(false), fVolatile(false) {}
- ShapeValue(const ShapeValue&) = default;
- ShapeValue(ShapeValue&&) = default;
- ShapeValue& operator=(const ShapeValue&) = default;
-
- bool operator==(const ShapeValue& other) const {
- return fVertices == other.fVertices && fClosed == other.fClosed;
- }
-
- bool operator!=(const ShapeValue& other) const { return !(*this == other); }
-};
-
-} // namespace skottie
-
-#endif // SkottieValue_DEFINED