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

Unified Diff: src/gpu/GrProcOptInfo.cpp

Issue 1734163002: Replace fWillReadFragmentPosition with a bitfield (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: BuiltInState -> RequiredFeatures Created 4 years, 10 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/GrProcOptInfo.h ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcOptInfo.cpp
diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp
index bfd9e9ec8ceabd638a3e50179bdfe1aff9216348..183a42fb33e17c9153fe64b4c5bf26d21e09e442 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;
}
}
}
« no previous file with comments | « src/gpu/GrProcOptInfo.h ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698