aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/GrCircleBlurFragmentProcessor.cpp3
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;