aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn12
-rw-r--r--gn/core.gni4
-rw-r--r--gn/gn_to_bp.py1
-rw-r--r--src/core/SkRasterPipeline.cpp2
4 files changed, 15 insertions, 4 deletions
diff --git a/BUILD.gn b/BUILD.gn
index d5c7bc76a6..a4e4a2ed18 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -30,6 +30,7 @@ declare_args() {
skia_enable_android_framework_defines = false
skia_enable_discrete_gpu = true
skia_enable_effects = true
+ skia_enable_jumper = is_skia_dev_build
skia_enable_gpu = true
skia_enable_pdf = true
skia_enable_tools = is_skia_dev_build
@@ -499,6 +500,16 @@ optional("raw") {
]
}
+optional("jumper") {
+ enabled = skia_enable_jumper
+ public_defines = [ "SK_JUMPER" ]
+ sources = [
+ "src/jumper/SkJumper.cpp",
+ "src/jumper/SkJumper_generated.cpp",
+ "src/jumper/SkJumper_stages.cpp",
+ ]
+}
+
optional("typeface_freetype") {
enabled = skia_use_freetype
@@ -558,6 +569,7 @@ component("skia") {
":gpu",
":hsw",
":jpeg",
+ ":jumper",
":none",
":pdf",
":png",
diff --git a/gn/core.gni b/gn/core.gni
index 56dd13feeb..3b71c45f49 100644
--- a/gn/core.gni
+++ b/gn/core.gni
@@ -381,10 +381,6 @@ skia_core_sources = [
# "$_src/image/SkSurface_Gpu.cpp",
"$_src/image/SkSurface_Raster.cpp",
- "$_src/jumper/SkJumper.cpp",
- "$_src/jumper/SkJumper_generated.cpp",
- "$_src/jumper/SkJumper_stages.cpp",
-
"$_src/pipe/SkPipeCanvas.cpp",
"$_src/pipe/SkPipeReader.cpp",
diff --git a/gn/gn_to_bp.py b/gn/gn_to_bp.py
index c8c7079a89..487bdffd1e 100644
--- a/gn/gn_to_bp.py
+++ b/gn/gn_to_bp.py
@@ -192,6 +192,7 @@ cc_test {
# We'll run GN to get the main source lists and include directories for Skia.
gn_args = {
'is_official_build': 'true',
+ 'skia_enable_jumper': 'true',
'skia_enable_tools': 'true',
'skia_use_vulkan': 'true',
'target_cpu': '"none"',
diff --git a/src/core/SkRasterPipeline.cpp b/src/core/SkRasterPipeline.cpp
index 3e3fe3bd85..42f0212f1a 100644
--- a/src/core/SkRasterPipeline.cpp
+++ b/src/core/SkRasterPipeline.cpp
@@ -22,9 +22,11 @@ void SkRasterPipeline::extend(const SkRasterPipeline& src) {
void SkRasterPipeline::run(size_t x, size_t n) const {
if (!fStages.empty()) {
+ #if defined(SK_JUMPER)
if (this->run_with_jumper(x, n)) {
return;
}
+ #endif
SkOpts::run_pipeline(x,n, fStages.data(), SkToInt(fStages.size()));
}
}