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

Unified Diff: src/gpu/GrProcOptInfo.h

Issue 1306803003: Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrProcOptInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrProcOptInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698