Chromium Code Reviews| 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 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 kSoftLight_Mode, | 119 kSoftLight_Mode, |
| 120 kDifference_Mode, | 120 kDifference_Mode, |
| 121 kExclusion_Mode, | 121 kExclusion_Mode, |
| 122 kMultiply_Mode, | 122 kMultiply_Mode, |
| 123 | 123 |
| 124 kHue_Mode, | 124 kHue_Mode, |
| 125 kSaturation_Mode, | 125 kSaturation_Mode, |
| 126 kColor_Mode, | 126 kColor_Mode, |
| 127 kLuminosity_Mode, | 127 kLuminosity_Mode, |
| 128 | 128 |
| 129 kLastMode = kLuminosity_Mode | 129 kLastMode = kLuminosity_Mode, |
| 130 }; | |
| 131 enum { | |
| 132 kModeCount = kLastMode + 1 | |
|
reed1
2013/03/28 13:13:07
Why is this public now?
tfarina
2013/03/28 21:41:48
So I can use it at line 267 of SkDrawPaint.cpp
xfe
| |
| 130 }; | 133 }; |
| 131 | 134 |
| 132 /** | 135 /** |
| 133 * If the xfermode is one of the modes in the Mode enum, then asMode() | 136 * If the xfermode is one of the modes in the Mode enum, then asMode() |
| 134 * returns true and sets (if not null) mode accordingly. Otherwise it | 137 * returns true and sets (if not null) mode accordingly. Otherwise it |
| 135 * returns false and ignores the mode parameter. | 138 * returns false and ignores the mode parameter. |
| 136 */ | 139 */ |
| 137 virtual bool asMode(Mode* mode) const; | 140 virtual bool asMode(Mode* mode) const; |
| 138 | 141 |
| 139 /** | 142 /** |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 method, 1 color at a time (upscaled to a SkPMColor). The default | 211 method, 1 color at a time (upscaled to a SkPMColor). The default |
| 209 implmentation of this method just returns dst. If performance is | 212 implmentation of this method just returns dst. If performance is |
| 210 important, your subclass should override xfer32/xfer16/xferA8 directly. | 213 important, your subclass should override xfer32/xfer16/xferA8 directly. |
| 211 | 214 |
| 212 This method will not be called directly by the client, so it need not | 215 This method will not be called directly by the client, so it need not |
| 213 be implemented if your subclass has overridden xfer32/xfer16/xferA8 | 216 be implemented if your subclass has overridden xfer32/xfer16/xferA8 |
| 214 */ | 217 */ |
| 215 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; | 218 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; |
| 216 | 219 |
| 217 private: | 220 private: |
| 218 enum { | |
| 219 kModeCount = kLastMode + 1 | |
| 220 }; | |
| 221 typedef SkFlattenable INHERITED; | 221 typedef SkFlattenable INHERITED; |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 /////////////////////////////////////////////////////////////////////////////// | 224 /////////////////////////////////////////////////////////////////////////////// |
| 225 | 225 |
| 226 /** \class SkProcXfermode | 226 /** \class SkProcXfermode |
| 227 | 227 |
| 228 SkProcXfermode is a xfermode that applies the specified proc to its colors. | 228 SkProcXfermode is a xfermode that applies the specified proc to its colors. |
| 229 This class is not exported to java. | 229 This class is not exported to java. |
| 230 */ | 230 */ |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 254 fProc = proc; | 254 fProc = proc; |
| 255 } | 255 } |
| 256 | 256 |
| 257 private: | 257 private: |
| 258 SkXfermodeProc fProc; | 258 SkXfermodeProc fProc; |
| 259 | 259 |
| 260 typedef SkXfermode INHERITED; | 260 typedef SkXfermode INHERITED; |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 #endif | 263 #endif |
| OLD | NEW |