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 "src/core/SkOpts.h" 9 10 #define SK_OPTS_NS avx 11 #include "src/opts/SkRasterPipeline_opts.h" 12 #include "src/opts/SkUtils_opts.h" 13 14 namespace SkOpts { Init_avx()15 void Init_avx() { 16 memset16 = SK_OPTS_NS::memset16; 17 memset32 = SK_OPTS_NS::memset32; 18 memset64 = SK_OPTS_NS::memset64; 19 20 rect_memset16 = SK_OPTS_NS::rect_memset16; 21 rect_memset32 = SK_OPTS_NS::rect_memset32; 22 rect_memset64 = SK_OPTS_NS::rect_memset64; 23 24 #define M(st) stages_highp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::st; 25 SK_RASTER_PIPELINE_STAGES(M) 26 just_return_highp = (StageFn)SK_OPTS_NS::just_return; 27 start_pipeline_highp = SK_OPTS_NS::start_pipeline; 28 #undef M 29 30 #define M(st) stages_lowp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::lowp::st; 31 SK_RASTER_PIPELINE_STAGES(M) 32 just_return_lowp = (StageFn)SK_OPTS_NS::lowp::just_return; 33 start_pipeline_lowp = SK_OPTS_NS::lowp::start_pipeline; 34 #undef M 35 } 36 } 37