commit-bot@chromium.org | 1c4c9ef | 2013-08-07 00:07:51 +0000 | [diff] [blame] | 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: |
robertphillips | 225db44 | 2016-04-17 14:27:05 -0700 | [diff] [blame] | 15 | static sk_sp<SkImageFilter> Make(sk_sp<SkImageFilter> outer, sk_sp<SkImageFilter> inner); |
| 16 | |
senorblanco | e5e7984 | 2016-03-21 14:51:59 -0700 | [diff] [blame] | 17 | SkRect computeFastBounds(const SkRect& src) const override; |
commit-bot@chromium.org | cac5fd5 | 2014-03-10 10:51:58 +0000 | [diff] [blame] | 18 | |
robertphillips | f3f5bad | 2014-12-19 13:49:15 -0800 | [diff] [blame] | 19 | SK_TO_STRING_OVERRIDE() |
commit-bot@chromium.org | 1c4c9ef | 2013-08-07 00:07:51 +0000 | [diff] [blame] | 20 | SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter) |
| 21 | |
| 22 | protected: |
robertphillips | 491fb17 | 2016-03-30 12:32:58 -0700 | [diff] [blame] | 23 | explicit SkComposeImageFilter(sk_sp<SkImageFilter> inputs[2]) : INHERITED(inputs, 2, nullptr) { |
| 24 | SkASSERT(inputs[0].get()); |
| 25 | SkASSERT(inputs[1].get()); |
reed | 9fa60da | 2014-08-21 07:59:51 -0700 | [diff] [blame] | 26 | } |
robertphillips | 2302de9 | 2016-03-24 07:26:32 -0700 | [diff] [blame] | 27 | sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, |
| 28 | SkIPoint* offset) const override; |
Matt Sarett | 6d72ed9 | 2017-04-10 16:35:33 -0400 | [diff] [blame^] | 29 | sk_sp<SkImageFilter> onMakeColorSpace(SkColorSpaceXformer*) const override; |
senorblanco | e5e7984 | 2016-03-21 14:51:59 -0700 | [diff] [blame] | 30 | SkIRect onFilterBounds(const SkIRect&, const SkMatrix&, MapDirection) const override; |
reed | 96a04f3 | 2016-04-25 09:25:15 -0700 | [diff] [blame] | 31 | bool onCanHandleComplexCTM() const override { return true; } |
commit-bot@chromium.org | 1c4c9ef | 2013-08-07 00:07:51 +0000 | [diff] [blame] | 32 | |
commit-bot@chromium.org | 1c4c9ef | 2013-08-07 00:07:51 +0000 | [diff] [blame] | 33 | private: |
| 34 | typedef SkImageFilter INHERITED; |
| 35 | }; |
| 36 | |
| 37 | #endif |