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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 * @param dstCoef coefficient applied to the dst color. | 412 * @param dstCoef coefficient applied to the dst color. |
413 */ | 413 */ |
414 void setBlendFunc(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) { | 414 void setBlendFunc(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) { |
415 if (srcCoeff != fSrcBlend || dstCoeff != fDstBlend) { | 415 if (srcCoeff != fSrcBlend || dstCoeff != fDstBlend) { |
416 fSrcBlend = srcCoeff; | 416 fSrcBlend = srcCoeff; |
417 fDstBlend = dstCoeff; | 417 fDstBlend = dstCoeff; |
418 this->invalidateOptState(); | 418 this->invalidateOptState(); |
419 } | 419 } |
420 #ifdef SK_DEBUG | 420 #ifdef SK_DEBUG |
421 if (GrBlendCoeffRefsDst(dstCoeff)) { | 421 if (GrBlendCoeffRefsDst(dstCoeff)) { |
422 GrPrintf("Unexpected dst blend coeff. Won't work correctly with cove
rage stages.\n"); | 422 SkDebugf("Unexpected dst blend coeff. Won't work correctly with cove
rage stages.\n"); |
423 } | 423 } |
424 if (GrBlendCoeffRefsSrc(srcCoeff)) { | 424 if (GrBlendCoeffRefsSrc(srcCoeff)) { |
425 GrPrintf("Unexpected src blend coeff. Won't work correctly with cove
rage stages.\n"); | 425 SkDebugf("Unexpected src blend coeff. Won't work correctly with cove
rage stages.\n"); |
426 } | 426 } |
427 #endif | 427 #endif |
428 } | 428 } |
429 | 429 |
430 /** | 430 /** |
431 * Sets the blending function constant referenced by the following blending | 431 * Sets the blending function constant referenced by the following blending |
432 * coefficients: | 432 * coefficients: |
433 * kConstC_GrBlendCoeff | 433 * kConstC_GrBlendCoeff |
434 * kIConstC_GrBlendCoeff | 434 * kIConstC_GrBlendCoeff |
435 * kConstA_GrBlendCoeff | 435 * kConstA_GrBlendCoeff |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 mutable uint32_t fCachedCapsID; | 853 mutable uint32_t fCachedCapsID; |
854 | 854 |
855 friend class GrOptDrawState; | 855 friend class GrOptDrawState; |
856 | 856 |
857 typedef SkRefCnt INHERITED; | 857 typedef SkRefCnt INHERITED; |
858 }; | 858 }; |
859 | 859 |
860 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 860 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
861 | 861 |
862 #endif | 862 #endif |
OLD | NEW |