From 8d95ffa497091d0c9c7cda099684c7bca6714a17 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Mon, 8 Dec 2014 13:26:43 -0800 Subject: Revert of Make all blending up to GrOptDrawState be handled by the xp/xp factory. (patchset #7 id:140001 of https://codereview.chromium.org/759713002/) Reason for revert: break many gm's Original issue's description: > Make all blending up to GrOptDrawState be handled by the xp/xp factory. > > In this cl the blending information is extracted for the xp and stored in the ODS > which is then used as it currently is. In the follow up cl, an XP backend will be added > and at that point all blending work will take place inside XP's. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/7c66342a399b529634bed0fabfaa562db2c0dbd4 TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/766653008 --- src/gpu/GrProcOptInfo.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/gpu/GrProcOptInfo.cpp') diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp index a84ac2e17f..18a32020d4 100644 --- a/src/gpu/GrProcOptInfo.cpp +++ b/src/gpu/GrProcOptInfo.cpp @@ -7,9 +7,8 @@ #include "GrProcOptInfo.h" -#include "GrFragmentProcessor.h" -#include "GrFragmentStage.h" #include "GrGeometryProcessor.h" +#include "GrFragmentStage.h" void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, int stageCount, @@ -23,7 +22,6 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, fInputColor = startColor; fRemoveVertexAttrib = false; fReadsDst = false; - fReadsFragPosition = false; if (areCoverageStages && gp) { gp->computeInvariantOutput(&fInOut); @@ -33,22 +31,17 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, const GrFragmentProcessor* processor = stages[i].getProcessor(); fInOut.resetWillUseInputColor(); processor->computeInvariantOutput(&fInOut); -#ifdef SK_DEBUG + #ifdef SK_DEBUG fInOut.validate(); -#endif + #endif if (!fInOut.willUseInputColor()) { fFirstEffectStageIndex = i; fInputColorIsUsed = false; - // Reset these since we don't care if previous stages read these values - fReadsDst = false; - fReadsFragPosition = false; + fReadsDst = false; // Reset this since we don't care if previous stages read dst } if (processor->willReadDstColor()) { fReadsDst = true; } - if (processor->willReadFragmentPosition()) { - fReadsFragPosition = true; - } if (kRGBA_GrColorComponentFlags == fInOut.validFlags()) { fFirstEffectStageIndex = i + 1; fInputColor = fInOut.color(); @@ -57,10 +50,7 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, // 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 - fReadsDst = false; - fReadsFragPosition = false; + fReadsDst = false; // Reset this since we don't care if previous stages read dst } } } - -- cgit v1.2.3