aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 14:53:21 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 14:53:21 +0000
commitf1369ce607adf55ffffe58fb93893bafb6ff6ebe (patch)
tree5d375585df0e0b1ff05b6f08f597bb578a58261f /src/core
parent52805485581cff7e13134aa1465a2950f7bed007 (diff)
Implements a new class, SkSingleInputImageFilter, to handle DAG connectivity
for filters with a single image input. This provides functionality to store, flatten and unflatten a single SkImageFilter input, as well as to recursively evaluate it on the CPU or GPU. The following classes were re-parented to implement DAG connectivity: SkBlurImageFilter, SkDilateImageFilter, SkErodeImageFilter, SkColorFilterImageFilter. The constructors for each have been appended with a new parameter, representing the input filter (default NULL). This change also implements an arbitrary SkBitmap input source for filtering, SkBitmapSource. NOTE: This CL will require gyp file changes when rolling past this revision. Review URL: https://codereview.appspot.com/6462071/ git-svn-id: http://skia.googlecode.com/svn/trunk@5170 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkPaint.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 2cfb67b074..0f1aecf977 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -2309,14 +2309,13 @@ SK_DEFINE_INST_COUNT(SkImageFilter)
bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
const SkMatrix& ctm,
SkBitmap* result, SkIPoint* loc) {
- SkASSERT(proxy);
SkASSERT(result);
SkASSERT(loc);
/*
* Give the proxy first shot at the filter. If it returns false, ask
* the filter to do it.
*/
- return proxy->filterImage(this, src, ctm, result, loc) ||
+ return (proxy && proxy->filterImage(this, src, ctm, result, loc)) ||
this->onFilterImage(proxy, src, ctm, result, loc);
}