| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 SkXfermode_DEFINED | 8 #ifndef SkXfermode_DEFINED |
| 9 #define SkXfermode_DEFINED | 9 #define SkXfermode_DEFINED |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return IsOpaque(xfer.get(), opacityType); | 213 return IsOpaque(xfer.get(), opacityType); |
| 214 } | 214 } |
| 215 | 215 |
| 216 #if SK_SUPPORT_GPU | 216 #if SK_SUPPORT_GPU |
| 217 /** Used by the SkXfermodeImageFilter to blend two colors via a GrFragmentPr
ocessor. | 217 /** Used by the SkXfermodeImageFilter to blend two colors via a GrFragmentPr
ocessor. |
| 218 The input to the returned FP is the src color. The dst color is | 218 The input to the returned FP is the src color. The dst color is |
| 219 provided by the dst param which becomes a child FP of the returned FP. | 219 provided by the dst param which becomes a child FP of the returned FP. |
| 220 It is legal for the function to return a null output. This indicates tha
t | 220 It is legal for the function to return a null output. This indicates tha
t |
| 221 the output of the blend is simply the src color. | 221 the output of the blend is simply the src color. |
| 222 */ | 222 */ |
| 223 virtual const GrFragmentProcessor* getFragmentProcessorForImageFilter( | 223 virtual sk_sp<GrFragmentProcessor> makeFragmentProcessorForImageFilter( |
| 224 const GrFragmentProc
essor* dst) const; | 224 sk_sp<GrFragmentProc
essor> dst) const; |
| 225 | 225 |
| 226 /** A subclass must implement this factory function to work with the GPU bac
kend. | 226 /** A subclass must implement this factory function to work with the GPU bac
kend. |
| 227 The xfermode will return a factory for which the caller will get a ref.
It is up | 227 The xfermode will return a factory for which the caller will get a ref.
It is up |
| 228 to the caller to install it. XferProcessors cannot use a background text
ure. | 228 to the caller to install it. XferProcessors cannot use a background text
ure. |
| 229 */ | 229 */ |
| 230 virtual GrXPFactory* asXPFactory() const; | 230 virtual sk_sp<GrXPFactory> asXPFactory() const; |
| 231 #endif | 231 #endif |
| 232 | 232 |
| 233 SK_TO_STRING_PUREVIRT() | 233 SK_TO_STRING_PUREVIRT() |
| 234 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 234 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
| 235 SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) | 235 SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) |
| 236 | 236 |
| 237 enum D32Flags { | 237 enum D32Flags { |
| 238 kSrcIsOpaque_D32Flag = 1 << 0, | 238 kSrcIsOpaque_D32Flag = 1 << 0, |
| 239 kSrcIsSingle_D32Flag = 1 << 1, | 239 kSrcIsSingle_D32Flag = 1 << 1, |
| 240 kDstIsSRGB_D32Flag = 1 << 2, | 240 kDstIsSRGB_D32Flag = 1 << 2, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 284 |
| 285 private: | 285 private: |
| 286 enum { | 286 enum { |
| 287 kModeCount = kLastMode + 1 | 287 kModeCount = kLastMode + 1 |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 typedef SkFlattenable INHERITED; | 290 typedef SkFlattenable INHERITED; |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 #endif | 293 #endif |
| OLD | NEW |