Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: src/gpu/GrDrawState.h

Issue 647183002: Revert of Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698