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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 const GrDeviceCoordTexture* dstCopy, | 225 const GrDeviceCoordTexture* dstCopy, |
226 const GrDrawTargetCaps& caps) const; | 226 const GrDrawTargetCaps& caps) const; |
227 | 227 |
228 /** | 228 /** |
229 * This function returns true if the GrXferProcessor generated from this fac
tory will be able to | 229 * This function returns true if the GrXferProcessor generated from this fac
tory will be able to |
230 * correctly blend when using RGB coverage. The knownColor and knownColorFla
gs represent the | 230 * correctly blend when using RGB coverage. The knownColor and knownColorFla
gs represent the |
231 * final computed color from the color stages. | 231 * final computed color from the color stages. |
232 */ | 232 */ |
233 virtual bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlag
s) const = 0; | 233 virtual bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlag
s) const = 0; |
234 | 234 |
235 /** | |
236 * Depending on color blend mode requested it may or may not be possible to
correctly blend with | |
237 * fractional pixel coverage generated by the fragment shader. | |
238 * | |
239 * This function considers the known color and coverage input into the xfer
processor and | |
240 * certain state information (colorWriteDisabled) to determine whether | |
241 * coverage can be handled correctly. | |
242 */ | |
243 virtual bool canApplyCoverage(const GrProcOptInfo& colorPOI, | |
244 const GrProcOptInfo& coveragePOI) const = 0; | |
245 | |
246 | |
247 struct InvariantOutput { | 235 struct InvariantOutput { |
248 bool fWillBlendWithDst; | 236 bool fWillBlendWithDst; |
249 GrColor fBlendedColor; | 237 GrColor fBlendedColor; |
250 uint32_t fBlendedColorFlags; | 238 uint32_t fBlendedColorFlags; |
251 }; | 239 }; |
252 | 240 |
253 /** | 241 /** |
254 * This function returns known information about the output of the xfer proc
essor produced by | 242 * This function returns known information about the output of the xfer proc
essor produced by |
255 * this xp factory. The invariant color information returned by this functio
n refers to the | 243 * this xp factory. The invariant color information returned by this functio
n refers to the |
256 * final color produced after all blending. | 244 * final color produced after all blending. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 enum { | 310 enum { |
323 kIllegalXPFClassID = 0, | 311 kIllegalXPFClassID = 0, |
324 }; | 312 }; |
325 static int32_t gCurrXPFClassID; | 313 static int32_t gCurrXPFClassID; |
326 | 314 |
327 typedef GrProgramElement INHERITED; | 315 typedef GrProgramElement INHERITED; |
328 }; | 316 }; |
329 | 317 |
330 #endif | 318 #endif |
331 | 319 |
OLD | NEW |