aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Nico Weber <thakis@chromium.org>2017-09-15 17:38:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-16 00:28:48 +0000
commit6492afa7971cf295a3c3cb92a85218917c02bb4a (patch)
tree713e3d9ab7ca9aae118f2a85520842ce6622cbcd /src
parentd286bfbd96f8b7ccf1cbce74f07d2f3917dbec30 (diff)
Disable SkJumper assembly in cross builds for now.
Bug: chromium:762167 Change-Id: Ia23f6dbfc0466aef4ca9d1a5b9ff343d79dc83bb Reviewed-on: https://skia-review.googlesource.com/47460 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/jumper/SkJumper.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/jumper/SkJumper.cpp b/src/jumper/SkJumper.cpp
index 22d6e086d4..cd013f7ae3 100644
--- a/src/jumper/SkJumper.cpp
+++ b/src/jumper/SkJumper.cpp
@@ -17,13 +17,21 @@
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif
+#if !defined(SK_JUMPER_USE_ASSEMBLY)
+#if __has_feature(memory_sanitizer)
+#define SK_JUMPER_USE_ASSEMBLY 0
+#else
+#define SK_JUMPER_USE_ASSEMBLY 1
+#endif
+#endif
#define M(st) +1
static const int kNumStages = SK_RASTER_PIPELINE_STAGES(M);
#undef M
#ifndef SK_JUMPER_DISABLE_8BIT
- #if 0 && !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64))
+ // Intentionally commented out; optional logging for local debugging.
+ #if 0 && SK_JUMPER_USE_ASSEMBLY && (defined(__x86_64__) || defined(_M_X64))
#include <atomic>
#define M(st) #st,
@@ -102,7 +110,7 @@ using StartPipelineFn = void(size_t,size_t,size_t,size_t, void**);
extern "C" {
-#if __has_feature(memory_sanitizer)
+#if !SK_JUMPER_USE_ASSEMBLY
// We'll just run baseline code.
#elif defined(__arm__)
@@ -172,7 +180,8 @@ extern "C" {
}
-#if !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64))
+#if SK_JUMPER_USE_ASSEMBLY
+#if defined(__x86_64__) || defined(_M_X64)
template <SkRasterPipeline::StockStage st>
static constexpr StageFn* hsw_lowp() { return nullptr; }
@@ -217,6 +226,7 @@ extern "C" {
LOWP_STAGES(M)
#undef M
#endif
+#endif
// Engines comprise everything we need to run SkRasterPipelines.
struct SkJumper_Engine {
@@ -237,7 +247,7 @@ static SkJumper_Engine gEngine = kBaseline;
static SkOnce gChooseEngineOnce;
static SkJumper_Engine choose_engine() {
-#if __has_feature(memory_sanitizer)
+#if !SK_JUMPER_USE_ASSEMBLY
// We'll just run baseline code.
#elif defined(__arm__)
@@ -316,7 +326,8 @@ static SkJumper_Engine choose_engine() {
static SkOnce gChooseLowpOnce;
static SkJumper_Engine choose_lowp() {
- #if !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64))
+ #if SK_JUMPER_USE_ASSEMBLY
+ #if defined(__x86_64__) || defined(_M_X64)
if (1 && SkCpu::Supports(SkCpu::HSW)) {
return {
#define M(st) hsw_lowp<SkRasterPipeline::st>(),
@@ -364,6 +375,7 @@ static SkJumper_Engine choose_engine() {
#undef M
};
#endif
+ #endif
return kNone;
}
#endif