aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcOptInfo.cpp
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2016-02-26 12:22:02 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-26 12:22:02 -0800
commit87332103c605dc3e0f76c0d1250a76c4ff71fddc (patch)
tree691623aee5f5b4953ecfcb69dcd79f9f6f0b0937 /src/gpu/GrProcOptInfo.cpp
parente5824b90da4568544ecbf71ba5d690095b31307e (diff)
Replace fWillReadFragmentPosition with a bitfield
Replaces fWillReadFragmentPosition on GrProcessor with a "RequiredFeatures" bitfield. This will allow us to add additional built-in features. Completely removes information about reading the fragment position from GrPipeline and GrProcOptInfo. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734163002 Review URL: https://codereview.chromium.org/1734163002
Diffstat (limited to 'src/gpu/GrProcOptInfo.cpp')
-rw-r--r--src/gpu/GrProcOptInfo.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp
index bfd9e9ec8c..183a42fb33 100644
--- a/src/gpu/GrProcOptInfo.cpp
+++ b/src/gpu/GrProcOptInfo.cpp
@@ -23,7 +23,7 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentProcessor * const proc
out.fValidFlags = flags;
out.fIsLCDCoverage = isLCD;
fInOut.reset(out);
- this->internalCalc(processors, cnt, false);
+ this->internalCalc(processors, cnt);
}
void GrProcOptInfo::initUsingInvariantOutput(GrInitInvariantOutput invOutput) {
@@ -31,16 +31,13 @@ void GrProcOptInfo::initUsingInvariantOutput(GrInitInvariantOutput invOutput) {
}
void GrProcOptInfo::completeCalculations(const GrFragmentProcessor * const processors[], int cnt) {
- this->internalCalc(processors, cnt, false);
+ this->internalCalc(processors, cnt);
}
-void GrProcOptInfo::internalCalc(const GrFragmentProcessor* const processors[],
- int cnt,
- bool initWillReadFragmentPosition) {
+void GrProcOptInfo::internalCalc(const GrFragmentProcessor* const processors[], int cnt) {
fFirstEffectiveProcessorIndex = 0;
fInputColorIsUsed = true;
fInputColor = fInOut.color();
- fReadsFragPosition = initWillReadFragmentPosition;
for (int i = 0; i < cnt; ++i) {
const GrFragmentProcessor* processor = processors[i];
@@ -50,11 +47,6 @@ void GrProcOptInfo::internalCalc(const GrFragmentProcessor* const processors[],
if (!fInOut.willUseInputColor()) {
fFirstEffectiveProcessorIndex = i;
fInputColorIsUsed = false;
- // Reset these since we don't care if previous stages read these values
- fReadsFragPosition = initWillReadFragmentPosition;
- }
- if (processor->willReadFragmentPosition()) {
- fReadsFragPosition = true;
}
if (kRGBA_GrColorComponentFlags == fInOut.validFlags()) {
fFirstEffectiveProcessorIndex = i + 1;
@@ -63,8 +55,6 @@ void GrProcOptInfo::internalCalc(const GrFragmentProcessor* const processors[],
// Since we are clearing all previous color stages we are in a state where we have found
// zero stages that don't multiply the inputColor.
fInOut.resetNonMulStageFound();
- // Reset these since we don't care if previous stages read these values
- fReadsFragPosition = initWillReadFragmentPosition;
}
}
}