| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrDrawState_DEFINED | 8 #ifndef GrDrawState_DEFINED |
| 9 #define GrDrawState_DEFINED | 9 #define GrDrawState_DEFINED |
| 10 | 10 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 * where D is the existing destination color, S is the incoming source | 462 * where D is the existing destination color, S is the incoming source |
| 463 * color, and D' is the new destination color that will be written. sat() | 463 * color, and D' is the new destination color that will be written. sat() |
| 464 * is the saturation function. | 464 * is the saturation function. |
| 465 * | 465 * |
| 466 * @param srcCoef coefficient applied to the src color. | 466 * @param srcCoef coefficient applied to the src color. |
| 467 * @param dstCoef coefficient applied to the dst color. | 467 * @param dstCoef coefficient applied to the dst color. |
| 468 */ | 468 */ |
| 469 void setBlendFunc(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) { | 469 void setBlendFunc(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) { |
| 470 fCommon.fSrcBlend = srcCoeff; | 470 fCommon.fSrcBlend = srcCoeff; |
| 471 fCommon.fDstBlend = dstCoeff; | 471 fCommon.fDstBlend = dstCoeff; |
| 472 #if GR_DEBUG | 472 #ifdef SK_DEBUG |
| 473 if (GrBlendCoeffRefsDst(dstCoeff)) { | 473 if (GrBlendCoeffRefsDst(dstCoeff)) { |
| 474 GrPrintf("Unexpected dst blend coeff. Won't work correctly with cove
rage stages.\n"); | 474 GrPrintf("Unexpected dst blend coeff. Won't work correctly with cove
rage stages.\n"); |
| 475 } | 475 } |
| 476 if (GrBlendCoeffRefsSrc(srcCoeff)) { | 476 if (GrBlendCoeffRefsSrc(srcCoeff)) { |
| 477 GrPrintf("Unexpected src blend coeff. Won't work correctly with cove
rage stages.\n"); | 477 GrPrintf("Unexpected src blend coeff. Won't work correctly with cove
rage stages.\n"); |
| 478 } | 478 } |
| 479 #endif | 479 #endif |
| 480 } | 480 } |
| 481 | 481 |
| 482 GrBlendCoeff getSrcBlendCoeff() const { return fCommon.fSrcBlend; } | 482 GrBlendCoeff getSrcBlendCoeff() const { return fCommon.fSrcBlend; } |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. | 1076 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. |
| 1077 */ | 1077 */ |
| 1078 void setVertexAttribs(const GrVertexAttrib attribs[], int count); | 1078 void setVertexAttribs(const GrVertexAttrib attribs[], int count); |
| 1079 | 1079 |
| 1080 typedef GrRefCnt INHERITED; | 1080 typedef GrRefCnt INHERITED; |
| 1081 }; | 1081 }; |
| 1082 | 1082 |
| 1083 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 1083 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
| 1084 | 1084 |
| 1085 #endif | 1085 #endif |
| OLD | NEW |