Make degenerate kernel in fill_in_2D_gaussian_kernel sum to 1
Bug: 836113 Change-Id: I1b2ed1d67648163571df6c497365d2a293b3b589 Reviewed-on: https://skia-review.googlesource.com/126020 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
72de74504f
commit
bd66caa7ac
@ -220,9 +220,11 @@ static void fill_in_2D_gaussian_kernel(float* kernel, int width, int height,
|
||||
|
||||
if (SkScalarNearlyZero(twoSigmaSqrdX, SK_ScalarNearlyZero) ||
|
||||
SkScalarNearlyZero(twoSigmaSqrdY, SK_ScalarNearlyZero)) {
|
||||
SkASSERT(3 == width && 3 == height);
|
||||
for (int i = 0; i < width * height; ++i) {
|
||||
kernel[i] = 0.0f;
|
||||
}
|
||||
kernel[4] = 1.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user