diff options
author | 2015-08-26 06:48:27 -0700 | |
---|---|---|
committer | 2015-08-26 06:48:27 -0700 | |
commit | 4bf69f7bbc073c1dc257f93f8c5b2a530123cb3c (patch) | |
tree | d6c670d7230600b174d6f08799a7ad1f4b9c002e /src/gpu/GrProcOptInfo.cpp | |
parent | 8cce8f139e4b91783722f11ccb6ac9bbdf8327e7 (diff) |
Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )
Reason for revert:
Causes bot failures:
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702
https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223
Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7
TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1306803003
Diffstat (limited to 'src/gpu/GrProcOptInfo.cpp')
-rw-r--r-- | src/gpu/GrProcOptInfo.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp index 19302cc475..af6b81e0d6 100644 --- a/src/gpu/GrProcOptInfo.cpp +++ b/src/gpu/GrProcOptInfo.cpp @@ -12,43 +12,43 @@ #include "batches/GrDrawBatch.h" void GrProcOptInfo::calcColorWithBatch(const GrDrawBatch* batch, - const GrFragmentProcessor* const processors[], - int cnt) { + const GrFragmentStage* stages, + int stageCount) { GrInitInvariantOutput out; batch->getInvariantOutputColor(&out); fInOut.reset(out); - this->internalCalc(processors, cnt, batch->willReadFragmentPosition()); + this->internalCalc(stages, stageCount, batch->willReadFragmentPosition()); } void GrProcOptInfo::calcCoverageWithBatch(const GrDrawBatch* batch, - const GrFragmentProcessor* const processors[], - int cnt) { + const GrFragmentStage* stages, + int stageCount) { GrInitInvariantOutput out; batch->getInvariantOutputCoverage(&out); fInOut.reset(out); - this->internalCalc(processors, cnt, batch->willReadFragmentPosition()); + this->internalCalc(stages, stageCount, batch->willReadFragmentPosition()); } void GrProcOptInfo::calcColorWithPrimProc(const GrPrimitiveProcessor* primProc, - const GrFragmentProcessor * const processors[], - int cnt) { + const GrFragmentStage* stages, + int stageCount) { GrInitInvariantOutput out; primProc->getInvariantOutputColor(&out); fInOut.reset(out); - this->internalCalc(processors, cnt, primProc->willReadFragmentPosition()); + this->internalCalc(stages, stageCount, primProc->willReadFragmentPosition()); } void GrProcOptInfo::calcCoverageWithPrimProc(const GrPrimitiveProcessor* primProc, - const GrFragmentProcessor * const processors[], - int cnt) { + const GrFragmentStage* stages, + int stageCount) { GrInitInvariantOutput out; primProc->getInvariantOutputCoverage(&out); fInOut.reset(out); - this->internalCalc(processors, cnt, primProc->willReadFragmentPosition()); + this->internalCalc(stages, stageCount, primProc->willReadFragmentPosition()); } -void GrProcOptInfo::calcWithInitialValues(const GrFragmentProcessor * const processors[], - int cnt, +void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, + int stageCount, GrColor startColor, GrColorComponentFlags flags, bool areCoverageStages) { @@ -57,24 +57,24 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentProcessor * const proc out.fColor = startColor; out.fValidFlags = flags; fInOut.reset(out); - this->internalCalc(processors, cnt, false); + this->internalCalc(stages, stageCount, false); } -void GrProcOptInfo::internalCalc(const GrFragmentProcessor* const processors[], - int cnt, +void GrProcOptInfo::internalCalc(const GrFragmentStage* stages, + int stageCount, bool initWillReadFragmentPosition) { - fFirstEffectiveProcessorIndex = 0; + fFirstEffectStageIndex = 0; fInputColorIsUsed = true; fInputColor = fInOut.color(); fReadsFragPosition = initWillReadFragmentPosition; - for (int i = 0; i < cnt; ++i) { - const GrFragmentProcessor* processor = processors[i]; + for (int i = 0; i < stageCount; ++i) { + const GrFragmentProcessor* processor = stages[i].processor(); fInOut.resetWillUseInputColor(); processor->computeInvariantOutput(&fInOut); SkDEBUGCODE(fInOut.validate()); if (!fInOut.willUseInputColor()) { - fFirstEffectiveProcessorIndex = i; + fFirstEffectStageIndex = i; fInputColorIsUsed = false; // Reset these since we don't care if previous stages read these values fReadsFragPosition = initWillReadFragmentPosition; @@ -83,7 +83,7 @@ void GrProcOptInfo::internalCalc(const GrFragmentProcessor* const processors[], fReadsFragPosition = true; } if (kRGBA_GrColorComponentFlags == fInOut.validFlags()) { - fFirstEffectiveProcessorIndex = i + 1; + fFirstEffectStageIndex = i + 1; fInputColor = fInOut.color(); fInputColorIsUsed = true; // Since we are clearing all previous color stages we are in a state where we have found |