Chromium Code Reviews| Index: src/effects/GrCircleBlurFragmentProcessor.cpp |
| diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp |
| index f319e3d90fc1863805b44be9d784c1b07a1b478c..c2d27c77373c02b09cbf33c5e36148d8c4a61cef 100644 |
| --- a/src/effects/GrCircleBlurFragmentProcessor.cpp |
| +++ b/src/effects/GrCircleBlurFragmentProcessor.cpp |
| @@ -186,7 +186,7 @@ static inline void compute_profile_offset_and_size(float halfWH, float sigma, |
| // blurred circle is solid. |
| *offset = halfWH - 3 * sigma; // This location maps to 0.5f in the weights texture. |
| // It should always be 255. |
| - *size = SkScalarCeilToInt(6*sigma); |
| + *size = SkScalarCeilToInt(6*sigma) + 1; |
| } else { |
| // The Gaussian is bigger than the circle. |
| *offset = 0.0f; |
| @@ -213,6 +213,7 @@ static uint8_t* create_profile(float halfWH, float sigma) { |
| weights[i] = eval_at(offset+i, halfWH, halfKernel.get(), kernelWH); |
| } |
|
robertphillips
2016/02/24 12:52:56
Are we guaranteed that weights[numSteps-1] will al
dogben
2016/02/24 15:31:22
sgtm
|
| + SkASSERT(weights[numSteps-1] == 0); |
| return weights; |
| } |