| Index: include/gpu/GrXferProcessor.h
|
| diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h
|
| index 812ce5c64cb050372b3bac37a0489a33a23b913c..fa9dca211e8fcd24ea0fb81c4c8b743da09a33f8 100644
|
| --- a/include/gpu/GrXferProcessor.h
|
| +++ b/include/gpu/GrXferProcessor.h
|
| @@ -23,8 +23,6 @@ class GrProcOptInfo;
|
| * Equations for alpha-blending.
|
| */
|
| enum GrBlendEquation {
|
| - kInvalid_GrBlendEquation = -1,
|
| -
|
| // Basic blend equations.
|
| kAdd_GrBlendEquation, //<! Cs*S + Cd*D
|
| kSubtract_GrBlendEquation, //<! Cs*S - Cd*D
|
| @@ -47,11 +45,12 @@ enum GrBlendEquation {
|
| kHSLColor_GrBlendEquation,
|
| kHSLLuminosity_GrBlendEquation,
|
|
|
| - kTotalGrBlendEquationCount,
|
| -
|
| - kFirstAdvancedGrBlendEquation = kScreen_GrBlendEquation
|
| + kFirstAdvancedGrBlendEquation = kScreen_GrBlendEquation,
|
| + kLast_GrBlendEquation = kHSLLuminosity_GrBlendEquation
|
| };
|
|
|
| +static const int kGrBlendEquationCnt = kLast_GrBlendEquation + 1;
|
| +
|
| inline bool GrBlendEquationIsAdvanced(GrBlendEquation equation) {
|
| return equation >= kFirstAdvancedGrBlendEquation;
|
| }
|
| @@ -60,8 +59,6 @@ inline bool GrBlendEquationIsAdvanced(GrBlendEquation equation) {
|
| * Coeffecients for alpha-blending.
|
| */
|
| enum GrBlendCoeff {
|
| - kInvalid_GrBlendCoeff = -1,
|
| -
|
| kZero_GrBlendCoeff, //<! 0
|
| kOne_GrBlendCoeff, //<! 1
|
| kSC_GrBlendCoeff, //<! src color
|
| @@ -81,9 +78,11 @@ enum GrBlendCoeff {
|
| kS2A_GrBlendCoeff,
|
| kIS2A_GrBlendCoeff,
|
|
|
| - kTotalGrBlendCoeffCount
|
| + kLast_GrBlendCoeff = kIS2A_GrBlendCoeff
|
| };
|
|
|
| +static const int kGrBlendCoeffCnt = kLast_GrBlendCoeff + 1;
|
| +
|
| /**
|
| * Barriers for blending. When a shader reads the dst directly, an Xfer barrier is sometimes
|
| * required after a pixel has been written, before it can be safely read again.
|
| @@ -187,6 +186,8 @@ public:
|
| fWriteColor = true;
|
| }
|
|
|
| + SkDEBUGCODE(SkString dump() const;)
|
| +
|
| GrBlendEquation fEquation;
|
| GrBlendCoeff fSrcBlend;
|
| GrBlendCoeff fDstBlend;
|
|
|