Index: src/gpu/GrOptDrawState.h |
diff --git a/src/gpu/GrOptDrawState.h b/src/gpu/GrOptDrawState.h |
index 1f8c442230f864ac58c342a78deeb7863c8cc251..fc3e18d8721c8cb5bb6fa01831492928f5e8f115 100644 |
--- a/src/gpu/GrOptDrawState.h |
+++ b/src/gpu/GrOptDrawState.h |
@@ -379,7 +379,7 @@ private: |
* called first effective stage, we copy all the effective stages into our optimized |
* state. |
*/ |
- void copyEffectiveColorStages(const GrDrawState& ds); |
+ void computeEffectiveColorStages(const GrDrawState& ds); |
/** |
* Loops through all the coverage stage effects to check if the stage will ignore color input. |
@@ -387,33 +387,34 @@ private: |
* loop to determine the first effective coverage stage, and then copy all of our effective |
* coverage stages into our optimized state. |
*/ |
- void copyEffectiveCoverageStages(const GrDrawState& ds); |
+ void computeEffectiveCoverageStages(const GrDrawState& ds); |
/** |
- * This function takes in a flag and removes the corresponding fixed function vertex attributes. |
- * The flags are in the same order as GrVertexAttribBinding array. If bit i of removeVAFlags is |
- * set, then vertex attributes with binding (GrVertexAttribute)i will be removed. |
+ * This function reads in the fFixedFunctionVAToRemove flag and removes the corresponding fixed |
+ * function vertex attributes. The flags are in the same order as GrVertexAttribBinding array. |
+ * If bit i of fFixedFunctionVAToRemove is set, then vertex attributes with binding |
+ * (GrVertexAttribute)i will be removed. |
*/ |
- void removeFixedFunctionVertexAttribs(uint8_t removeVAFlags); |
+ void removeFixedFunctionVertexAttribs(); |
/** |
* Alter the OptDrawState (adjusting stages, vertex attribs, flags, etc.) based on the |
* BlendOptFlags. |
*/ |
- void adjustFromBlendOpts(); |
+ void adjustFromBlendOpts(const GrDrawState& ds); |
/** |
* Loop over the effect stages to determine various info like what data they will read and what |
* shaders they require. |
*/ |
- void getStageStats(); |
+ void getStageStats(const GrDrawState& ds); |
/** |
* Calculates the primary and secondary output types of the shader. For certain output types |
* the function may adjust the blend coefficients. After this function is called the src and dst |
* blend coeffs will represent those used by backend API. |
*/ |
- void setOutputStateInfo(const GrDrawTargetCaps&); |
+ void setOutputStateInfo(const GrDrawState& ds, const GrDrawTargetCaps&); |
bool isEqual(const GrOptDrawState& that) const; |
@@ -433,11 +434,19 @@ private: |
GrBlendCoeff fSrcBlend; |
GrBlendCoeff fDstBlend; |
- typedef SkSTArray<4, GrFragmentStage> FragmentStageArray; |
+ typedef SkSTArray<8, GrFragmentStage> FragmentStageArray; |
SkAutoTDelete<GrGeometryStage> fGeometryProcessor; |
FragmentStageArray fColorStages; |
FragmentStageArray fCoverageStages; |
+ // Used when creating an OptDrawState from a DrawState to keep track of which stages to copy |
bsalomon
2014/10/07 20:20:42
Do these really belong as members? Seems like they
egdaniel
2014/10/07 21:10:06
Done.
|
+ // from the DS to the ODS. |
+ int fFirstColorStageIdx; |
+ int fFirstCoverageStageIdx; |
+ bool fSeparateCoverageFromColor; |
+ |
+ uint8_t fFixedFunctionVAToRemove; |
+ |
// This is simply a different representation of info in fVertexAttribs and thus does |
// not need to be compared in op==. |
int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt]; |