Mike Klein | 78d5a3b | 2016-09-30 10:48:01 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "SkOpts.h" |
| 9 | |
| 10 | #define SK_OPTS_NS hsw |
Mike Klein | ec07b0b | 2016-10-19 16:45:16 -0400 | [diff] [blame] | 11 | #include "SkRasterPipeline_opts.h" |
Mike Klein | 78d5a3b | 2016-09-30 10:48:01 -0400 | [diff] [blame] | 12 | |
| 13 | namespace SkOpts { |
Mike Klein | ec07b0b | 2016-10-19 16:45:16 -0400 | [diff] [blame] | 14 | void Init_hsw() { |
| 15 | |
| 16 | run_pipeline = SK_OPTS_NS::run_pipeline; |
| 17 | |
| 18 | #define STAGE(stage) \ |
| 19 | body[SkRasterPipeline::stage] = (SkOpts::VoidFn)SK_OPTS_NS::stage; \ |
| 20 | tail[SkRasterPipeline::stage] = (SkOpts::VoidFn)SK_OPTS_NS::stage##_tail |
| 21 | |
| 22 | STAGE(store_565); |
| 23 | STAGE(store_srgb); |
| 24 | STAGE(store_f16); |
| 25 | |
| 26 | STAGE(load_s_565); |
| 27 | STAGE(load_s_srgb); |
| 28 | STAGE(load_s_f16); |
| 29 | |
| 30 | STAGE(load_d_565); |
| 31 | STAGE(load_d_srgb); |
| 32 | STAGE(load_d_f16); |
| 33 | |
| 34 | STAGE(scale_u8); |
| 35 | |
| 36 | STAGE(lerp_u8); |
| 37 | STAGE(lerp_565); |
Mike Klein | ec07b0b | 2016-10-19 16:45:16 -0400 | [diff] [blame] | 38 | |
| 39 | STAGE(just_return); |
| 40 | STAGE(swap_src_dst); |
| 41 | STAGE(lerp_constant_float); |
| 42 | STAGE(constant_color); |
| 43 | |
| 44 | STAGE(dst); |
| 45 | STAGE(dstatop); |
| 46 | STAGE(dstin); |
| 47 | STAGE(dstout); |
| 48 | STAGE(dstover); |
| 49 | STAGE(srcatop); |
| 50 | STAGE(srcin); |
| 51 | STAGE(srcout); |
| 52 | STAGE(srcover); |
| 53 | STAGE(clear); |
| 54 | STAGE(modulate); |
| 55 | STAGE(multiply); |
| 56 | STAGE(plus_); |
| 57 | STAGE(screen); |
| 58 | STAGE(xor_); |
| 59 | STAGE(colorburn); |
| 60 | STAGE(colordodge); |
| 61 | STAGE(darken); |
| 62 | STAGE(difference); |
| 63 | STAGE(exclusion); |
| 64 | STAGE(hardlight); |
| 65 | STAGE(lighten); |
| 66 | STAGE(overlay); |
| 67 | STAGE(softlight); |
| 68 | #undef STAGE |
| 69 | |
| 70 | } |
Mike Klein | 78d5a3b | 2016-09-30 10:48:01 -0400 | [diff] [blame] | 71 | } |
| 72 | |