OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkColorFilterImageFilter_DEFINED | 8 #ifndef SkColorFilterImageFilter_DEFINED |
9 #define SkColorFilterImageFilter_DEFINED | 9 #define SkColorFilterImageFilter_DEFINED |
10 | 10 |
11 #include "SkImageFilter.h" | 11 #include "SkImageFilter.h" |
12 | 12 |
13 class SkColorFilter; | 13 class SkColorFilter; |
14 | 14 |
15 class SK_API SkColorFilterImageFilter : public SkImageFilter { | 15 class SK_API SkColorFilterImageFilter : public SkImageFilter { |
16 public: | 16 public: |
17 static SkColorFilterImageFilter* Create(SkColorFilter* cf, | 17 static SkColorFilterImageFilter* Create(SkColorFilter* cf, |
18 SkImageFilter* input = NULL, | 18 SkImageFilter* input = NULL, |
19 const CropRect* cropRect = NULL, | 19 const CropRect* cropRect = NULL, |
20 uint32_t uniqueID = 0); | 20 uint32_t uniqueID = 0); |
21 virtual ~SkColorFilterImageFilter(); | 21 virtual ~SkColorFilterImageFilter(); |
22 | 22 |
23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter
) | 23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter
) |
24 | 24 |
25 protected: | 25 protected: |
| 26 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
| 27 SkColorFilterImageFilter(SkReadBuffer& buffer); |
| 28 #endif |
26 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 29 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
27 | 30 |
28 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 31 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
29 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; | 32 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; |
30 | 33 |
31 virtual bool asColorFilter(SkColorFilter**) const SK_OVERRIDE; | 34 virtual bool asColorFilter(SkColorFilter**) const SK_OVERRIDE; |
32 | 35 |
33 private: | 36 private: |
34 SkColorFilterImageFilter(SkColorFilter* cf, | 37 SkColorFilterImageFilter(SkColorFilter* cf, |
35 SkImageFilter* input, | 38 SkImageFilter* input, |
36 const CropRect* cropRect, | 39 const CropRect* cropRect, |
37 uint32_t uniqueID); | 40 uint32_t uniqueID); |
38 SkColorFilter* fColorFilter; | 41 SkColorFilter* fColorFilter; |
39 | 42 |
40 typedef SkImageFilter INHERITED; | 43 typedef SkImageFilter INHERITED; |
41 }; | 44 }; |
42 | 45 |
43 #endif | 46 #endif |
OLD | NEW |