| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkXfermode_DEFINED | 10 #ifndef SkXfermode_DEFINED |
| 11 #define SkXfermode_DEFINED | 11 #define SkXfermode_DEFINED |
| 12 | 12 |
| 13 #include "SkFlattenable.h" | 13 #include "SkFlattenable.h" |
| 14 #include "SkColor.h" | 14 #include "SkColor.h" |
| 15 | 15 |
| 16 class GrFragmentProcessor; | 16 class GrFragmentProcessor; |
| 17 class GrTexture; | 17 class GrTexture; |
| 18 class GrXPFactory; | 18 class GrXPFactory; |
| 19 class SkString; | 19 class SkString; |
| 20 class SkValue; |
| 20 | 21 |
| 21 /** \class SkXfermode | 22 /** \class SkXfermode |
| 22 * | 23 * |
| 23 * SkXfermode is the base class for objects that are called to implement custom | 24 * SkXfermode is the base class for objects that are called to implement custom |
| 24 * "transfer-modes" in the drawing pipeline. The static function Create(Modes) | 25 * "transfer-modes" in the drawing pipeline. The static function Create(Modes) |
| 25 * can be called to return an instance of any of the predefined subclasses as | 26 * can be called to return an instance of any of the predefined subclasses as |
| 26 * specified in the Modes enum. When an SkXfermode is assigned to an SkPaint, | 27 * specified in the Modes enum. When an SkXfermode is assigned to an SkPaint, |
| 27 * then objects drawn with that paint have the xfermode applied. | 28 * then objects drawn with that paint have the xfermode applied. |
| 28 * | 29 * |
| 29 * All subclasses are required to be reentrant-safe : it must be legal to share | 30 * All subclasses are required to be reentrant-safe : it must be legal to share |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 This method will not be called directly by the client, so it need not | 240 This method will not be called directly by the client, so it need not |
| 240 be implemented if your subclass has overridden xfer32/xfer16/xferA8 | 241 be implemented if your subclass has overridden xfer32/xfer16/xferA8 |
| 241 */ | 242 */ |
| 242 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; | 243 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; |
| 243 | 244 |
| 244 private: | 245 private: |
| 245 enum { | 246 enum { |
| 246 kModeCount = kLastMode + 1 | 247 kModeCount = kLastMode + 1 |
| 247 }; | 248 }; |
| 248 | 249 |
| 250 template<typename T> friend SkValue SkToValue(const T*); |
| 251 virtual SkValue asValue() const; |
| 252 |
| 249 typedef SkFlattenable INHERITED; | 253 typedef SkFlattenable INHERITED; |
| 250 }; | 254 }; |
| 251 | 255 |
| 252 #endif | 256 #endif |
| OLD | NEW |