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

Side by Side Diff: src/effects/SkBlurImageFilter.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 | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.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 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } else { 130 } else {
131 *highOffset = d / 2; 131 *highOffset = d / 2;
132 *lowOffset = *highOffset - 1; 132 *lowOffset = *highOffset - 1;
133 *kernelSize3 = d + 1; 133 *kernelSize3 = d + 1;
134 } 134 }
135 } 135 }
136 136
137 bool SkBlurImageFilter::onFilterImage(Proxy* proxy, 137 bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
138 const SkBitmap& source, const SkMatrix& ct m, 138 const SkBitmap& source, const SkMatrix& ct m,
139 SkBitmap* dst, SkIPoint* offset) { 139 SkBitmap* dst, SkIPoint* offset) {
140 SkBitmap src = this->getInputResult(0, proxy, source, ctm, offset); 140 SkBitmap src = source;
141 if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctm, &src, offse t)) {
142 return false;
143 }
144
141 if (src.config() != SkBitmap::kARGB_8888_Config) { 145 if (src.config() != SkBitmap::kARGB_8888_Config) {
142 return false; 146 return false;
143 } 147 }
144 148
145 SkAutoLockPixels alp(src); 149 SkAutoLockPixels alp(src);
146 if (!src.getPixels()) { 150 if (!src.getPixels()) {
147 return false; 151 return false;
148 } 152 }
149 153
150 dst->setConfig(src.config(), src.width(), src.height()); 154 dst->setConfig(src.config(), src.width(), src.height());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 SkRect rect; 202 SkRect rect;
199 src.getBounds(&rect); 203 src.getBounds(&rect);
200 SkAutoTUnref<GrTexture> tex(source->getContext()->gaussianBlur(source, false , rect, 204 SkAutoTUnref<GrTexture> tex(source->getContext()->gaussianBlur(source, false , rect,
201 fSigma.width(), fSigma.height())); 205 fSigma.width(), fSigma.height()));
202 return SkImageFilterUtils::WrapTexture(tex, src.width(), src.height(), resul t); 206 return SkImageFilterUtils::WrapTexture(tex, src.width(), src.height(), resul t);
203 #else 207 #else
204 SkDEBUGFAIL("Should not call in GPU-less build"); 208 SkDEBUGFAIL("Should not call in GPU-less build");
205 return false; 209 return false;
206 #endif 210 #endif
207 } 211 }
OLDNEW
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698