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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 148593003: fix auto-delete bug that crept in with new fast blur path; is causing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« include/core/SkTemplates.h ('K') | « include/core/SkTemplates.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 2fffd050760c3349518c92b00b8ddafddcf234c5..03eedd29afc455f21516c17157e0bcde2d31a131 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -646,13 +646,14 @@ bool GrRectBlurEffect::CreateScanlineTextures(GrContext *context, float sigma,
GrCacheID horizontalCacheID(gBlurProfileDomain, key);
uint8_t *profile = NULL;
- SkAutoTDeleteArray<uint8_t> ada(profile);
+ SkAutoTDeleteArray<uint8_t> ada(NULL);
*horizontalScanline = context->findAndRefTexture(texDesc, horizontalCacheID, &params);
if (NULL == *horizontalScanline) {
SkBlurMask::ComputeBlurProfile(sigma, &profile);
+ ada.reset(profile);
SkAutoTMalloc<uint8_t> horizontalPixels(width);
SkBlurMask::ComputeBlurredScanline(horizontalPixels, profile, width, sigma);
@@ -675,6 +676,7 @@ bool GrRectBlurEffect::CreateScanlineTextures(GrContext *context, float sigma,
if (NULL == *verticalScanline) {
if (NULL == profile) {
SkBlurMask::ComputeBlurProfile(sigma, &profile);
+ ada.reset(profile);
}
SkAutoTMalloc<uint8_t> verticalPixels(height);
« include/core/SkTemplates.h ('K') | « include/core/SkTemplates.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698