| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 /** Return an SkXfermode object for the specified mode. | 140 /** Return an SkXfermode object for the specified mode. |
| 141 */ | 141 */ |
| 142 static SkXfermode* Create(Mode mode); | 142 static SkXfermode* Create(Mode mode); |
| 143 | 143 |
| 144 /** Return a function pointer to a routine that applies the specified | 144 /** Return a function pointer to a routine that applies the specified |
| 145 porter-duff transfer mode. | 145 porter-duff transfer mode. |
| 146 */ | 146 */ |
| 147 static SkXfermodeProc GetProc(Mode mode); | 147 static SkXfermodeProc GetProc(Mode mode); |
| 148 | 148 |
| 149 /** Return a function pointer to a routine that applies the specified | |
| 150 porter-duff transfer mode and srcColor to a 16bit device color. Note, | |
| 151 if the mode+srcColor might return a non-opaque color, then there is not | |
| 152 16bit proc, and this will return NULL. | |
| 153 */ | |
| 154 static SkXfermodeProc16 GetProc16(Mode mode, SkColor srcColor); | |
| 155 | |
| 156 /** | 149 /** |
| 157 * If the specified mode can be represented by a pair of Coeff, then return | 150 * If the specified mode can be represented by a pair of Coeff, then return |
| 158 * true and set (if not NULL) the corresponding coeffs. If the mode is | 151 * true and set (if not NULL) the corresponding coeffs. If the mode is |
| 159 * not representable as a pair of Coeffs, return false and ignore the | 152 * not representable as a pair of Coeffs, return false and ignore the |
| 160 * src and dst parameters. | 153 * src and dst parameters. |
| 161 */ | 154 */ |
| 162 static bool ModeAsCoeff(Mode mode, Coeff* src, Coeff* dst); | 155 static bool ModeAsCoeff(Mode mode, Coeff* src, Coeff* dst); |
| 163 | 156 |
| 164 SK_ATTR_DEPRECATED("use AsMode(...)") | 157 SK_ATTR_DEPRECATED("use AsMode(...)") |
| 165 static bool IsMode(const SkXfermode* xfer, Mode* mode) { | 158 static bool IsMode(const SkXfermode* xfer, Mode* mode) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 236 |
| 244 private: | 237 private: |
| 245 enum { | 238 enum { |
| 246 kModeCount = kLastMode + 1 | 239 kModeCount = kLastMode + 1 |
| 247 }; | 240 }; |
| 248 | 241 |
| 249 typedef SkFlattenable INHERITED; | 242 typedef SkFlattenable INHERITED; |
| 250 }; | 243 }; |
| 251 | 244 |
| 252 #endif | 245 #endif |
| OLD | NEW |