1 /* 2 * Copyright 2013 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkComposeImageFilter_DEFINED 9 #define SkComposeImageFilter_DEFINED 10 11 #include "SkImageFilter.h" 12 13 class SK_API SkComposeImageFilter : public SkImageFilter { 14 public: 15 virtual ~SkComposeImageFilter(); 16 Create(SkImageFilter * outer,SkImageFilter * inner)17 static SkComposeImageFilter* Create(SkImageFilter* outer, SkImageFilter* inner) { 18 return SkNEW_ARGS(SkComposeImageFilter, (outer, inner)); 19 } 20 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter)21 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter) 22 23 protected: 24 SkComposeImageFilter(SkImageFilter* outer, SkImageFilter* inner) : INHERITED(outer, inner) {} 25 explicit SkComposeImageFilter(SkReadBuffer& buffer); 26 27 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 28 SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; 29 virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE; 30 31 private: 32 typedef SkImageFilter INHERITED; 33 }; 34 35 #endif 36