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

Unified Diff: src/effects/SkMorphologyImageFilter.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkOffsetImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 77299e4f78f16259a0752157f503f3ac50426bf2..be63d15b10ea045f7ec2195950c9f7b6be65a094 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -136,7 +136,11 @@ static void dilateY(const SkBitmap& src, SkBitmap* dst, int radiusY)
bool SkErodeImageFilter::onFilterImage(Proxy* proxy,
const SkBitmap& source, const SkMatrix& ctm,
SkBitmap* dst, SkIPoint* offset) {
- SkBitmap src = this->getInputResult(0, proxy, source, ctm, offset);
+ SkBitmap src = source;
+ if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctm, &src, offset)) {
+ return false;
+ }
+
if (src.config() != SkBitmap::kARGB_8888_Config) {
return false;
}
@@ -181,7 +185,10 @@ bool SkErodeImageFilter::onFilterImage(Proxy* proxy,
bool SkDilateImageFilter::onFilterImage(Proxy* proxy,
const SkBitmap& source, const SkMatrix& ctm,
SkBitmap* dst, SkIPoint* offset) {
- SkBitmap src = this->getInputResult(0, proxy, source, ctm, offset);
+ SkBitmap src = source;
+ if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctm, &src, offset)) {
+ return false;
+ }
if (src.config() != SkBitmap::kARGB_8888_Config) {
return false;
}
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkOffsetImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698