| Index: src/gpu/GrDrawState.cpp
|
| diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
|
| index 4ec39e7005a327d5470fafebfd40c61efa209f6d..38da149a5f54635b99e795a89b846ca5be9b0998 100644
|
| --- a/src/gpu/GrDrawState.cpp
|
| +++ b/src/gpu/GrDrawState.cpp
|
| @@ -57,8 +57,6 @@ GrDrawState& GrDrawState::operator=(const GrDrawState& that) {
|
| fCoverageProcInfoValid = that.fCoverageProcInfoValid;
|
| fColorCache = that.fColorCache;
|
| fCoverageCache = that.fCoverageCache;
|
| - fColorPrimProc = that.fColorPrimProc;
|
| - fCoveragePrimProc = that.fCoveragePrimProc;
|
| if (fColorProcInfoValid) {
|
| fColorProcInfo = that.fColorProcInfo;
|
| }
|
| @@ -85,9 +83,6 @@ void GrDrawState::onReset() {
|
|
|
| fColorCache = GrColor_ILLEGAL;
|
| fCoverageCache = GrColor_ILLEGAL;
|
| -
|
| - fColorPrimProc = NULL;
|
| - fCoveragePrimProc = NULL;
|
| }
|
|
|
| void GrDrawState::setFromPaint(const GrPaint& paint, GrRenderTarget* rt) {
|
| @@ -124,9 +119,6 @@ void GrDrawState::setFromPaint(const GrPaint& paint, GrRenderTarget* rt) {
|
|
|
| fColorCache = GrColor_ILLEGAL;
|
| fCoverageCache = GrColor_ILLEGAL;
|
| -
|
| - fColorPrimProc = NULL;
|
| - fCoveragePrimProc = NULL;
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -200,22 +192,34 @@ bool GrDrawState::willBlendWithDst(const GrPrimitiveProcessor* pp) const {
|
| }
|
|
|
| void GrDrawState::calcColorInvariantOutput(const GrPrimitiveProcessor* pp) const {
|
| - if (!fColorProcInfoValid || fColorPrimProc != pp) {
|
| - fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColorStages());
|
| - fColorProcInfoValid = true;
|
| - fColorPrimProc = pp;
|
| - }
|
| + fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColorStages());
|
| + fColorProcInfoValid = false;
|
| +
|
| }
|
|
|
| void GrDrawState::calcCoverageInvariantOutput(const GrPrimitiveProcessor* pp) const {
|
| - if (!fCoverageProcInfoValid || fCoveragePrimProc != pp) {
|
| - fCoverageProcInfo.calcCoverageWithPrimProc(pp, fCoverageStages.begin(),
|
| - this->numCoverageStages());
|
| - fCoverageProcInfoValid = true;
|
| - fCoveragePrimProc = pp;
|
| - }
|
| + fCoverageProcInfo.calcCoverageWithPrimProc(pp, fCoverageStages.begin(),
|
| + this->numCoverageStages());
|
| + fCoverageProcInfoValid = false;
|
| +}
|
| +
|
| +void GrDrawState::calcColorInvariantOutput(const GrBatch* batch) const {
|
| + GrBatchOpt batchOpt;
|
| + batchOpt.fCanTweakAlphaForCoverage = this->canTweakAlphaForCoverage();
|
| + fColorProcInfo.calcColorWithBatch(batch, batchOpt, fColorStages.begin(),
|
| + this->numColorStages());
|
| + fColorProcInfoValid = false;
|
| }
|
|
|
| +void GrDrawState::calcCoverageInvariantOutput(const GrBatch* batch) const {
|
| + GrBatchOpt batchOpt;
|
| + batchOpt.fCanTweakAlphaForCoverage = this->canTweakAlphaForCoverage();
|
| + fCoverageProcInfo.calcCoverageWithBatch(batch, batchOpt, fCoverageStages.begin(),
|
| + this->numCoverageStages());
|
| + fCoverageProcInfoValid = false;
|
| +}
|
| +
|
| +
|
| void GrDrawState::calcColorInvariantOutput(GrColor color) const {
|
| if (!fColorProcInfoValid || color != fColorCache) {
|
| GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
|
|
|