Do proper NEON checking for SkBoxBlur procs.
TBR=mtklein BUG= Review URL: https://codereview.chromium.org/98373003 git-svn-id: http://skia.googlecode.com/svn/trunk@12490 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
f78cdb4ba9
commit
bdb677a277
@ -92,10 +92,10 @@ void SkBoxBlur_NEON(const SkPMColor* src, int srcStride, SkPMColor* dst, int ker
|
||||
|
||||
} // namespace
|
||||
|
||||
bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX,
|
||||
SkBoxBlurProc* boxBlurY,
|
||||
SkBoxBlurProc* boxBlurXY,
|
||||
SkBoxBlurProc* boxBlurYX) {
|
||||
bool SkBoxBlurGetPlatformProcs_NEON(SkBoxBlurProc* boxBlurX,
|
||||
SkBoxBlurProc* boxBlurY,
|
||||
SkBoxBlurProc* boxBlurXY,
|
||||
SkBoxBlurProc* boxBlurYX) {
|
||||
*boxBlurX = SkBoxBlur_NEON<kX, kX>;
|
||||
*boxBlurY = SkBoxBlur_NEON<kY, kY>;
|
||||
*boxBlurXY = SkBoxBlur_NEON<kX, kY>;
|
||||
|
13
src/opts/SkBlurImage_opts_neon.h
Normal file
13
src/opts/SkBlurImage_opts_neon.h
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright 2013 The Android Open Source Project
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "SkBlurImage_opts.h"
|
||||
|
||||
bool SkBoxBlurGetPlatformProcs_NEON(SkBoxBlurProc* boxBlurX,
|
||||
SkBoxBlurProc* boxBlurY,
|
||||
SkBoxBlurProc* boxBlurXY,
|
||||
SkBoxBlurProc* boxBlurYX);
|
@ -19,6 +19,7 @@
|
||||
#include "SkUtilsArm.h"
|
||||
#include "SkMorphology_opts.h"
|
||||
#include "SkMorphology_opts_neon.h"
|
||||
#include "SkBlurImage_opts_neon.h"
|
||||
|
||||
#if defined(SK_CPU_LENDIAN) && !SK_ARM_NEON_IS_NONE
|
||||
extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count);
|
||||
@ -91,3 +92,19 @@ SkMorphologyProc SkMorphologyGetPlatformProc(SkMorphologyProcType type) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX,
|
||||
SkBoxBlurProc* boxBlurY,
|
||||
SkBoxBlurProc* boxBlurXY,
|
||||
SkBoxBlurProc* boxBlurYX) {
|
||||
#if SK_ARM_NEON_IS_NONE
|
||||
return NULL;
|
||||
#else
|
||||
#if SK_ARM_NEON_IS_DYNAMIC
|
||||
if (!sk_cpu_arm_has_neon()) {
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
return SkBoxBlurGetPlatformProcs_NEON(boxBlurX, boxBlurY, boxBlurXY, boxBlurYX);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user