remove conditional flags for sksg -- not needed for a module
Bug: skia:
Change-Id: I1b73379bd8a1ba2cd4293180052ba7ad59dfe96f
Reviewed-on: https://skia-review.googlesource.com/144642
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/modules/sksg/BUILD.gn b/modules/sksg/BUILD.gn
index 5fb45bc..bb0561c 100644
--- a/modules/sksg/BUILD.gn
+++ b/modules/sksg/BUILD.gn
@@ -3,74 +3,63 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-declare_args() {
- skia_enable_sksg = true
-}
-
config("public_config") {
- if (skia_enable_sksg) {
- defines = [ "SK_HAS_SKSG" ]
- include_dirs = [ "include" ]
- }
+ include_dirs = [ "include" ]
}
source_set("sksg") {
- if (skia_enable_sksg) {
- public_configs = [ ":public_config" ]
- sources = [
- "src/SkSGClipEffect.cpp",
- "src/SkSGColor.cpp",
- "src/SkSGDraw.cpp",
- "src/SkSGEffectNode.cpp",
- "src/SkSGGeometryNode.cpp",
- "src/SkSGGeometryTransform.cpp",
- "src/SkSGGradient.cpp",
- "src/SkSGGroup.cpp",
- "src/SkSGImage.cpp",
- "src/SkSGInvalidationController.cpp",
- "src/SkSGMaskEffect.cpp",
- "src/SkSGMerge.cpp",
- "src/SkSGNode.cpp",
- "src/SkSGOpacityEffect.cpp",
- "src/SkSGPaintNode.cpp",
- "src/SkSGPath.cpp",
- "src/SkSGPlane.cpp",
- "src/SkSGRect.cpp",
- "src/SkSGRenderNode.cpp",
- "src/SkSGRoundEffect.cpp",
- "src/SkSGScene.cpp",
- "src/SkSGText.cpp",
- "src/SkSGTransform.cpp",
- "src/SkSGTrimEffect.cpp",
- ]
- configs += [ "../../:skia_private" ]
- deps = [
- "../..:skia",
- ]
- }
+ public_configs = [ ":public_config" ]
+ sources = [
+ "src/SkSGClipEffect.cpp",
+ "src/SkSGColor.cpp",
+ "src/SkSGDraw.cpp",
+ "src/SkSGEffectNode.cpp",
+ "src/SkSGGeometryNode.cpp",
+ "src/SkSGGeometryTransform.cpp",
+ "src/SkSGGradient.cpp",
+ "src/SkSGGroup.cpp",
+ "src/SkSGImage.cpp",
+ "src/SkSGInvalidationController.cpp",
+ "src/SkSGMaskEffect.cpp",
+ "src/SkSGMerge.cpp",
+ "src/SkSGNode.cpp",
+ "src/SkSGOpacityEffect.cpp",
+ "src/SkSGPaintNode.cpp",
+ "src/SkSGPath.cpp",
+ "src/SkSGPlane.cpp",
+ "src/SkSGRect.cpp",
+ "src/SkSGRenderNode.cpp",
+ "src/SkSGRoundEffect.cpp",
+ "src/SkSGScene.cpp",
+ "src/SkSGText.cpp",
+ "src/SkSGTransform.cpp",
+ "src/SkSGTrimEffect.cpp",
+ ]
+ configs += [ "../../:skia_private" ]
+ deps = [
+ "../..:skia",
+ ]
}
source_set("tests") {
- if (skia_enable_sksg) {
- testonly = true
+ testonly = true
- configs += [
- "../..:skia_private",
- "../..:tests_config", # TODO: refactor to make this nicer
- ]
- sources = [
- "tests/SGTest.cpp",
- ]
- deps = [
- ":sksg",
- "../..:gpu_tool_utils", # TODO: refactor to make this nicer
- "../..:skia",
- ]
- }
+ configs += [
+ "../..:skia_private",
+ "../..:tests_config", # TODO: refactor to make this nicer
+ ]
+ sources = [
+ "tests/SGTest.cpp",
+ ]
+ deps = [
+ ":sksg",
+ "../..:gpu_tool_utils", # TODO: refactor to make this nicer
+ "../..:skia",
+ ]
}
source_set("samples") {
- if (skia_enable_sksg && target_cpu != "wasm") { # TODO: clean up wasm test
+ if (target_cpu != "wasm") { # TODO: clean up wasm test
testonly = true
configs += [
diff --git a/tools/viewer/SlideDir.cpp b/tools/viewer/SlideDir.cpp
index 0cc1230..517d823 100644
--- a/tools/viewer/SlideDir.cpp
+++ b/tools/viewer/SlideDir.cpp
@@ -7,8 +7,6 @@
#include "SlideDir.h"
-#ifdef SK_HAS_SKSG
-
#include "SkAnimTimer.h"
#include "SkCanvas.h"
#include "SkCubicMap.h"
@@ -422,5 +420,3 @@
return idx < fRecs.count() ? &fRecs[idx] : nullptr;
}
-
-#endif // SK_HAS_SKSG
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index b5a9084..94db6f7 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -43,9 +43,7 @@
#include <stdlib.h>
#include <map>
-#if defined(SK_HAS_SKSG)
- #include "SlideDir.h"
-#endif
+#include "SlideDir.h"
#if defined(SK_ENABLE_SKOTTIE)
#include "SkottieSlide.h"
@@ -634,14 +632,12 @@
addSlide(name, SkOSPath::Join(flag.c_str(), name.c_str()), info.fFactory);
}
}
-#if defined(SK_HAS_SKSG)
if (!dirSlides.empty()) {
fSlides.push_back(
sk_make_sp<SlideDir>(SkStringPrintf("%s[%s]", info.fDirName, flag.c_str()),
std::move(dirSlides)));
dirSlides.reset();
}
-#endif
}
}
}