Add a full build option for SkottieKit

Change-Id: Iff6863bfb243a28b83455b72936f4b168572f7a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299679
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/experimental/skottiekit/CHANGELOG.md b/experimental/skottiekit/CHANGELOG.md
new file mode 100644
index 0000000..3687188
--- /dev/null
+++ b/experimental/skottiekit/CHANGELOG.md
@@ -0,0 +1,9 @@
+# SkottieKit Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+Beginning of Changelog history
diff --git a/experimental/skottiekit/Makefile b/experimental/skottiekit/Makefile
index 083a0df..6e79b11 100644
--- a/experimental/skottiekit/Makefile
+++ b/experimental/skottiekit/Makefile
@@ -24,10 +24,16 @@
 	cp ../../out/skottiekit/skottiekit.js       ./examples/bin
 	cp ../../out/skottiekit/skottiekit.wasm     ./examples/bin
 
+release_full: clean_examples
+	# Does an incremental build where possible.
+	./compile.sh full-build
+	cp ../../out/skottiekit/skottiekit.js       ./examples/bin
+	cp ../../out/skottiekit/skottiekit.wasm     ./examples/bin
+
 clean_examples:
 	rm -f ./examples/bin/*
 	mkdir -p ./examples/bin
 
 serve:
 	echo "Go check out http://localhost:8001/"
-	cd examples && python ../serve.py
\ No newline at end of file
+	cd examples && python ../serve.py
diff --git a/experimental/skottiekit/compile.sh b/experimental/skottiekit/compile.sh
index 1f4181c..e439ce8 100755
--- a/experimental/skottiekit/compile.sh
+++ b/experimental/skottiekit/compile.sh
@@ -30,15 +30,48 @@
 EXTRA_CFLAGS="\"-DSK_RELEASE\", \"-DGR_GL_CHECK_ALLOC_WITH_GET_ERROR=0\",\"-DSK_DISABLE_TRACING\""
 IS_OFFICIAL_BUILD="true"
 
+if [[ $@ == *full-build* ]]; then
+  # Full Skottie with all bells and whistles.
+  BUILD_TYPE="full"
+  BUILD_CFG="\
+    skia_enable_fontmgr_custom_empty=true \
+    skia_use_freetype=true \
+    skia_use_libgifcodec=true \
+    skia_use_harfbuzz=true \
+    skia_use_icu=true \
+    skia_use_libpng_decode=true \
+    skia_use_wuffs=true \
+    skia_use_zlib=true \
+    \
+    skia_use_system_freetype2=false \
+    skia_use_system_harfbuzz=false \
+    skia_use_system_icu=false \
+    skia_use_system_libpng=false \
+    skia_use_system_zlib=false\
+  "
+else
+  # Smallest usable Skottie.
+  BUILD_TYPE="minimal"
+  BUILD_CFG="\
+    skia_enable_fontmgr_custom_empty=false \
+    skia_use_freetype=false \
+    skia_use_libgifcodec=false \
+    skia_use_harfbuzz=false \
+    skia_use_icu=false \
+    skia_use_libpng_decode=false \
+    skia_use_wuffs=false \
+    skia_use_zlib=false \
+  "
+fi
 
 if [[ $@ == *debug* ]]; then
-  echo "Building a Debug build"
+  echo "Building a *${BUILD_TYPE}* Debug build"
   EXTRA_CFLAGS="\"-DSK_DEBUG\""
   RELEASE_CONF="-O0 --js-opts 0 -s DEMANGLE_SUPPORT=1 -s ASSERTIONS=1 -s GL_ASSERTIONS=1 -g4 \
                 --source-map-base /bin/ -DSK_DEBUG --pre-js $BASE_DIR/debug.js"
   BUILD_DIR=${BUILD_DIR:="out/skottiekit_debug"}
 elif [[ $@ == *profiling* ]]; then
-  echo "Building a build for profiling"
+  echo "Building a *${BUILD_TYPE}* build for profiling"
   RELEASE_CONF+=" --profiling-funcs --closure 0"
   BUILD_DIR=${BUILD_DIR:="out/skottiekit_profile"}
 else
@@ -107,19 +140,15 @@
   werror=true \
   target_cpu=\"wasm\" \
   \
+  ${BUILD_CFG} \
   skia_use_angle=false \
   skia_use_dng_sdk=false \
   skia_use_egl=true \
   skia_use_expat=false \
   skia_use_fontconfig=false \
-  skia_use_freetype=false \
-  skia_use_harfbuzz=false \
-  skia_use_icu=false \
-  skia_use_libgifcodec=false \
   skia_use_libheif=false \
   skia_use_libjpeg_turbo_decode=true \
   skia_use_libjpeg_turbo_encode=false \
-  skia_use_libpng_decode=false \
   skia_use_libpng_encode=false \
   skia_use_libwebp_decode=false \
   skia_use_libwebp_encode=false \
@@ -127,12 +156,9 @@
   skia_use_piex=false \
   skia_use_system_libjpeg_turbo=false \
   skia_use_vulkan=false \
-  skia_use_wuffs=false \
-  skia_use_zlib=false \
   skia_enable_fontmgr_empty=true \
   skia_enable_fontmgr_custom_directory=false \
   skia_enable_fontmgr_custom_embedded=false \
-  skia_enable_fontmgr_custom_empty=false \
   skia_enable_sksl_interpreter=false \
   \
   ${GN_GPU} \