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

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: Rebase 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..2721e9dca43eccaeff931df3cde696022f3d6701 100644
--- a/src/gpu/GrOptDrawState.h
+++ b/src/gpu/GrOptDrawState.h
@@ -375,19 +375,17 @@ private:
* Loops through all the color stage effects to check if the stage will ignore color input or
* always output a constant color. In the ignore color input case we can ignore all previous
* stages. In the constant color case, we can ignore all previous stages and
- * the current one and set the state color to the constant color. Once we determine the so
- * called first effective stage, we copy all the effective stages into our optimized
- * state.
+ * the current one and set the state color to the constant color.
*/
- void copyEffectiveColorStages(const GrDrawState& ds);
+ void computeEffectiveColorStages(const GrDrawState& ds, int* firstColorStageIdx,
+ uint8_t* fixFunctionVAToRemove);
/**
* Loops through all the coverage stage effects to check if the stage will ignore color input.
* If a coverage stage will ignore input, then we can ignore all coverage stages before it. We
- * loop to determine the first effective coverage stage, and then copy all of our effective
- * coverage stages into our optimized state.
+ * loop to determine the first effective coverage stage.
*/
- void copyEffectiveCoverageStages(const GrDrawState& ds);
+ void computeEffectiveCoverageStages(const GrDrawState& ds, int* firstCoverageStageIdx);
/**
* This function takes in a flag and removes the corresponding fixed function vertex attributes.
@@ -400,20 +398,22 @@ private:
* Alter the OptDrawState (adjusting stages, vertex attribs, flags, etc.) based on the
* BlendOptFlags.
*/
- void adjustFromBlendOpts();
+ void adjustFromBlendOpts(const GrDrawState& ds, int* firstColorStageIdx,
+ int* firstCoverageStageIdx, uint8_t* fixedFunctionVAToRemove);
/**
* 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, int firstColorStageIdx, int firstCoverageStageIdx);
/**
* 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&,
+ int firstCoverageStageIdx, bool* separateCoverageFromColor);
bool isEqual(const GrOptDrawState& that) const;
@@ -433,7 +433,7 @@ private:
GrBlendCoeff fSrcBlend;
GrBlendCoeff fDstBlend;
- typedef SkSTArray<4, GrFragmentStage> FragmentStageArray;
+ typedef SkSTArray<8, GrFragmentStage> FragmentStageArray;
SkAutoTDelete<GrGeometryStage> fGeometryProcessor;
FragmentStageArray fColorStages;
FragmentStageArray fCoverageStages;
« 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