Index: src/gpu/GrOptDrawState.h |
diff --git a/src/gpu/GrOptDrawState.h b/src/gpu/GrOptDrawState.h |
index 876ff52137578fc47a37531d3431629730065161..23be8339f3016fab9da19ca22a0f85ce1afb2568 100644 |
--- a/src/gpu/GrOptDrawState.h |
+++ b/src/gpu/GrOptDrawState.h |
@@ -35,32 +35,16 @@ public: |
const GrDrawTargetCaps&, const ScissorState&, |
const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType); |
+ /* |
+ * the Equality operator may update GrOptDrawState's GrBatchTracker object to subsume that's |
+ * GrBatchTracker into this's GrBatchTracker. |
+ */ |
bool operator== (const GrOptDrawState& that) const; |
bool operator!= (const GrOptDrawState& that) const { return !(*this == that); } |
/// @} |
/////////////////////////////////////////////////////////////////////////// |
- /// @name Color |
- //// |
- |
- GrColor getColor() const { return fColor; } |
- |
- /// @} |
- |
- /////////////////////////////////////////////////////////////////////////// |
- /// @name Coverage |
- //// |
- |
- uint8_t getCoverage() const { return fCoverage; } |
- |
- GrColor getCoverageColor() const { |
- return GrColorPackRGBA(fCoverage, fCoverage, fCoverage, fCoverage); |
- } |
- |
- /// @} |
- |
- /////////////////////////////////////////////////////////////////////////// |
/// @name Effect Stages |
/// Each stage hosts a GrProcessor. The effect produces an output color or coverage in the |
/// fragment shader. Its inputs are the output from the previous stage as well as some variables |
@@ -80,13 +64,11 @@ public: |
int numColorStages() const { return fNumColorStages; } |
int numCoverageStages() const { return fFragmentStages.count() - fNumColorStages; } |
int numFragmentStages() const { return fFragmentStages.count(); } |
- int numTotalStages() const { |
- // the + 1 at the end is for the xferProcessor which will always be present |
- return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0) + 1; |
- } |
+ // TODO remove the GP specific calls when the PathProc can provide the same interface |
bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get()); } |
const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryProcessor.get(); } |
+ const GrPrimitiveProcessor* getPrimitiveProcessor() const { return fPrimitiveProcessor.get(); } |
const GrBatchTracker& getBatchTracker() const { return fBatchTracker; } |
const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get(); } |
@@ -210,16 +192,14 @@ private: |
typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; |
RenderTarget fRenderTarget; |
ScissorState fScissorState; |
- GrColor fColor; |
SkMatrix fViewMatrix; |
GrStencilSettings fStencilSettings; |
- uint8_t fCoverage; |
GrDrawState::DrawFace fDrawFace; |
GrDeviceCoordTexture fDstCopy; |
uint32_t fFlags; |
ProgramGeometryProcessor fGeometryProcessor; |
ProgramPrimitiveProcessor fPrimitiveProcessor; |
- GrBatchTracker fBatchTracker; |
+ mutable GrBatchTracker fBatchTracker; |
ProgramXferProcessor fXferProcessor; |
FragmentStageArray fFragmentStages; |
GrGpu::DrawType fDrawType; |