From f1369ce607adf55ffffe58fb93893bafb6ff6ebe Mon Sep 17 00:00:00 2001 From: "senorblanco@chromium.org" Date: Mon, 20 Aug 2012 14:53:21 +0000 Subject: 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 --- src/core/SkPaint.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') 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); } -- cgit v1.2.3