Index: src/gpu/GrDrawState.h |
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h |
index 03af7b532f2504231e90ca0bd5782a36b8dbd13f..d58d8c64e7f924b5e36dac9a698e1d37c01e7927 100644 |
--- a/src/gpu/GrDrawState.h |
+++ b/src/gpu/GrDrawState.h |
@@ -221,7 +221,7 @@ public: |
const GrGeometryProcessor* setGeometryProcessor(const GrGeometryProcessor* geometryProcessor) { |
SkASSERT(geometryProcessor); |
SkASSERT(!this->hasGeometryProcessor()); |
- fGeometryProcessor.reset(new GrGeometryStage(geometryProcessor)); |
+ fGeometryProcessor.reset(SkRef(geometryProcessor)); |
this->invalidateOptState(); |
return geometryProcessor; |
} |
@@ -254,7 +254,7 @@ public: |
} |
bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get()); } |
- const GrGeometryStage* getGeometryProcessor() const { return fGeometryProcessor.get(); } |
+ const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryProcessor.get(); } |
const GrFragmentStage& getColorStage(int idx) const { return fColorStages[idx]; } |
const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageStages[idx]; } |
@@ -485,8 +485,7 @@ public: |
GrDrawState* fDrawState; |
SkMatrix fViewMatrix; |
int fNumColorStages; |
- bool fHasGeometryProcessor; |
- SkAutoSTArray<8, GrProcessorStage::SavedCoordChange> fSavedCoordChanges; |
+ SkAutoSTArray<8, GrFragmentStage::SavedCoordChange> fSavedCoordChanges; |
}; |
/// @} |
@@ -810,10 +809,11 @@ private: |
GrBlendCoeff fSrcBlend; |
GrBlendCoeff fDstBlend; |
- typedef SkSTArray<4, GrFragmentStage> FragmentStageArray; |
- SkAutoTDelete<GrGeometryStage> fGeometryProcessor; |
- FragmentStageArray fColorStages; |
- FragmentStageArray fCoverageStages; |
+ typedef SkSTArray<4, GrFragmentStage> FragmentStageArray; |
+ typedef GrProgramElementRef<const GrGeometryProcessor> ProgramGeometryProcessor; |
+ ProgramGeometryProcessor fGeometryProcessor; |
+ FragmentStageArray fColorStages; |
+ FragmentStageArray fCoverageStages; |
uint32_t fHints; |