Index: src/gpu/effects/GrMatrixConvolutionEffect.cpp |
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp |
index ea3301fb3fb2eb3fad70f82e4b7d74e5eb494957..1dd96a4aad611ee7f3184aadf49157095861e2e7 100644 |
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp |
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp |
@@ -39,8 +39,8 @@ void GrGLMatrixConvolutionEffect::emitCode(EmitArgs& args) { |
int kWidth = mce.kernelSize().width(); |
int kHeight = mce.kernelSize().height(); |
- int arrayCount = (kWidth + 3) / 4; |
- SkASSERT(4 * arrayCount >= kWidth); |
+ int arrayCount = (kWidth * kHeight + 3) / 4; |
+ SkASSERT(4 * arrayCount >= kWidth * kHeight); |
GrGLSLUniformHandler* uniformHandler = args.fUniformHandler; |
fImageIncrementUni = uniformHandler->addUniform(kFragment_GrShaderFlag, |