| 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 virtual ~SkColorFilterImageFilter(); | 20 virtual ~SkColorFilterImageFilter(); |
| 21 | 21 |
| 22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter
) | 22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter
) |
| 23 | 23 |
| 24 protected: | 24 protected: |
| 25 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
| 25 SkColorFilterImageFilter(SkReadBuffer& buffer); | 26 SkColorFilterImageFilter(SkReadBuffer& buffer); |
| 27 #endif |
| 26 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 28 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 27 | 29 |
| 28 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 30 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
| 29 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; | 31 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; |
| 30 | 32 |
| 31 virtual bool asColorFilter(SkColorFilter**) const SK_OVERRIDE; | 33 virtual bool asColorFilter(SkColorFilter**) const SK_OVERRIDE; |
| 32 | 34 |
| 33 private: | 35 private: |
| 34 SkColorFilterImageFilter(SkColorFilter* cf, | 36 SkColorFilterImageFilter(SkColorFilter* cf, |
| 35 SkImageFilter* input, | 37 SkImageFilter* input, |
| 36 const CropRect* cropRect); | 38 const CropRect* cropRect); |
| 37 SkColorFilter* fColorFilter; | 39 SkColorFilter* fColorFilter; |
| 38 | 40 |
| 39 typedef SkImageFilter INHERITED; | 41 typedef SkImageFilter INHERITED; |
| 40 }; | 42 }; |
| 41 | 43 |
| 42 #endif | 44 #endif |
| OLD | NEW |