Fix skia bug 2845

Shouldn't call Fast Blur path(DoubleRowBoxBlur_NEON)
when kernelsize is 1. Or, uint16x8_t resultPixels will be overflow.

BUG=skia:2845
R=senorblanco@chromium.org

Review URL: https://codereview.chromium.org/587543003
This commit is contained in:
kui.zheng 2015-02-17 08:01:52 -08:00 committed by Commit bot
parent b197b8ff31
commit b1629c5d9e
3 changed files with 2 additions and 6 deletions

View File

@ -1778,8 +1778,7 @@ const SkBlitRow::Proc16 sk_blitrow_platform_565_procs_arm_neon[] = {
#if 0
S32A_D565_Blend_neon,
#else
NULL, // https://code.google.com/p/skia/issues/detail?id=2845
// https://code.google.com/p/skia/issues/detail?id=2797
NULL, // https://code.google.com/p/skia/issues/detail?id=2797
#endif
// dither

View File

@ -12,9 +12,6 @@ bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX,
SkBoxBlurProc* boxBlurY,
SkBoxBlurProc* boxBlurXY,
SkBoxBlurProc* boxBlurYX) {
// Temporary workaround for http://skbug.com/2845
return false;
#if SK_ARM_NEON_IS_NONE
return false;
#else

View File

@ -123,7 +123,7 @@ void SkBoxBlur_NEON(const SkPMColor* src, int srcStride, SkPMColor* dst, int ker
const uint32x4_t scale = vdupq_n_u32((1 << 24) / kernelSize);
const uint32x4_t half = vdupq_n_u32(1 << 23);
if (kernelSize < 128)
if (1 < kernelSize && kernelSize < 128)
{
SkDoubleRowBoxBlur_NEON<srcDirection, dstDirection>(&src, srcStride, &dst, kernelSize,
leftOffset, rightOffset, width, &height);