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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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 | « src/effects/SkColorCubeFilter.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | 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 2012 The Android Open Source Project 2 * Copyright 2012 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 "SkColorFilterImageFilter.h" 8 #include "SkColorFilterImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 10 matching lines...) Expand all
21 return NULL; 21 return NULL;
22 } 22 }
23 23
24 SkColorFilter* inputCF; 24 SkColorFilter* inputCF;
25 if (input && input->isColorFilterNode(&inputCF)) { 25 if (input && input->isColorFilterNode(&inputCF)) {
26 // This is an optimization, as it collapses the hierarchy by just combin ing the two 26 // This is an optimization, as it collapses the hierarchy by just combin ing the two
27 // colorfilters into a single one, which the new imagefilter will wrap. 27 // colorfilters into a single one, which the new imagefilter will wrap.
28 SkAutoUnref autoUnref(inputCF); 28 SkAutoUnref autoUnref(inputCF);
29 SkAutoTUnref<SkColorFilter> newCF(SkColorFilter::CreateComposeFilter(cf, inputCF)); 29 SkAutoTUnref<SkColorFilter> newCF(SkColorFilter::CreateComposeFilter(cf, inputCF));
30 if (newCF) { 30 if (newCF) {
31 return SkNEW_ARGS(SkColorFilterImageFilter, (newCF, input->getInput( 0), cropRect)); 31 return new SkColorFilterImageFilter(newCF, input->getInput(0), cropR ect);
32 } 32 }
33 } 33 }
34 34
35 return SkNEW_ARGS(SkColorFilterImageFilter, (cf, input, cropRect)); 35 return new SkColorFilterImageFilter(cf, input, cropRect);
36 } 36 }
37 37
38 SkColorFilterImageFilter::SkColorFilterImageFilter(SkColorFilter* cf, 38 SkColorFilterImageFilter::SkColorFilterImageFilter(SkColorFilter* cf,
39 SkImageFilter* input, const CropRect* cropRect) 39 SkImageFilter* input, const CropRect* cropRect)
40 : INHERITED(1, &input, cropRect), fColorFilter(SkRef(cf)) { 40 : INHERITED(1, &input, cropRect), fColorFilter(SkRef(cf)) {
41 } 41 }
42 42
43 SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) { 43 SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) {
44 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 44 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
45 SkAutoTUnref<SkColorFilter> cf(buffer.readColorFilter()); 45 SkAutoTUnref<SkColorFilter> cf(buffer.readColorFilter());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (this->getInput(0)) { 111 if (this->getInput(0)) {
112 this->getInput(0)->toString(str); 112 this->getInput(0)->toString(str);
113 } 113 }
114 114
115 str->appendf(") color filter: "); 115 str->appendf(") color filter: ");
116 fColorFilter->toString(str); 116 fColorFilter->toString(str);
117 117
118 str->append(")"); 118 str->append(")");
119 } 119 }
120 #endif 120 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698