diff options
author | 2017-06-27 10:48:20 -0400 | |
---|---|---|
committer | 2017-06-27 15:20:56 +0000 | |
commit | ca0b43803b45d6e24c13edb118cc3862bb00f7ae (patch) | |
tree | 08f0d21bc997bd4e5f150671005c9be7fd5f740c /src/jumper/SkJumper.cpp | |
parent | ed50200682e0de72c3abecaa4d5324ebcd1ed9f9 (diff) |
add dumbest possible 32-bit SkJumper backend
Everything uses a ton of stack, nothing tail calls, and for now this is
non-Windows only. But, it does run faster than the portable serial code.
On my trashcan, running `monobench SkRasterPipeline_compile`:
- Normal 64-bit AVX build: 43.6ns
- Before this CL, 32-bit: 707.9ns
- This CL: 147.5ns
Change-Id: I4a8929570ace47193ed8925c58b70bb22d6b1447
Reviewed-on: https://skia-review.googlesource.com/20964
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/jumper/SkJumper.cpp')
-rw-r--r-- | src/jumper/SkJumper.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/jumper/SkJumper.cpp b/src/jumper/SkJumper.cpp index 8c9eb73325..aa4b794347 100644 --- a/src/jumper/SkJumper.cpp +++ b/src/jumper/SkJumper.cpp @@ -155,6 +155,14 @@ extern "C" { #define M(st) StageFn ASM(st,ssse3_lowp); LOWP_STAGES(M) #undef M + +#elif defined(__i386__) + StartPipelineFn ASM(start_pipeline,sse2); + StageFn ASM(just_return,sse2); + #define M(st) StageFn ASM(st,sse2); + SK_RASTER_PIPELINE_STAGES(M) + #undef M + #endif // Portable, single-pixel stages. @@ -256,6 +264,17 @@ static SkJumper_Engine choose_engine() { #undef M }; } + +#elif defined(__i386__) + if (1 && SkCpu::Supports(SkCpu::SSE2)) { + return { + #define M(stage) ASM(stage, sse2), + { SK_RASTER_PIPELINE_STAGES(M) }, + M(start_pipeline) M(just_return) + #undef M + }; + } + #endif return kPortable; } |