| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 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 GrXferProcessor_DEFINED | 8 #ifndef GrXferProcessor_DEFINED |
| 9 #define GrXferProcessor_DEFINED | 9 #define GrXferProcessor_DEFINED |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 const GrDeviceCoordTexture* dstCopy, | 193 const GrDeviceCoordTexture* dstCopy, |
| 194 const GrDrawTargetCaps& caps) const; | 194 const GrDrawTargetCaps& caps) const; |
| 195 | 195 |
| 196 /** | 196 /** |
| 197 * This function returns true if the GrXferProcessor generated from this fac
tory will be able to | 197 * This function returns true if the GrXferProcessor generated from this fac
tory will be able to |
| 198 * correctly blend when using RGB coverage. The knownColor and knownColorFla
gs represent the | 198 * correctly blend when using RGB coverage. The knownColor and knownColorFla
gs represent the |
| 199 * final computed color from the color stages. | 199 * final computed color from the color stages. |
| 200 */ | 200 */ |
| 201 virtual bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlag
s) const = 0; | 201 virtual bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlag
s) const = 0; |
| 202 | 202 |
| 203 /** | |
| 204 * Depending on color blend mode requested it may or may not be possible to
correctly blend with | |
| 205 * fractional pixel coverage generated by the fragment shader. | |
| 206 * | |
| 207 * This function considers the known color and coverage input into the xfer
processor and | |
| 208 * certain state information (colorWriteDisabled) to determine whether | |
| 209 * coverage can be handled correctly. | |
| 210 */ | |
| 211 virtual bool canApplyCoverage(const GrProcOptInfo& colorPOI, | |
| 212 const GrProcOptInfo& coveragePOI) const = 0; | |
| 213 | |
| 214 | |
| 215 struct InvariantOutput { | 203 struct InvariantOutput { |
| 216 bool fWillBlendWithDst; | 204 bool fWillBlendWithDst; |
| 217 GrColor fBlendedColor; | 205 GrColor fBlendedColor; |
| 218 uint32_t fBlendedColorFlags; | 206 uint32_t fBlendedColorFlags; |
| 219 }; | 207 }; |
| 220 | 208 |
| 221 /** | 209 /** |
| 222 * This function returns known information about the output of the xfer proc
essor produced by | 210 * This function returns known information about the output of the xfer proc
essor produced by |
| 223 * this xp factory. The invariant color information returned by this functio
n refers to the | 211 * this xp factory. The invariant color information returned by this functio
n refers to the |
| 224 * final color produced after all blending. | 212 * final color produced after all blending. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 enum { | 278 enum { |
| 291 kIllegalXPFClassID = 0, | 279 kIllegalXPFClassID = 0, |
| 292 }; | 280 }; |
| 293 static int32_t gCurrXPFClassID; | 281 static int32_t gCurrXPFClassID; |
| 294 | 282 |
| 295 typedef GrProgramElement INHERITED; | 283 typedef GrProgramElement INHERITED; |
| 296 }; | 284 }; |
| 297 | 285 |
| 298 #endif | 286 #endif |
| 299 | 287 |
| OLD | NEW |