summaryrefslogtreecommitdiff
path: root/core/SkMaskFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/SkMaskFilter.cpp')
-rw-r--r--core/SkMaskFilter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/SkMaskFilter.cpp b/core/SkMaskFilter.cpp
index f062f135..adfed410 100644
--- a/core/SkMaskFilter.cpp
+++ b/core/SkMaskFilter.cpp
@@ -349,10 +349,14 @@ bool SkMaskFilter::filterMaskGPU(GrContext* context,
if (!result) {
return false;
}
+ SkAutoUnref aur(dst);
+ SkImageInfo info;
resultBM->setConfig(srcBM.config(), dst->width(), dst->height());
- resultBM->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (dst)))->unref();
- dst->unref();
+ if (resultBM->asImageInfo(&info)) {
+ return false;
+ }
+ resultBM->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, dst)))->unref();
return true;
}