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 static SkImageFilter* Create(SkXfermode* mode, SkImageFilter* background, | 24 static SkImageFilter* Create(SkXfermode* mode, SkImageFilter* background, |
25 SkImageFilter* foreground = NULL, | 25 SkImageFilter* foreground = NULL, |
26 const CropRect* cropRect = NULL) { | 26 const CropRect* cropRect = NULL) { |
27 SkImageFilter* inputs[2] = { background, foreground }; | 27 SkImageFilter* inputs[2] = { background, foreground }; |
28 return new SkXfermodeImageFilter(mode, inputs, cropRect); | 28 return new SkXfermodeImageFilter(mode, inputs, cropRect); |
29 } | 29 } |
30 | 30 |
31 SK_TO_STRING_OVERRIDE() | 31 SK_TO_STRING_OVERRIDE() |
32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter) | 32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter) |
33 | 33 |
34 bool onFilterImage(Proxy* proxy, | 34 bool onFilterImageDeprecated(Proxy* proxy, |
35 const SkBitmap& src, | 35 const SkBitmap& src, |
36 const Context& ctx, | 36 const Context& ctx, |
37 SkBitmap* dst, | 37 SkBitmap* dst, |
38 SkIPoint* offset) const override; | 38 SkIPoint* offset) const override; |
39 #if SK_SUPPORT_GPU | 39 #if SK_SUPPORT_GPU |
40 bool canFilterImageGPU() const override; | 40 bool canFilterImageGPU() const override; |
41 bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, | 41 bool filterImageGPUDeprecated(Proxy* proxy, const SkBitmap& src, const Conte
xt& ctx, |
42 SkBitmap* result, SkIPoint* offset) const override; | 42 SkBitmap* result, SkIPoint* offset) const over
ride; |
43 #endif | 43 #endif |
44 | 44 |
45 protected: | 45 protected: |
46 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2], | 46 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2], |
47 const CropRect* cropRect); | 47 const CropRect* cropRect); |
48 void flatten(SkWriteBuffer&) const override; | 48 void flatten(SkWriteBuffer&) const override; |
49 | 49 |
50 private: | 50 private: |
51 SkAutoTUnref<SkXfermode> fMode; | 51 SkAutoTUnref<SkXfermode> fMode; |
52 typedef SkImageFilter INHERITED; | 52 typedef SkImageFilter INHERITED; |
53 }; | 53 }; |
54 | 54 |
55 #endif | 55 #endif |
OLD | NEW |