| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 * blend with the destination color. | 309 * blend with the destination color. |
| 310 */ | 310 */ |
| 311 class GrXPFactory : public SkRefCnt { | 311 class GrXPFactory : public SkRefCnt { |
| 312 public: | 312 public: |
| 313 typedef GrXferProcessor::DstTexture DstTexture; | 313 typedef GrXferProcessor::DstTexture DstTexture; |
| 314 GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI, | 314 GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI, |
| 315 const GrProcOptInfo& coveragePOI, | 315 const GrProcOptInfo& coveragePOI, |
| 316 bool hasMixedSamples, | 316 bool hasMixedSamples, |
| 317 const DstTexture*, | 317 const DstTexture*, |
| 318 const GrCaps& caps) const; | 318 const GrCaps& caps) const; |
| 319 | |
| 320 /** | |
| 321 * This function returns true if the GrXferProcessor generated from this fac
tory will be able to | |
| 322 * correctly blend when using RGB coverage. The knownColor and knownColorFla
gs represent the | |
| 323 * final computed color from the color stages. | |
| 324 */ | |
| 325 virtual bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlag
s) const = 0; | |
| 326 | |
| 327 /** | 319 /** |
| 328 * Known color information after blending, but before accounting for any cov
erage. | 320 * Known color information after blending, but before accounting for any cov
erage. |
| 329 */ | 321 */ |
| 330 struct InvariantBlendedColor { | 322 struct InvariantBlendedColor { |
| 331 bool fWillBlendWithDst; | 323 bool fWillBlendWithDst; |
| 332 GrColor fKnownColor; | 324 GrColor fKnownColor; |
| 333 GrColorComponentFlags fKnownColorFlags; | 325 GrColorComponentFlags fKnownColorFlags; |
| 334 }; | 326 }; |
| 335 | 327 |
| 336 /** | 328 /** |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 enum { | 393 enum { |
| 402 kIllegalXPFClassID = 0, | 394 kIllegalXPFClassID = 0, |
| 403 }; | 395 }; |
| 404 static int32_t gCurrXPFClassID; | 396 static int32_t gCurrXPFClassID; |
| 405 | 397 |
| 406 typedef GrProgramElement INHERITED; | 398 typedef GrProgramElement INHERITED; |
| 407 }; | 399 }; |
| 408 | 400 |
| 409 #endif | 401 #endif |
| 410 | 402 |
| OLD | NEW |