| 1 |
/* |
| 2 |
* Copyright 2018 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 |
#if !defined(SK_ENABLE_OPTIMIZE_SIZE) |
| 11 |
|
| 12 |
#define SK_OPTS_NS hsw |
| 13 |
#include "src/opts/SkRasterPipeline_opts.h" |
| 14 |
|
| 15 |
namespace SkOpts { |
| 16 |
void Init_hsw() { |
| 17 |
raster_pipeline_lowp_stride = SK_OPTS_NS::raster_pipeline_lowp_stride(); |
| 18 |
raster_pipeline_highp_stride = SK_OPTS_NS::raster_pipeline_highp_stride(); |
| 19 |
|
| 20 |
#define M(st) ops_highp[(int)SkRasterPipelineOp::st] = (StageFn)SK_OPTS_NS::st; |
| 21 |
SK_RASTER_PIPELINE_OPS_ALL(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) ops_lowp[(int)SkRasterPipelineOp::st] = (StageFn)SK_OPTS_NS::lowp::st; |
| 27 |
SK_RASTER_PIPELINE_OPS_LOWP(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 |
| 31 |
} |
| 32 |
} // namespace SkOpts |
| 33 |
|
| 34 |
#endif // SK_ENABLE_OPTIMIZE_SIZE |