Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 65723005: Fix memory leak in filterRRectToNine (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 radii[SkRRect::kUpperLeft_Corner] = UL; 326 radii[SkRRect::kUpperLeft_Corner] = UL;
327 radii[SkRRect::kUpperRight_Corner] = UR; 327 radii[SkRRect::kUpperRight_Corner] = UR;
328 radii[SkRRect::kLowerRight_Corner] = LR; 328 radii[SkRRect::kLowerRight_Corner] = LR;
329 radii[SkRRect::kLowerLeft_Corner] = LL; 329 radii[SkRRect::kLowerLeft_Corner] = LL;
330 smallRR.setRectRadii(smallR, radii); 330 smallRR.setRectRadii(smallR, radii);
331 331
332 if (!draw_rrect_into_mask(smallRR, &srcM)) { 332 if (!draw_rrect_into_mask(smallRR, &srcM)) {
333 return kFalse_FilterReturn; 333 return kFalse_FilterReturn;
334 } 334 }
335 335
336 SkAutoMaskFreeImage amf(srcM.fImage);
337
336 if (!this->filterMask(&patch->fMask, srcM, matrix, &margin)) { 338 if (!this->filterMask(&patch->fMask, srcM, matrix, &margin)) {
337 return kFalse_FilterReturn; 339 return kFalse_FilterReturn;
338 } 340 }
339 341
340 patch->fMask.fBounds.offsetTo(0, 0); 342 patch->fMask.fBounds.offsetTo(0, 0);
341 patch->fOuterRect = dstM.fBounds; 343 patch->fOuterRect = dstM.fBounds;
342 patch->fCenter.fX = SkScalarCeilToInt(leftUnstretched) + 1; 344 patch->fCenter.fX = SkScalarCeilToInt(leftUnstretched) + 1;
343 patch->fCenter.fY = SkScalarCeilToInt(topUnstretched) + 1; 345 patch->fCenter.fY = SkScalarCeilToInt(topUnstretched) + 1;
344 return kTrue_FilterReturn; 346 return kTrue_FilterReturn;
345 } 347 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } else { 623 } else {
622 str->append("None"); 624 str->append("None");
623 } 625 }
624 str->append("))"); 626 str->append("))");
625 } 627 }
626 #endif 628 #endif
627 629
628 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 630 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
629 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 631 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
630 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 632 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698