herb | 4d1dd66 | 2016-06-23 09:40:30 -0700 | [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 | |
Mike Klein | 87db001 | 2017-05-23 12:20:38 -0400 | [diff] [blame] | 10 | #define SK_OPTS_NS avx |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 11 | #include "SkRasterPipeline_opts.h" |
Mike Klein | 87db001 | 2017-05-23 12:20:38 -0400 | [diff] [blame] | 12 | #include "SkUtils_opts.h" |
| 13 | |
herb | 4d1dd66 | 2016-06-23 09:40:30 -0700 | [diff] [blame] | 14 | namespace SkOpts { |
Mike Klein | 87db001 | 2017-05-23 12:20:38 -0400 | [diff] [blame] | 15 | void Init_avx() { |
| 16 | memset16 = SK_OPTS_NS::memset16; |
| 17 | memset32 = SK_OPTS_NS::memset32; |
| 18 | memset64 = SK_OPTS_NS::memset64; |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 19 | |
| 20 | #define M(st) stages_highp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::st; |
| 21 | SK_RASTER_PIPELINE_STAGES(M) |
| 22 | just_return_highp = (StageFn)SK_OPTS_NS::just_return; |
| 23 | start_pipeline_highp = SK_OPTS_NS::start_pipeline; |
| 24 | #undef M |
| 25 | |
| 26 | #define M(st) stages_lowp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::lowp::st; |
| 27 | SK_RASTER_PIPELINE_STAGES(M) |
| 28 | just_return_lowp = (StageFn)SK_OPTS_NS::lowp::just_return; |
| 29 | start_pipeline_lowp = SK_OPTS_NS::lowp::start_pipeline; |
| 30 | #undef M |
Mike Klein | 87db001 | 2017-05-23 12:20:38 -0400 | [diff] [blame] | 31 | } |
herb | 4d1dd66 | 2016-06-23 09:40:30 -0700 | [diff] [blame] | 32 | } |