| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 The Android Open Source Project | 2 * Copyright 2013 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 SkXfermodeImageFilter_DEFINED | 8 #ifndef SkXfermodeImageFilter_DEFINED |
| 9 #define SkXfermodeImageFilter_DEFINED | 9 #define SkXfermodeImageFilter_DEFINED |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 virtual ~SkXfermodeImageFilter(); | 24 virtual ~SkXfermodeImageFilter(); |
| 25 | 25 |
| 26 static SkXfermodeImageFilter* Create(SkXfermode* mode, SkImageFilter* backgr
ound, | 26 static SkXfermodeImageFilter* Create(SkXfermode* mode, SkImageFilter* backgr
ound, |
| 27 SkImageFilter* foreground = NULL, | 27 SkImageFilter* foreground = NULL, |
| 28 const CropRect* cropRect = NULL, | 28 const CropRect* cropRect = NULL, |
| 29 uint32_t uniqueID = 0) { | 29 uint32_t uniqueID = 0) { |
| 30 SkImageFilter* inputs[2] = { background, foreground }; | 30 SkImageFilter* inputs[2] = { background, foreground }; |
| 31 return SkNEW_ARGS(SkXfermodeImageFilter, (mode, inputs, cropRect, unique
ID)); | 31 return SkNEW_ARGS(SkXfermodeImageFilter, (mode, inputs, cropRect, unique
ID)); |
| 32 } | 32 } |
| 33 | 33 |
| 34 SK_TO_STRING_OVERRIDE() |
| 34 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter) | 35 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter) |
| 35 | 36 |
| 36 virtual bool onFilterImage(Proxy* proxy, | 37 virtual bool onFilterImage(Proxy* proxy, |
| 37 const SkBitmap& src, | 38 const SkBitmap& src, |
| 38 const Context& ctx, | 39 const Context& ctx, |
| 39 SkBitmap* dst, | 40 SkBitmap* dst, |
| 40 SkIPoint* offset) const SK_OVERRIDE; | 41 SkIPoint* offset) const SK_OVERRIDE; |
| 41 #if SK_SUPPORT_GPU | 42 #if SK_SUPPORT_GPU |
| 42 virtual bool canFilterImageGPU() const SK_OVERRIDE; | 43 virtual bool canFilterImageGPU() const SK_OVERRIDE; |
| 43 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
& ctx, | 44 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
& ctx, |
| 44 SkBitmap* result, SkIPoint* offset) const SK_OVE
RRIDE; | 45 SkBitmap* result, SkIPoint* offset) const SK_OVE
RRIDE; |
| 45 #endif | 46 #endif |
| 46 | 47 |
| 47 protected: | 48 protected: |
| 48 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2], | 49 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2], |
| 49 const CropRect* cropRect, uint32_t uniqueID); | 50 const CropRect* cropRect, uint32_t uniqueID); |
| 50 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 51 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 SkXfermode* fMode; | 54 SkXfermode* fMode; |
| 54 typedef SkImageFilter INHERITED; | 55 typedef SkImageFilter INHERITED; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 #endif | 58 #endif |
| OLD | NEW |