Index: src/gpu/GrProcOptInfo.h |
diff --git a/src/gpu/GrProcOptInfo.h b/src/gpu/GrProcOptInfo.h |
index ad23614d81f52e1f3832d4c2e393752d47ea3b95..cf7e3503b96bd8f96438dc0288acc66bcb7518c8 100644 |
--- a/src/gpu/GrProcOptInfo.h |
+++ b/src/gpu/GrProcOptInfo.h |
@@ -10,6 +10,7 @@ |
#include "GrColor.h" |
#include "GrInvariantOutput.h" |
+#include "GrStagedProcessor.h" |
class GrDrawBatch; |
class GrFragmentProcessor; |
@@ -25,22 +26,21 @@ |
public: |
GrProcOptInfo() |
: fInOut(0, static_cast<GrColorComponentFlags>(0), false) |
- , fFirstEffectiveProcessorIndex(0) |
+ , fFirstEffectStageIndex(0) |
, fInputColorIsUsed(true) |
, fInputColor(0) |
, fReadsFragPosition(false) {} |
- void calcWithInitialValues(const GrFragmentProcessor* const *, int cnt, GrColor startColor, |
- GrColorComponentFlags, bool areCoverageStages); |
+ void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor startColor, |
+ GrColorComponentFlags flags, bool areCoverageStages); |
- void calcColorWithBatch(const GrDrawBatch*, const GrFragmentProcessor* const[], int cnt); |
- void calcCoverageWithBatch(const GrDrawBatch*, const GrFragmentProcessor* const[], int cnt); |
+ void calcColorWithBatch(const GrDrawBatch*, const GrFragmentStage*, int stagecount); |
+ void calcCoverageWithBatch(const GrDrawBatch*, const GrFragmentStage*, int stagecount); |
// TODO delete these when batch is everywhere |
- void calcColorWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentProcessor* const[], |
- int cnt); |
- void calcCoverageWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentProcessor* const[], |
- int cnt); |
+ void calcColorWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentStage*, int stagecount); |
+ void calcCoverageWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentStage*, |
+ int stagecount); |
bool isSolidWhite() const { return fInOut.isSolidWhite(); } |
bool isOpaque() const { return fInOut.isOpaque(); } |
@@ -60,38 +60,38 @@ |
} |
/** |
- * Returns the index of the first effective color processor. If an intermediate processor |
- * doesn't read its input or has a known output, then we can ignore all earlier processors |
- * since they will not affect the final output. Thus the first effective processors index is |
- * the index to the first processor that will have an effect on the final output. |
+ * Returns the index of the first effective color stage. If an intermediate stage doesn't read |
+ * its input or has a known output, then we can ignore all earlier stages since they will not |
+ * affect the final output. Thus the first effective stage index is the index to the first stage |
+ * that will have an effect on the final output. |
* |
- * If processors before the firstEffectiveProcessorIndex() are removed, corresponding values |
- * from inputColorIsUsed(), inputColorToEffectiveProcessor(), removeVertexAttribs(), and |
- * readsDst() must be used when setting up the draw to ensure correct drawing. |
+ * If stages before the firstEffectiveStageIndex are removed, corresponding values from |
+ * inputColorIsUsed(), inputColorToEffectiveStage(), removeVertexAttribs(), and readsDst() must |
+ * be used when setting up the draw to ensure correct drawing. |
*/ |
- int firstEffectiveProcessorIndex() const { return fFirstEffectiveProcessorIndex; } |
+ int firstEffectiveStageIndex() const { return fFirstEffectStageIndex; } |
/** |
- * True if the first effective processor reads its input, false otherwise. |
+ * True if the first effective stage reads its input, false otherwise. |
*/ |
bool inputColorIsUsed() const { return fInputColorIsUsed; } |
/** |
* If input color is used and per-vertex colors are not used, this is the input color to the |
- * first effective processor. |
+ * first effective stage. |
*/ |
- GrColor inputColorToFirstEffectiveProccesor() const { return fInputColor; } |
+ GrColor inputColorToEffectiveStage() const { return fInputColor; } |
/** |
- * Returns true if any of the processor preserved by GrProcOptInfo read the frag position. |
+ * Returns true if any of the stages preserved by GrProcOptInfo read the frag position. |
*/ |
bool readsFragPosition() const { return fReadsFragPosition; } |
private: |
- void internalCalc(const GrFragmentProcessor* const[], int cnt, bool initWillReadFragPosition); |
+ void internalCalc(const GrFragmentStage*, int stagecount, bool initWillReadFragPosition); |
GrInvariantOutput fInOut; |
- int fFirstEffectiveProcessorIndex; |
+ int fFirstEffectStageIndex; |
bool fInputColorIsUsed; |
GrColor fInputColor; |
bool fReadsFragPosition; |