diff options
author | Mike Klein <mtklein@chromium.org> | 2016-10-25 10:27:33 -0400 |
---|---|---|
committer | Mike Klein <mtklein@chromium.org> | 2016-10-25 17:30:38 +0000 |
commit | aebfb45104eeb6dab5dbbedda13c2eaa7b7f7868 (patch) | |
tree | 7dcbf9bf86bd1b9fad0048dccbabb11e47a1d3fb /src/opts/SkOpts_hsw.cpp | |
parent | cc813ae9a0afe4259f12b655d9336662a6e2c100 (diff) |
Move SkRasterPipeline further into SkOpts.
The portable code now becomes entirely focused on enum+ptr descriptions, leaving the concrete implementation of the pipeline to SkOpts::run_pipeline().
As implemented, the concrete implementation is basically the same, with a little more type safety.
Speed is essentially unchanged on my laptop, and that's having run_pipeline() rebuild its concrete state every call. There's room for improvement there if we split this into a compile_pipeline() / run_pipeline() sort of thing, which is my next planned CL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3920
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: Ie4c554f51040426de7c5c144afa5d9d9d8938012
Reviewed-on: https://skia-review.googlesource.com/3920
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/opts/SkOpts_hsw.cpp')
-rw-r--r-- | src/opts/SkOpts_hsw.cpp | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/src/opts/SkOpts_hsw.cpp b/src/opts/SkOpts_hsw.cpp index 3c5d19d47c..55fe045a56 100644 --- a/src/opts/SkOpts_hsw.cpp +++ b/src/opts/SkOpts_hsw.cpp @@ -12,61 +12,7 @@ namespace SkOpts { void Init_hsw() { - - run_pipeline = SK_OPTS_NS::run_pipeline; - - #define STAGE(stage) \ - body[SkRasterPipeline::stage] = (SkOpts::VoidFn)SK_OPTS_NS::stage; \ - tail[SkRasterPipeline::stage] = (SkOpts::VoidFn)SK_OPTS_NS::stage##_tail - - STAGE(store_565); - STAGE(store_srgb); - STAGE(store_f16); - - STAGE(load_s_565); - STAGE(load_s_srgb); - STAGE(load_s_f16); - - STAGE(load_d_565); - STAGE(load_d_srgb); - STAGE(load_d_f16); - - STAGE(scale_u8); - - STAGE(lerp_u8); - STAGE(lerp_565); - - STAGE(just_return); - STAGE(swap_src_dst); - STAGE(lerp_constant_float); - STAGE(constant_color); - - STAGE(dst); - STAGE(dstatop); - STAGE(dstin); - STAGE(dstout); - STAGE(dstover); - STAGE(srcatop); - STAGE(srcin); - STAGE(srcout); - STAGE(srcover); - STAGE(clear); - STAGE(modulate); - STAGE(multiply); - STAGE(plus_); - STAGE(screen); - STAGE(xor_); - STAGE(colorburn); - STAGE(colordodge); - STAGE(darken); - STAGE(difference); - STAGE(exclusion); - STAGE(hardlight); - STAGE(lighten); - STAGE(overlay); - STAGE(softlight); - #undef STAGE - + run_pipeline = hsw::run_pipeline; } } |