| 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 SkPorterDuff_DEFINED | 8 #ifndef SkPorterDuff_DEFINED |
| 9 #define SkPorterDuff_DEFINED | 9 #define SkPorterDuff_DEFINED |
| 10 | 10 |
| 11 #include "SkColor.h" | 11 #include "SkColor.h" |
| 12 #include "SkXfermode.h" | 12 #include "SkXfermode.h" |
| 13 | 13 |
| 14 //#define SK_SUPPORT_LEGACY_PORTER_DUFF |
| 15 |
| 16 // Temporary guard until we can remove the dependencies in android. Then we |
| 17 // plan to remove this entirely. |
| 18 #ifdef SK_SUPPORT_LEGACY_PORTER_DUFF |
| 19 |
| 14 class SkXfermode; | 20 class SkXfermode; |
| 15 | 21 |
| 16 class SK_API SkPorterDuff { | 22 class SK_API SkPorterDuff { |
| 17 public: | 23 public: |
| 18 /** List of predefined xfermodes. In general, the algebra for the modes | 24 /** List of predefined xfermodes. In general, the algebra for the modes |
| 19 uses the following symbols: | 25 uses the following symbols: |
| 20 Sa, Sc - source alpha and color | 26 Sa, Sc - source alpha and color |
| 21 Da, Dc - destination alpha and color (before compositing) | 27 Da, Dc - destination alpha and color (before compositing) |
| 22 [a, c] - Resulting (alpha, color) values | 28 [a, c] - Resulting (alpha, color) values |
| 23 For these equations, the colors are in premultiplied state. | 29 For these equations, the colors are in premultiplied state. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return false and ignore the mode parameter. | 76 return false and ignore the mode parameter. |
| 71 */ | 77 */ |
| 72 static bool IsMode(SkXfermode*, Mode* mode); | 78 static bool IsMode(SkXfermode*, Mode* mode); |
| 73 | 79 |
| 74 /** Return the corersponding SkXfermode::Mode | 80 /** Return the corersponding SkXfermode::Mode |
| 75 */ | 81 */ |
| 76 static SkXfermode::Mode ToXfermodeMode(Mode); | 82 static SkXfermode::Mode ToXfermodeMode(Mode); |
| 77 } SK_ATTR_DEPRECATED("use SkXfermode::Mode"); | 83 } SK_ATTR_DEPRECATED("use SkXfermode::Mode"); |
| 78 | 84 |
| 79 #endif | 85 #endif |
| 86 |
| 87 #endif |
| OLD | NEW |