Index: src/effects/SkBlurMaskFilter.cpp |
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp |
index a2d67d74af7b95344ef5d122decf0bfe22ced499..37d6c960d7829e15d444bbf4cae70ddab053916c 100644 |
--- a/src/effects/SkBlurMaskFilter.cpp |
+++ b/src/effects/SkBlurMaskFilter.cpp |
@@ -1248,11 +1248,10 @@ |
// If we're doing a normal blur, we can clobber the pathTexture in the |
// gaussianBlur. Otherwise, we need to save it for later compositing. |
bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle); |
- sk_sp<GrDrawContext> drawContext(SkGpuBlurUtils::GaussianBlur(context, src, |
- isNormalBlur && canOverwriteSrc, |
- clipRect, nullptr, |
- xformedSigma, xformedSigma)); |
- if (!drawContext) { |
+ *result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOverwriteSrc, |
+ clipRect, nullptr, |
+ xformedSigma, xformedSigma); |
+ if (nullptr == *result) { |
return false; |
} |
@@ -1277,10 +1276,15 @@ |
paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); |
} |
+ sk_sp<GrDrawContext> drawContext( |
+ context->drawContext(sk_ref_sp((*result)->asRenderTarget()))); |
+ if (!drawContext) { |
+ return false; |
+ } |
+ |
drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect); |
} |
- *result = drawContext->asTexture().release(); |
return true; |
} |