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