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

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

Issue 1873923003: Fix memory leak in SkBlurImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« 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 * Copyright 2011 The Android Open Source Project 2 * Copyright 2011 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBlurImageFilter.h" 8 #include "SkBlurImageFilter.h"
9 9
10 #include "SkAutoPixmapStorage.h" 10 #include "SkAutoPixmapStorage.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 if (!inputBounds.intersect(dstBounds)) { 91 if (!inputBounds.intersect(dstBounds)) {
92 return nullptr; 92 return nullptr;
93 } 93 }
94 94
95 const SkVector sigma = map_sigma(fSigma, ctx.ctm()); 95 const SkVector sigma = map_sigma(fSigma, ctx.ctm());
96 96
97 #if SK_SUPPORT_GPU 97 #if SK_SUPPORT_GPU
98 if (source->isTextureBacked()) { 98 if (source->isTextureBacked()) {
99 GrContext* context = source->getContext(); 99 GrContext* context = source->getContext();
100 GrTexture* inputTexture = input->asTextureRef(context); 100 SkAutoTUnref<GrTexture> inputTexture(input->asTextureRef(context));
101 SkASSERT(inputTexture); 101 SkASSERT(inputTexture);
102 102
103 if (0 == sigma.x() && 0 == sigma.y()) { 103 if (0 == sigma.x() && 0 == sigma.y()) {
104 offset->fX = inputBounds.x(); 104 offset->fX = inputBounds.x();
105 offset->fY = inputBounds.y(); 105 offset->fY = inputBounds.y();
106 return input->makeSubset(inputBounds.makeOffset(-inputOffset.x(), 106 return input->makeSubset(inputBounds.makeOffset(-inputOffset.x(),
107 -inputOffset.y())); 107 -inputOffset.y()));
108 } 108 }
109 109
110 offset->fX = dstBounds.fLeft; 110 offset->fX = dstBounds.fLeft;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 str->appendf("SkBlurImageFilter: ("); 242 str->appendf("SkBlurImageFilter: (");
243 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); 243 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight);
244 244
245 if (this->getInput(0)) { 245 if (this->getInput(0)) {
246 this->getInput(0)->toString(str); 246 this->getInput(0)->toString(str);
247 } 247 }
248 248
249 str->append("))"); 249 str->append("))");
250 } 250 }
251 #endif 251 #endif
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