From cd9f55989e680b7f52fa21766dde0ac67ac9911f Mon Sep 17 00:00:00 2001 From: "senorblanco@chromium.org" Date: Fri, 26 Oct 2012 19:37:00 +0000 Subject: Add a factory Create function for SkColorFilterImageFilter, and move the matrix optimization there. This will allow the Chrome compositor to extract the optimized matrix, and potentially apply the color matrix itself, saving a buffer allocation & draw. Review URL: https://codereview.appspot.com/6739057 git-svn-id: http://skia.googlecode.com/svn/trunk@6152 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/effects/SkColorFilterImageFilter.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h index e9124f9123..bff9293816 100755 --- a/include/effects/SkColorFilterImageFilter.h +++ b/include/effects/SkColorFilterImageFilter.h @@ -14,7 +14,7 @@ class SkColorFilter; class SK_API SkColorFilterImageFilter : public SkSingleInputImageFilter { public: - SkColorFilterImageFilter(SkColorFilter* cf, SkImageFilter* input = NULL); + static SkColorFilterImageFilter* Create(SkColorFilter* cf, SkImageFilter* input = NULL); virtual ~SkColorFilterImageFilter(); SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter) @@ -29,6 +29,7 @@ protected: virtual SkColorFilter* asColorFilter() const SK_OVERRIDE; private: + SkColorFilterImageFilter(SkColorFilter* cf, SkImageFilter* input); SkColorFilter* fColorFilter; typedef SkSingleInputImageFilter INHERITED; -- cgit v1.2.3