diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-09-26 19:09:08 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-09-26 19:09:08 +0000 |
commit | 0a60b3d32eae945688b69599f11679662657f751 (patch) | |
tree | 9637d6212a3e462656b9bfe59f515428702e825d /src/core/SkDraw.cpp | |
parent | d35d4272dca919ae8b25782d193aa0254a8168d2 (diff) |
Fix leak of mask in draw.
http://codereview.appspot.com/5132046/
git-svn-id: http://skia.googlecode.com/svn/trunk@2333 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r-- | src/core/SkDraw.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index e5027d4a55..826ef7b6a9 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -784,16 +784,14 @@ void SkDraw::drawDevMask(const SkMask& srcM, const SkPaint& paint) const { return; } - SkMask dstM; - const SkMask* mask = &srcM; - - dstM.fImage = NULL; - SkAutoMaskImage ami(&dstM, false); + const SkMask* mask = &srcM; + SkMask dstM; if (paint.getMaskFilter() && paint.getMaskFilter()->filterMask(&dstM, srcM, *fMatrix, NULL)) { mask = &dstM; } + SkAutoMaskImage ami(&dstM, false); if (fBounder && !fBounder->doIRect(mask->fBounds)) { return; |