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

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

Issue 1182813002: Don't leak fragment processor in SkColorFilter::asFragmentProcessors implementations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | src/effects/SkColorFilters.cpp » ('j') | src/effects/SkLumaColorFilter.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 "SkColorCubeFilter.h" 8 #include "SkColorCubeFilter.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkOnce.h" 10 #include "SkOnce.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 desc, true, fCubeData->data(), 0)); 358 desc, true, fCubeData->data(), 0));
359 if (textureCube) { 359 if (textureCube) {
360 context->textureProvider()->assignUniqueKeyToTexture(key, textureCub e); 360 context->textureProvider()->assignUniqueKeyToTexture(key, textureCub e);
361 } 361 }
362 } 362 }
363 363
364 GrFragmentProcessor* frag = textureCube ? GrColorCubeEffect::Create(textureC ube) : NULL; 364 GrFragmentProcessor* frag = textureCube ? GrColorCubeEffect::Create(textureC ube) : NULL;
365 if (frag) { 365 if (frag) {
366 if (array) { 366 if (array) {
367 *array->append() = frag; 367 *array->append() = frag;
368 } else {
369 frag->unref();
370 SkDEBUGCODE(frag = NULL;)
368 } 371 }
369 return true; 372 return true;
370 } 373 }
371 return false; 374 return false;
372 } 375 }
373 #endif 376 #endif
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkColorFilters.cpp » ('j') | src/effects/SkLumaColorFilter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698