| Index: src/gpu/GrDrawState.cpp
|
| diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
|
| index f6397446658b588c0043acbf58024b1e5cbfdde1..642ec2669ff9e348f49153b400c75009587dc7cc 100644
|
| --- a/src/gpu/GrDrawState.cpp
|
| +++ b/src/gpu/GrDrawState.cpp
|
| @@ -15,17 +15,9 @@
|
|
|
| GrOptDrawState* GrDrawState::createOptState() const {
|
| if (NULL == fCachedOptState) {
|
| - GrBlendCoeff srcCoeff;
|
| - GrBlendCoeff dstCoeff;
|
| - BlendOptFlags blendFlags = this->getBlendOpts(false, &srcCoeff, &dstCoeff);
|
| - fCachedOptState = SkNEW_ARGS(GrOptDrawState, (*this, blendFlags, srcCoeff, dstCoeff));
|
| + fCachedOptState = SkNEW_ARGS(GrOptDrawState, (*this));
|
| } else {
|
| -#ifdef SK_DEBUG
|
| - GrBlendCoeff srcCoeff;
|
| - GrBlendCoeff dstCoeff;
|
| - BlendOptFlags blendFlags = this->getBlendOpts(false, &srcCoeff, &dstCoeff);
|
| - SkASSERT(GrOptDrawState(*this, blendFlags, srcCoeff, dstCoeff) == *fCachedOptState);
|
| -#endif
|
| + SkASSERT(GrOptDrawState(*this) == *fCachedOptState);
|
| }
|
| fCachedOptState->ref();
|
| return fCachedOptState;
|
| @@ -114,6 +106,9 @@
|
| }
|
| fColorStages = that.fColorStages;
|
| fCoverageStages = that.fCoverageStages;
|
| + fOptSrcBlend = that.fOptSrcBlend;
|
| + fOptDstBlend = that.fOptDstBlend;
|
| + fBlendOptFlags = that.fBlendOptFlags;
|
|
|
| fHints = that.fHints;
|
|
|
| @@ -304,7 +299,7 @@
|
| // or c) the src, dst blend coeffs are 1,0 and we will read Dst Color
|
| GrBlendCoeff srcCoeff;
|
| GrBlendCoeff dstCoeff;
|
| - BlendOptFlags flag = this->getBlendOpts(true, &srcCoeff, &dstCoeff);
|
| + GrRODrawState::BlendOptFlags flag = this->getBlendOpts(true, &srcCoeff, &dstCoeff);
|
| return GrRODrawState::kNone_BlendOpt != flag ||
|
| (this->willEffectReadDstColor() &&
|
| kOne_GrBlendCoeff == srcCoeff && kZero_GrBlendCoeff == dstCoeff);
|
| @@ -460,16 +455,3 @@
|
| }
|
| }
|
|
|
| -////////////////////////////////////////////////////////////////////////////////
|
| -
|
| -void GrDrawState::invalidateOptState() const {
|
| - SkSafeSetNull(fCachedOptState);
|
| -}
|
| -
|
| -////////////////////////////////////////////////////////////////////////////////
|
| -
|
| -GrDrawState::~GrDrawState() {
|
| - SkSafeUnref(fCachedOptState);
|
| - SkASSERT(0 == fBlockEffectRemovalCnt);
|
| -}
|
| -
|
|
|