aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/include/GrDrawTarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/include/GrDrawTarget.h')
-rw-r--r--gpu/include/GrDrawTarget.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gpu/include/GrDrawTarget.h b/gpu/include/GrDrawTarget.h
index aef5937ea7..35f912b7c4 100644
--- a/gpu/include/GrDrawTarget.h
+++ b/gpu/include/GrDrawTarget.h
@@ -136,6 +136,7 @@ protected:
uint32_t fFlagBits;
GrBlendCoeff fSrcBlend;
GrBlendCoeff fDstBlend;
+ GrColor fBlendConstant;
GrTexture* fTextures[kNumStages];
GrSamplerState fSamplerStates[kNumStages];
GrRenderTarget* fRenderTarget;
@@ -359,6 +360,24 @@ public:
void setBlendFunc(GrBlendCoeff srcCoef, GrBlendCoeff dstCoef);
/**
+ * Sets the blending function constant referenced by the following blending
+ * coeffecients:
+ * kConstC_BlendCoeff
+ * kIConstC_BlendCoeff
+ * kConstA_BlendCoeff
+ * kIConstA_BlendCoeff
+ *
+ * @param constant the constant to set
+ */
+ void setBlendConstant(GrColor constant) { fCurrDrawState.fBlendConstant = constant; }
+
+ /**
+ * Retrieves the last value set by setBlendConstant()
+ * @return the blending constant value
+ */
+ GrColor getBlendConstant() const { return fCurrDrawState.fBlendConstant; }
+
+ /**
* Used to save and restore the GrGpu's drawing state
*/
struct SavedDrawState {