aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-03-23 10:33:12 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-23 15:56:10 +0000
commit48ce22b374c987e91584efb3665e7a835fdd14da (patch)
treef7fc956fc917ad8a7f463f98dd4febe505a37644 /src/gpu
parentfbca7db22abf9e491044a9888880170339f88946 (diff)
Add error return, upon mask creation failure, in sw_draw_with_mask_filter
Bug: 822680 Change-Id: I7296c5be4faf1f706ad1cc05198559771e324841 Reviewed-on: https://skia-review.googlesource.com/116180 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrBlurUtils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index b37da26eee..cc59c02843 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -92,12 +92,18 @@ static bool sw_draw_with_mask_filter(GrContext* context,
bm.setImmutable();
sk_sp<SkImage> image = SkImage::MakeFromBitmap(bm);
+ if (!image) {
+ return false;
+ }
auto proxyProvider = context->contextPriv().proxyProvider();
sk_sp<GrTextureProxy> maskProxy = proxyProvider->createTextureProxy(std::move(image),
kNone_GrSurfaceFlags,
1, SkBudgeted::kYes,
SkBackingFit::kApprox);
+ if (!maskProxy) {
+ return false;
+ }
return draw_mask(renderTargetContext, clipData, viewMatrix,
dstM.fBounds, std::move(paint), std::move(maskProxy));