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

Side by Side Diff: src/core/SkImageFilter.cpp

Issue 15600003: Remove SkImageFilter::getInputResult(), since its return value is not (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/effects/SkBicubicImageFilter.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 "SkImageFilter.h" 8 #include "SkImageFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 buffer.writeInt(fInputCount); 62 buffer.writeInt(fInputCount);
63 for (int i = 0; i < fInputCount; i++) { 63 for (int i = 0; i < fInputCount; i++) {
64 SkImageFilter* input = getInput(i); 64 SkImageFilter* input = getInput(i);
65 buffer.writeBool(input != NULL); 65 buffer.writeBool(input != NULL);
66 if (input != NULL) { 66 if (input != NULL) {
67 buffer.writeFlattenable(input); 67 buffer.writeFlattenable(input);
68 } 68 }
69 } 69 }
70 } 70 }
71 71
72 SkBitmap SkImageFilter::getInputResult(int index, Proxy* proxy,
73 const SkBitmap& src, const SkMatrix& ctm,
74 SkIPoint* loc) {
75 SkASSERT(index < fInputCount);
76 SkImageFilter* input = getInput(index);
77 SkBitmap result;
78 if (input && input->filterImage(proxy, src, ctm, &result, loc)) {
79 return result;
80 } else {
81 return src;
82 }
83 }
84
85
86 bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src, 72 bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
87 const SkMatrix& ctm, 73 const SkMatrix& ctm,
88 SkBitmap* result, SkIPoint* loc) { 74 SkBitmap* result, SkIPoint* loc) {
89 SkASSERT(result); 75 SkASSERT(result);
90 SkASSERT(loc); 76 SkASSERT(loc);
91 /* 77 /*
92 * Give the proxy first shot at the filter. If it returns false, ask 78 * Give the proxy first shot at the filter. If it returns false, ask
93 * the filter to do it. 79 * the filter to do it.
94 */ 80 */
95 return (proxy && proxy->filterImage(this, src, ctm, result, loc)) || 81 return (proxy && proxy->filterImage(this, src, ctm, result, loc)) ||
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return true; 142 return true;
157 } 143 }
158 144
159 bool SkImageFilter::asNewEffect(GrEffectRef**, GrTexture*) const { 145 bool SkImageFilter::asNewEffect(GrEffectRef**, GrTexture*) const {
160 return false; 146 return false;
161 } 147 }
162 148
163 bool SkImageFilter::asColorFilter(SkColorFilter**) const { 149 bool SkImageFilter::asColorFilter(SkColorFilter**) const {
164 return false; 150 return false;
165 } 151 }
OLDNEW
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/effects/SkBicubicImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698