| Index: src/effects/SkBlurMaskFilter.cpp
|
| diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
|
| index e5d521a3581c3b7dacfe8d8d5528c453cd44c2bf..c4a6b2979849bfc0376fc86ef93094e90ebbfbb8 100644
|
| --- a/src/effects/SkBlurMaskFilter.cpp
|
| +++ b/src/effects/SkBlurMaskFilter.cpp
|
| @@ -1122,7 +1122,7 @@ static sk_sp<GrTexture> find_or_create_rrect_blur_mask(GrContext* context,
|
| sk_sp<GrTexture> mask(context->textureProvider()->findAndRefTextureByUniqueKey(key));
|
| if (!mask) {
|
| // TODO: this could be approx but the texture coords will need to be updated
|
| - sk_sp<GrRenderTargetContext> rtc(context->makeRenderTargetContextWithFallback(
|
| + sk_sp<GrRenderTargetContext> rtc(context->makeDeferredRenderTargetContextWithFallback(
|
| SkBackingFit::kExact, size.fWidth, size.fHeight, kAlpha_8_GrPixelConfig, nullptr));
|
| if (!rtc) {
|
| return nullptr;
|
| @@ -1142,8 +1142,8 @@ static sk_sp<GrTexture> find_or_create_rrect_blur_mask(GrContext* context,
|
| srcTexture.get(),
|
| nullptr,
|
| SkIRect::MakeWH(
|
| - size.fWidth,
|
| - size.fHeight),
|
| + size.fWidth,
|
| + size.fHeight),
|
| nullptr,
|
| xformedSigma, xformedSigma,
|
| SkBackingFit::kExact));
|
| @@ -1152,7 +1152,9 @@ static sk_sp<GrTexture> find_or_create_rrect_blur_mask(GrContext* context,
|
| }
|
|
|
| mask = rtc2->asTexture();
|
| - SkASSERT(mask);
|
| + if (!mask) {
|
| + return nullptr;
|
| + }
|
| context->textureProvider()->assignUniqueKeyToTexture(key, mask.get());
|
| }
|
|
|
| @@ -1540,7 +1542,7 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
|
| }
|
|
|
| *result = renderTargetContext->asTexture().release();
|
| - return true;
|
| + return SkToBool(*result);
|
| }
|
|
|
| #endif // SK_SUPPORT_GPU
|
|
|