'<(skia_src_path)/core/SkGlyphCache.h',
'<(skia_src_path)/core/SkGraphics.cpp',
'<(skia_src_path)/core/SkInstCnt.cpp',
+ '<(skia_src_path)/core/SkImageFilter.cpp',
'<(skia_src_path)/core/SkLineClipper.cpp',
'<(skia_src_path)/core/SkMallocPixelRef.cpp',
'<(skia_src_path)/core/SkMask.cpp',
'<(skia_include_path)/core/SkFontHost.h',
'<(skia_include_path)/core/SkGeometry.h',
'<(skia_include_path)/core/SkGraphics.h',
+ '<(skia_include_path)/core/SkImageFilter.h',
'<(skia_include_path)/core/SkInstCnt.h',
'<(skia_include_path)/core/SkMallocPixelRef.h',
'<(skia_include_path)/core/SkMask.h',
#define SkImageFilter_DEFINED
#include "SkFlattenable.h"
-#include "SkSize.h"
class SkBitmap;
class SkDevice;
class SkMatrix;
struct SkIPoint;
struct SkIRect;
-struct SkPoint;
struct SkRect;
class GrCustomStage;
class GrTexture;
#define SkBlurImageFilter_DEFINED
#include "SkSingleInputImageFilter.h"
+#include "SkSize.h"
class SK_API SkBlurImageFilter : public SkSingleInputImageFilter {
public:
#define SkMorphologyImageFilter_DEFINED
#include "SkSingleInputImageFilter.h"
+#include "SkSize.h"
class SK_API SkMorphologyImageFilter : public SkSingleInputImageFilter {
public:
--- /dev/null
+/*
+ * Copyright 2012 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkImageFilter.h"
+#include "SkRect.h"
+
+SK_DEFINE_INST_COUNT(SkImageFilter)
+
+bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
+ const SkMatrix& ctm,
+ SkBitmap* result, SkIPoint* loc) {
+ SkASSERT(result);
+ SkASSERT(loc);
+ /*
+ * Give the proxy first shot at the filter. If it returns false, ask
+ * the filter to do it.
+ */
+ return (proxy && proxy->filterImage(this, src, ctm, result, loc)) ||
+ this->onFilterImage(proxy, src, ctm, result, loc);
+}
+
+bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
+ SkIRect* dst) {
+ SkASSERT(&src);
+ SkASSERT(dst);
+ return this->onFilterBounds(src, ctm, dst);
+}
+
+bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&,
+ SkBitmap*, SkIPoint*) {
+ return false;
+}
+
+bool SkImageFilter::canFilterImageGPU() const {
+ return false;
+}
+
+GrTexture* SkImageFilter::onFilterImageGPU(GrTexture* texture, const SkRect& rect) {
+ return NULL;
+}
+
+bool SkImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
+ SkIRect* dst) {
+ *dst = src;
+ return true;
+}
+
+bool SkImageFilter::asNewCustomStage(GrCustomStage**, GrTexture*) const {
+ return false;
+}
//////////// Move these to their own file soon.
-SK_DEFINE_INST_COUNT(SkImageFilter)
-
-bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
- const SkMatrix& ctm,
- SkBitmap* result, SkIPoint* loc) {
- SkASSERT(result);
- SkASSERT(loc);
- /*
- * Give the proxy first shot at the filter. If it returns false, ask
- * the filter to do it.
- */
- return (proxy && proxy->filterImage(this, src, ctm, result, loc)) ||
- this->onFilterImage(proxy, src, ctm, result, loc);
-}
-
-bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
- SkIRect* dst) {
- SkASSERT(&src);
- SkASSERT(dst);
- return this->onFilterBounds(src, ctm, dst);
-}
-
-bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&,
- SkBitmap*, SkIPoint*) {
- return false;
-}
-
-bool SkImageFilter::canFilterImageGPU() const {
- return false;
-}
-
-GrTexture* SkImageFilter::onFilterImageGPU(GrTexture* texture, const SkRect& rect) {
- return NULL;
-}
-
-bool SkImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
- SkIRect* dst) {
- *dst = src;
- return true;
-}
-
-bool SkImageFilter::asNewCustomStage(GrCustomStage**, GrTexture*) const {
- return false;
-}
-
-////////////////////
-
SK_DEFINE_INST_COUNT(SkDrawLooper)
bool SkDrawLooper::canComputeFastBounds(const SkPaint& paint) {