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

Side by Side Diff: src/effects/SkMatrixConvolutionImageFilter.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/SkColorFilterImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.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 "SkMatrixConvolutionImageFilter.h" 8 #include "SkMatrixConvolutionImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 } 197 }
198 return result; 198 return result;
199 } 199 }
200 200
201 bool SkMatrixConvolutionImageFilter::onFilterImage(Proxy* proxy, 201 bool SkMatrixConvolutionImageFilter::onFilterImage(Proxy* proxy,
202 const SkBitmap& source, 202 const SkBitmap& source,
203 const SkMatrix& matrix, 203 const SkMatrix& matrix,
204 SkBitmap* result, 204 SkBitmap* result,
205 SkIPoint* loc) { 205 SkIPoint* loc) {
206 SkBitmap src = this->getInputResult(0, proxy, source, matrix, loc); 206 SkBitmap src = source;
207 if (getInput(0) && !getInput(0)->filterImage(proxy, source, matrix, &src, lo c)) {
208 return false;
209 }
210
207 if (src.config() != SkBitmap::kARGB_8888_Config) { 211 if (src.config() != SkBitmap::kARGB_8888_Config) {
208 return false; 212 return false;
209 } 213 }
210 214
211 if (!fConvolveAlpha && !src.isOpaque()) { 215 if (!fConvolveAlpha && !src.isOpaque()) {
212 src = unpremultiplyBitmap(src); 216 src = unpremultiplyBitmap(src);
213 } 217 }
214 218
215 SkAutoLockPixels alp(src); 219 SkAutoLockPixels alp(src);
216 if (!src.getPixels()) { 220 if (!src.getPixels()) {
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 fBias, 577 fBias,
574 fTarget, 578 fTarget,
575 fTileMode, 579 fTileMode,
576 fConvolveAlpha); 580 fConvolveAlpha);
577 return true; 581 return true;
578 } 582 }
579 583
580 /////////////////////////////////////////////////////////////////////////////// 584 ///////////////////////////////////////////////////////////////////////////////
581 585
582 #endif 586 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698