aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn39
-rw-r--r--modules/skottie/BUILD.gn49
-rw-r--r--modules/skottie/fuzz/FuzzSkottieJSON.cpp (renamed from fuzz/oss_fuzz/FuzzSkottieJSON.cpp)0
-rw-r--r--modules/skottie/include/Skottie.h (renamed from experimental/skottie/Skottie.h)0
-rw-r--r--modules/skottie/src/Skottie.cpp (renamed from experimental/skottie/Skottie.cpp)0
-rw-r--r--modules/skottie/src/SkottieAdapter.cpp (renamed from experimental/skottie/SkottieAdapter.cpp)0
-rw-r--r--modules/skottie/src/SkottieAdapter.h (renamed from experimental/skottie/SkottieAdapter.h)0
-rw-r--r--modules/skottie/src/SkottieAnimator.cpp (renamed from experimental/skottie/SkottieAnimator.cpp)0
-rw-r--r--modules/skottie/src/SkottieAnimator.h (renamed from experimental/skottie/SkottieAnimator.h)0
-rw-r--r--modules/skottie/src/SkottieJson.cpp (renamed from experimental/skottie/SkottieJson.cpp)0
-rw-r--r--modules/skottie/src/SkottieJson.h (renamed from experimental/skottie/SkottieJson.h)0
-rw-r--r--modules/skottie/src/SkottieValue.cpp (renamed from experimental/skottie/SkottieValue.cpp)0
-rw-r--r--modules/skottie/src/SkottieValue.h (renamed from experimental/skottie/SkottieValue.h)0
-rw-r--r--third_party/rapidjson/BUILD.gn1
-rw-r--r--tools/viewer/SkottieSlide.cpp4
-rw-r--r--tools/viewer/SkottieSlide.h4
16 files changed, 62 insertions, 35 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 7ae0f6d600..d0c6755555 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -39,7 +39,6 @@ declare_args() {
skia_enable_fontmgr_empty = false
skia_enable_gpu = true
skia_enable_pdf = true
- skia_enable_skottie = true
skia_enable_spirv_validation = is_skia_dev_build && is_debug
skia_enable_tools = is_skia_dev_build
skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug
@@ -1013,8 +1012,7 @@ if (skia_enable_tools) {
public_configs = [ ":skia.h_config" ]
skia_h = "$target_gen_dir/skia.h"
script = "gn/find_headers.py"
- args = [ rebase_path("//bin/gn") ] +
- [ rebase_path("//") ] +
+ args = [ rebase_path("//bin/gn") ] + [ rebase_path("//") ] +
[ rebase_path(skia_h, root_build_dir) ] +
rebase_path(skia_public_includes)
depfile = "$skia_h.deps"
@@ -1420,26 +1418,6 @@ if (skia_enable_tools) {
]
}
- test_lib("experimental_skottie") {
- public_include_dirs = []
- if (skia_enable_skottie) {
- public_include_dirs += [ "experimental/skottie" ]
- public_defines = [ "SK_ENABLE_SKOTTIE" ]
- sources = [
- "experimental/skottie/Skottie.cpp",
- "experimental/skottie/SkottieAdapter.cpp",
- "experimental/skottie/SkottieAnimator.cpp",
- "experimental/skottie/SkottieJson.cpp",
- "experimental/skottie/SkottieValue.cpp",
- ]
- deps = [
- ":skia",
- "modules/sksg",
- "//third_party/rapidjson",
- ]
- }
- }
-
test_lib("experimental_svg_model") {
public_include_dirs = []
if (skia_use_expat) {
@@ -1582,7 +1560,6 @@ if (skia_enable_tools) {
include_dirs = [ "tests" ]
deps = [
":common_flags",
- ":experimental_skottie",
":experimental_svg_model",
":flags",
":gm",
@@ -1591,6 +1568,7 @@ if (skia_enable_tools) {
":tests",
":third_party_skcms",
":tool_utils",
+ "modules/skottie",
"modules/sksg",
"//third_party/jsoncpp",
"//third_party/libpng",
@@ -1790,17 +1768,13 @@ if (skia_enable_tools) {
"tools/picture_utils.cpp",
]
deps = [
- ":experimental_skottie",
":flags",
":gpu_tool_utils",
":skia",
+ "modules/skottie:fuzz",
"//third_party/jsoncpp",
"//third_party/libpng",
]
-
- if (skia_enable_skottie) {
- sources += [ "fuzz/oss_fuzz/FuzzSkottieJSON.cpp" ]
- }
}
test_app("pathops_unittest") {
@@ -2023,6 +1997,7 @@ if (skia_enable_tools) {
"tools/viewer/ImageSlide.cpp",
"tools/viewer/SKPSlide.cpp",
"tools/viewer/SampleSlide.cpp",
+ "tools/viewer/SkottieSlide.cpp",
"tools/viewer/SlideDir.cpp",
"tools/viewer/StatsLayer.cpp",
"tools/viewer/SvgSlide.cpp",
@@ -2041,15 +2016,11 @@ if (skia_enable_tools) {
":skia",
":tool_utils",
":views",
+ "modules/skottie",
"modules/sksg",
"//third_party/imgui",
"//third_party/jsoncpp",
]
-
- if (skia_enable_skottie) {
- sources += [ "tools/viewer/SkottieSlide.cpp" ]
- deps += [ ":experimental_skottie" ]
- }
}
}
diff --git a/modules/skottie/BUILD.gn b/modules/skottie/BUILD.gn
new file mode 100644
index 0000000000..b3c532c00c
--- /dev/null
+++ b/modules/skottie/BUILD.gn
@@ -0,0 +1,49 @@
+# Copyright 2018 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+declare_args() {
+ skia_enable_skottie = true
+}
+
+config("public_config") {
+ if (skia_enable_skottie) {
+ defines = [ "SK_ENABLE_SKOTTIE" ]
+ include_dirs = [ "include" ]
+ }
+}
+
+source_set("skottie") {
+ if (skia_enable_skottie) {
+ public_configs = [ ":public_config" ]
+ sources = [
+ "src/Skottie.cpp",
+ "src/SkottieAdapter.cpp",
+ "src/SkottieAnimator.cpp",
+ "src/SkottieJson.cpp",
+ "src/SkottieValue.cpp",
+ ]
+ configs += [ "../../:skia_private" ]
+ deps = [
+ "../..:skia",
+ "../../third_party/rapidjson",
+ "../sksg:sksg",
+ ]
+ }
+}
+
+source_set("fuzz") {
+ if (skia_enable_skottie) {
+ testonly = true
+
+ configs += [ "../..:skia_private" ]
+ sources = [
+ "fuzz/FuzzSkottieJSON.cpp",
+ ]
+ deps = [
+ ":skottie",
+ "../..:skia", # TODO: refactor to make this nicer
+ ]
+ }
+}
diff --git a/fuzz/oss_fuzz/FuzzSkottieJSON.cpp b/modules/skottie/fuzz/FuzzSkottieJSON.cpp
index e4f19ccad7..e4f19ccad7 100644
--- a/fuzz/oss_fuzz/FuzzSkottieJSON.cpp
+++ b/modules/skottie/fuzz/FuzzSkottieJSON.cpp
diff --git a/experimental/skottie/Skottie.h b/modules/skottie/include/Skottie.h
index 0a89ca0438..0a89ca0438 100644
--- a/experimental/skottie/Skottie.h
+++ b/modules/skottie/include/Skottie.h
diff --git a/experimental/skottie/Skottie.cpp b/modules/skottie/src/Skottie.cpp
index 8396b5ba90..8396b5ba90 100644
--- a/experimental/skottie/Skottie.cpp
+++ b/modules/skottie/src/Skottie.cpp
diff --git a/experimental/skottie/SkottieAdapter.cpp b/modules/skottie/src/SkottieAdapter.cpp
index a01599ccf6..a01599ccf6 100644
--- a/experimental/skottie/SkottieAdapter.cpp
+++ b/modules/skottie/src/SkottieAdapter.cpp
diff --git a/experimental/skottie/SkottieAdapter.h b/modules/skottie/src/SkottieAdapter.h
index e96c616fcf..e96c616fcf 100644
--- a/experimental/skottie/SkottieAdapter.h
+++ b/modules/skottie/src/SkottieAdapter.h
diff --git a/experimental/skottie/SkottieAnimator.cpp b/modules/skottie/src/SkottieAnimator.cpp
index 4554409761..4554409761 100644
--- a/experimental/skottie/SkottieAnimator.cpp
+++ b/modules/skottie/src/SkottieAnimator.cpp
diff --git a/experimental/skottie/SkottieAnimator.h b/modules/skottie/src/SkottieAnimator.h
index 6dc8f6c759..6dc8f6c759 100644
--- a/experimental/skottie/SkottieAnimator.h
+++ b/modules/skottie/src/SkottieAnimator.h
diff --git a/experimental/skottie/SkottieJson.cpp b/modules/skottie/src/SkottieJson.cpp
index 23e616d1ea..23e616d1ea 100644
--- a/experimental/skottie/SkottieJson.cpp
+++ b/modules/skottie/src/SkottieJson.cpp
diff --git a/experimental/skottie/SkottieJson.h b/modules/skottie/src/SkottieJson.h
index 76e17c610e..76e17c610e 100644
--- a/experimental/skottie/SkottieJson.h
+++ b/modules/skottie/src/SkottieJson.h
diff --git a/experimental/skottie/SkottieValue.cpp b/modules/skottie/src/SkottieValue.cpp
index edfa891aa1..edfa891aa1 100644
--- a/experimental/skottie/SkottieValue.cpp
+++ b/modules/skottie/src/SkottieValue.cpp
diff --git a/experimental/skottie/SkottieValue.h b/modules/skottie/src/SkottieValue.h
index cfdbd7aba7..cfdbd7aba7 100644
--- a/experimental/skottie/SkottieValue.h
+++ b/modules/skottie/src/SkottieValue.h
diff --git a/third_party/rapidjson/BUILD.gn b/third_party/rapidjson/BUILD.gn
index c506f038fb..f9e50b2686 100644
--- a/third_party/rapidjson/BUILD.gn
+++ b/third_party/rapidjson/BUILD.gn
@@ -9,5 +9,4 @@ third_party("rapidjson") {
public_include_dirs = [ "../externals/rapidjson/include" ]
defines = [ "RAPIDJSON_HAS_CXX11_RVALUE_REFS=1" ]
sources = []
- testonly = true
}
diff --git a/tools/viewer/SkottieSlide.cpp b/tools/viewer/SkottieSlide.cpp
index 78cda5cbda..f009066182 100644
--- a/tools/viewer/SkottieSlide.cpp
+++ b/tools/viewer/SkottieSlide.cpp
@@ -7,6 +7,8 @@
#include "SkottieSlide.h"
+#if defined(SK_ENABLE_SKOTTIE)
+
#include "SkAnimTimer.h"
#include "SkCanvas.h"
#include "Skottie.h"
@@ -130,3 +132,5 @@ bool SkottieSlide::onMouse(SkScalar x, SkScalar y, sk_app::Window::InputState st
return false;
}
+
+#endif // SK_ENABLE_SKOTTIE
diff --git a/tools/viewer/SkottieSlide.h b/tools/viewer/SkottieSlide.h
index 0bfe66eef4..9ed4d78c8b 100644
--- a/tools/viewer/SkottieSlide.h
+++ b/tools/viewer/SkottieSlide.h
@@ -9,6 +9,8 @@
#define SkottieSlide_DEFINED
#include "Slide.h"
+
+#if defined(SK_ENABLE_SKOTTIE)
#include "Skottie.h"
namespace sksg { class Scene; }
@@ -41,4 +43,6 @@ private:
typedef Slide INHERITED;
};
+#endif // SK_ENABLE_SKOTTIE
+
#endif // SkottieSlide_DEFINED