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