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

Unified Diff: src/gpu/GrOptDrawState.h

Issue 634073002: Delay copying effects from DS or ODS till end of creating ODS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix line length 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 | « no previous file | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
« no previous file with comments | « no previous file | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698