diff options
author | 2018-01-05 13:19:46 -0500 | |
---|---|---|
committer | 2018-01-05 20:25:14 +0000 | |
commit | 3431c6b4a4fd4492663c4f29730c9a0c70cd6af9 (patch) | |
tree | 50b4ee5802eb40d0098911818aee59567e2b463f /src/effects | |
parent | 71961fb58d54884c7548a668502e988079da30fe (diff) |
Don't apply blur to zero-sized circles
Bug: skia:7452
Change-Id: I7aac621cba8519174d306d9d304aa72a07947f46
Reviewed-on: https://skia-review.googlesource.com/91444
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/GrCircleBlurFragmentProcessor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp index 972d75b375..41ea482b9e 100644 --- a/src/effects/GrCircleBlurFragmentProcessor.cpp +++ b/src/effects/GrCircleBlurFragmentProcessor.cpp @@ -170,6 +170,9 @@ static sk_sp<GrTextureProxy> create_profile_texture(GrResourceProvider* resource const SkRect& circle, float sigma, float* solidRadius, float* textureRadius) { float circleR = circle.width() / 2.0f; + if (circleR < SK_ScalarNearlyZero) { + return nullptr; + } // Profile textures are cached by the ratio of sigma to circle radius and by the size of the // profile texture (binned by powers of 2). SkScalar sigmaToCircleRRatio = sigma / circleR; |