Index: src/gpu/GrDrawState.h |
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h |
index 6a1e38056bbcad8da3a29498cf3b5f1d0f0ac85b..4869658b4f3c2f3929832d5ea293cd6a5aafd1d5 100644 |
--- a/src/gpu/GrDrawState.h |
+++ b/src/gpu/GrDrawState.h |
@@ -9,11 +9,12 @@ |
#define GrDrawState_DEFINED |
#include "GrBlend.h" |
-#include "GrOptDrawState.h" |
#include "GrProgramResource.h" |
#include "GrRODrawState.h" |
#include "effects/GrSimpleTextureEffect.h" |
+class GrOptDrawState; |
+ |
/** |
* Modifiable subclass derived from GrRODrawState. The majority of the data that represents a draw |
* state is stored in the parent class. GrDrawState contains methods for setting, adding to, etc. |
@@ -47,10 +48,7 @@ public: |
**/ |
GrDrawState(const GrDrawState& state, const SkMatrix& preConcatMatrix); |
- virtual ~GrDrawState() { |
- SkSafeUnref(fCachedOptState); |
- SkASSERT(0 == fBlockEffectRemovalCnt); |
- } |
+ virtual ~GrDrawState(); |
/** |
* Resets to the default state. GrEffects will be removed from all stages. |
@@ -552,17 +550,10 @@ public: |
GrOptDrawState* createOptState() const; |
private: |
- void invalidateOptState() const { |
- SkSafeSetNull(fCachedOptState); |
- fBlendOptFlags = kInvalid_BlendOptFlag; |
- } |
+ void invalidateOptState() const; |
void onReset(const SkMatrix* initialViewMatrix); |
- void invalidateBlendOptFlags() { |
- fBlendOptFlags = kInvalid_BlendOptFlag; |
- } |
- |
// Some of the auto restore objects assume that no effects are removed during their lifetime. |
// This is used to assert that this condition holds. |
SkDEBUGCODE(int fBlockEffectRemovalCnt;) |