aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-04 14:18:50 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-04 14:18:50 +0000
commit4a9a612b5200597cca0bda0a356250835cbdc7d6 (patch)
tree16a20cea727af413d5e4dae8597b801b859b5004 /include
parent8182fa0cac76e7e6d583aebba060229230516887 (diff)
Pull SkMergeImageFilter out into its own file.
Review URL: https://codereview.appspot.com/6873052 git-svn-id: http://skia.googlecode.com/svn/trunk@6662 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rwxr-xr-xinclude/effects/SkMergeImageFilter.h46
-rwxr-xr-xinclude/effects/SkTestImageFilters.h34
2 files changed, 46 insertions, 34 deletions
diff --git a/include/effects/SkMergeImageFilter.h b/include/effects/SkMergeImageFilter.h
new file mode 100755
index 0000000000..8c4313dd13
--- /dev/null
+++ b/include/effects/SkMergeImageFilter.h
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+#ifndef SkMergeImageFilter_DEFINED
+#define SkMergeImageFilter_DEFINED
+
+#include "SkImageFilter.h"
+
+#include "SkXfermode.h"
+
+class SK_API SkMergeImageFilter : public SkImageFilter {
+public:
+ SkMergeImageFilter(SkImageFilter* first, SkImageFilter* second,
+ SkXfermode::Mode = SkXfermode::kSrcOver_Mode);
+ SkMergeImageFilter(SkImageFilter* filters[], int count,
+ const SkXfermode::Mode modes[] = NULL);
+ virtual ~SkMergeImageFilter();
+
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter)
+
+protected:
+ SkMergeImageFilter(SkFlattenableReadBuffer& buffer);
+ virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
+
+ virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
+ SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
+ virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
+
+private:
+ uint8_t* fModes; // SkXfermode::Mode
+
+ // private storage, to avoid dynamically allocating storage for our copy
+ // of the modes (unless the count is so large we can't fit).
+ intptr_t fStorage[16];
+
+ void initAllocModes();
+ void initModes(const SkXfermode::Mode []);
+
+ typedef SkImageFilter INHERITED;
+};
+
+#endif
diff --git a/include/effects/SkTestImageFilters.h b/include/effects/SkTestImageFilters.h
index 2a3178e62c..c38c03793b 100755
--- a/include/effects/SkTestImageFilters.h
+++ b/include/effects/SkTestImageFilters.h
@@ -22,40 +22,6 @@ private:
typedef SkImageFilter INHERITED;
};
-#include "SkXfermode.h"
-
-class SK_API SkMergeImageFilter : public SkImageFilter {
-public:
- SkMergeImageFilter(SkImageFilter* first, SkImageFilter* second,
- SkXfermode::Mode = SkXfermode::kSrcOver_Mode);
- SkMergeImageFilter(SkImageFilter* filters[], int count,
- const SkXfermode::Mode modes[] = NULL);
- virtual ~SkMergeImageFilter();
-
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter)
-
-protected:
- SkMergeImageFilter(SkFlattenableReadBuffer& buffer);
- virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
- virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
- SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
- virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
-
-private:
- uint8_t* fModes; // SkXfermode::Mode
- int fCount;
-
- // private storage, to avoid dynamically allocating storage for our copy
- // of the filters and modes (unless fCount is so large we can't fit).
- intptr_t fStorage[16];
-
- void initAllocModes();
- void initModes(const SkXfermode::Mode []);
-
- typedef SkImageFilter INHERITED;
-};
-
///////////////////////////////////////////////////////////////////////////////
// Fun mode that scales down (only) and then scales back up to look pixelated