Index: src/gpu/GrProcOptInfo.h |
diff --git a/src/gpu/GrProcOptInfo.h b/src/gpu/GrProcOptInfo.h |
index cf7e3503b96bd8f96438dc0288acc66bcb7518c8..ad23614d81f52e1f3832d4c2e393752d47ea3b95 100644 |
--- a/src/gpu/GrProcOptInfo.h |
+++ b/src/gpu/GrProcOptInfo.h |
@@ -10,7 +10,6 @@ |
#include "GrColor.h" |
#include "GrInvariantOutput.h" |
-#include "GrStagedProcessor.h" |
class GrDrawBatch; |
class GrFragmentProcessor; |
@@ -26,21 +25,22 @@ class GrProcOptInfo { |
public: |
GrProcOptInfo() |
: fInOut(0, static_cast<GrColorComponentFlags>(0), false) |
- , fFirstEffectStageIndex(0) |
+ , fFirstEffectiveProcessorIndex(0) |
, fInputColorIsUsed(true) |
, fInputColor(0) |
, fReadsFragPosition(false) {} |
- void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor startColor, |
- GrColorComponentFlags flags, bool areCoverageStages); |
+ void calcWithInitialValues(const GrFragmentProcessor* const *, int cnt, GrColor startColor, |
+ GrColorComponentFlags, bool areCoverageStages); |
- void calcColorWithBatch(const GrDrawBatch*, const GrFragmentStage*, int stagecount); |
- void calcCoverageWithBatch(const GrDrawBatch*, const GrFragmentStage*, int stagecount); |
+ void calcColorWithBatch(const GrDrawBatch*, const GrFragmentProcessor* const[], int cnt); |
+ void calcCoverageWithBatch(const GrDrawBatch*, const GrFragmentProcessor* const[], int cnt); |
// TODO delete these when batch is everywhere |
- void calcColorWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentStage*, int stagecount); |
- void calcCoverageWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentStage*, |
- int stagecount); |
+ void calcColorWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentProcessor* const[], |
+ int cnt); |
+ void calcCoverageWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentProcessor* const[], |
+ int cnt); |
bool isSolidWhite() const { return fInOut.isSolidWhite(); } |
bool isOpaque() const { return fInOut.isOpaque(); } |
@@ -60,38 +60,38 @@ public: |
} |
/** |
- * 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. |
+ * 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. |
* |
- * 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. |
+ * 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. |
*/ |
- int firstEffectiveStageIndex() const { return fFirstEffectStageIndex; } |
+ int firstEffectiveProcessorIndex() const { return fFirstEffectiveProcessorIndex; } |
/** |
- * True if the first effective stage reads its input, false otherwise. |
+ * True if the first effective processor 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 stage. |
+ * first effective processor. |
*/ |
- GrColor inputColorToEffectiveStage() const { return fInputColor; } |
+ GrColor inputColorToFirstEffectiveProccesor() const { return fInputColor; } |
/** |
- * Returns true if any of the stages preserved by GrProcOptInfo read the frag position. |
+ * Returns true if any of the processor preserved by GrProcOptInfo read the frag position. |
*/ |
bool readsFragPosition() const { return fReadsFragPosition; } |
private: |
- void internalCalc(const GrFragmentStage*, int stagecount, bool initWillReadFragPosition); |
+ void internalCalc(const GrFragmentProcessor* const[], int cnt, bool initWillReadFragPosition); |
GrInvariantOutput fInOut; |
- int fFirstEffectStageIndex; |
+ int fFirstEffectiveProcessorIndex; |
bool fInputColorIsUsed; |
GrColor fInputColor; |
bool fReadsFragPosition; |