aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/effects/GrCircleBlurFragmentProcessor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp
index f319e3d90f..39e3947049 100644
--- a/src/effects/GrCircleBlurFragmentProcessor.cpp
+++ b/src/effects/GrCircleBlurFragmentProcessor.cpp
@@ -209,9 +209,11 @@ static uint8_t* create_profile(float halfWH, float sigma) {
compute_profile_offset_and_size(halfWH, sigma, &offset, &numSteps);
uint8_t* weights = new uint8_t[numSteps];
- for (int i = 0; i < numSteps; ++i) {
+ for (int i = 0; i < numSteps - 1; ++i) {
weights[i] = eval_at(offset+i, halfWH, halfKernel.get(), kernelWH);
}
+ // Ensure the tail of the Gaussian goes to zero.
+ weights[numSteps-1] = 0;
return weights;
}