michael@0: /* michael@0: * Copyright 2014 ARM Ltd. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #include "SkMorphology_opts.h" michael@0: #include "SkMorphology_opts_neon.h" michael@0: #include "SkUtilsArm.h" michael@0: michael@0: SkMorphologyImageFilter::Proc SkMorphologyGetPlatformProc(SkMorphologyProcType type) { michael@0: #if SK_ARM_NEON_IS_NONE michael@0: return NULL; michael@0: #else michael@0: #if SK_ARM_NEON_IS_DYNAMIC michael@0: if (!sk_cpu_arm_has_neon()) { michael@0: return NULL; michael@0: } michael@0: #endif michael@0: switch (type) { michael@0: case kDilateX_SkMorphologyProcType: michael@0: return SkDilateX_neon; michael@0: case kDilateY_SkMorphologyProcType: michael@0: return SkDilateY_neon; michael@0: case kErodeX_SkMorphologyProcType: michael@0: return SkErodeX_neon; michael@0: case kErodeY_SkMorphologyProcType: michael@0: return SkErodeY_neon; michael@0: default: michael@0: return NULL; michael@0: } michael@0: #endif michael@0: }