aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/gpu/GrFragmentProcessor.h12
-rw-r--r--include/gpu/GrXferProcessor.h5
-rw-r--r--include/gpu/effects/GrPorterDuffXferProcessor.h8
-rw-r--r--src/effects/SkArithmeticMode_gpu.h5
-rw-r--r--src/gpu/GrDrawState.cpp7
-rw-r--r--src/gpu/GrDrawState.h6
-rw-r--r--src/gpu/GrDrawTarget.cpp13
-rw-r--r--src/gpu/GrDrawTarget.h1
-rw-r--r--src/gpu/GrOptDrawState.cpp11
-rw-r--r--src/gpu/GrProcOptInfo.cpp6
-rw-r--r--src/gpu/GrProcOptInfo.h7
-rw-r--r--src/gpu/effects/GrCoverageSetOpXP.cpp11
-rw-r--r--src/gpu/effects/GrCoverageSetOpXP.h3
-rw-r--r--src/gpu/effects/GrCustomXfermodePriv.h5
-rw-r--r--src/gpu/effects/GrDisableColorXP.h5
-rw-r--r--src/gpu/effects/GrPorterDuffXferProcessor.cpp33
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp5
-rw-r--r--tests/GLProgramsTest.cpp7
18 files changed, 25 insertions, 125 deletions
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index 341b3fb338..8ebc94e91d 100644
--- a/include/gpu/GrFragmentProcessor.h
+++ b/include/gpu/GrFragmentProcessor.h
@@ -24,7 +24,6 @@ class GrFragmentProcessor : public GrProcessor {
public:
GrFragmentProcessor()
: INHERITED()
- , fWillReadDstColor(false)
, fWillUseInputColor(true)
, fUsesLocalCoords(false) {}
@@ -51,9 +50,6 @@ public:
return fCoordTransforms;
}
- /** Will this prceossor read the destination pixel value? */
- bool willReadDstColor() const { return fWillReadDstColor; }
-
/** Will this prceossor read the source color value? */
bool willUseInputColor() const { return fWillUseInputColor; }
@@ -106,13 +102,6 @@ protected:
void addCoordTransform(const GrCoordTransform*);
/**
- * If the prceossor subclass will read the destination pixel value then it must call this
- * function from its constructor. Otherwise, when its generated backend-specific prceossor class
- * attempts to generate code that reads the destination pixel it will fail.
- */
- void setWillReadDstColor() { fWillReadDstColor = true; }
-
- /**
* If the prceossor will generate a result that does not depend on the input color value then it
* must call this function from its constructor. Otherwise, when its generated backend-specific
* code might fail during variable binding due to unused variables.
@@ -136,7 +125,6 @@ private:
bool hasSameTransforms(const GrFragmentProcessor&) const;
SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
- bool fWillReadDstColor;
bool fWillUseInputColor;
bool fUsesLocalCoords;
diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h
index 2c9961fc6b..13e4d2633f 100644
--- a/include/gpu/GrXferProcessor.h
+++ b/include/gpu/GrXferProcessor.h
@@ -205,10 +205,7 @@ public:
/**
* Returns true if the XP generated by this factory will read dst.
*/
- // TODO: Currently this function must also check if the color/coverage stages read dst.
- // Once only XP's can read dst we can remove the ProcOptInfo's from this function.
- virtual bool willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const = 0;
+ virtual bool willReadDst() const = 0;
bool isEqual(const GrXPFactory& that) const {
if (this->classID() != that.classID()) {
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h
index 6850cb5646..af10fa23ec 100644
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h
@@ -41,9 +41,6 @@ public:
kCoverage_PrimaryOutputType,
// Modulate color and coverage, write result as the color output.
kModulate_PrimaryOutputType,
- // Combines the coverage, dst, and color as coverage * color + (1 - coverage) * dst. This
- // can only be set if fDstReadKey is non-zero.
- kCombineWithDst_PrimaryOutputType,
};
enum SecondaryOutputType {
@@ -97,7 +94,7 @@ private:
bool doesStencilWrite);
void calcOutputTypes(GrXferProcessor::OptFlags blendOpts, const GrDrawTargetCaps& caps,
- bool hasSolidCoverage, bool readDst);
+ bool hasSolidCoverage);
GrBlendCoeff fSrcBlend;
GrBlendCoeff fDstBlend;
@@ -135,8 +132,7 @@ public:
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
- bool willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const SK_OVERRIDE;
+ bool willReadDst() const SK_OVERRIDE { return false; }
private:
GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst);
diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h
index 424bef6f91..2998eabc3b 100644
--- a/src/effects/SkArithmeticMode_gpu.h
+++ b/src/effects/SkArithmeticMode_gpu.h
@@ -154,10 +154,7 @@ public:
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
- bool willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const SK_OVERRIDE {
- return true;
- }
+ bool willReadDst() const SK_OVERRIDE { return true; }
private:
GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePMColor);
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 36042e19ab..4ec39e7005 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -147,11 +147,8 @@ bool GrDrawState::canUseFracCoveragePrimProc(GrColor color, const GrDrawTargetCa
//////////////////////////////////////////////////////////////////////////////s
-bool GrDrawState::willEffectReadDstColor(const GrPrimitiveProcessor* pp) const {
- this->calcColorInvariantOutput(pp);
- this->calcCoverageInvariantOutput(pp);
-
- return fXPFactory->willReadDst(fColorProcInfo, fCoverageProcInfo);
+bool GrDrawState::willEffectReadDstColor() const {
+ return fXPFactory->willReadDst();
}
void GrDrawState::AutoRestoreEffects::set(GrDrawState* ds) {
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index ce29e6ca68..c02429f965 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -108,10 +108,10 @@ public:
const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageStages[idx]; }
/**
- * Checks whether any of the effects will read the dst pixel color.
- * TODO remove when we have an XP
+ * Checks whether the xp will read the dst pixel color.
+ * TODO: remove when we have dstCpy contained inside of GrXP
*/
- bool willEffectReadDstColor(const GrPrimitiveProcessor*) const;
+ bool willEffectReadDstColor() const;
/**
* The xfer processor factory.
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 5faf00f843..f14515462a 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -383,10 +383,9 @@ bool GrDrawTarget::checkDraw(const GrDrawState& drawState,
}
bool GrDrawTarget::setupDstReadIfNecessary(GrDrawState* ds,
- const GrPrimitiveProcessor* primProc,
GrDeviceCoordTexture* dstCopy,
const SkRect* drawBounds) {
- if (this->caps()->dstReadInShaderSupport() || !ds->willEffectReadDstColor(primProc)) {
+ if (this->caps()->dstReadInShaderSupport() || !ds->willEffectReadDstColor()) {
return true;
}
SkIRect copyRect;
@@ -470,7 +469,7 @@ void GrDrawTarget::drawIndexed(GrDrawState* ds,
// TODO: We should continue with incorrect blending.
GrDeviceCoordTexture dstCopy;
- if (!this->setupDstReadIfNecessary(ds, gp, &dstCopy, devBounds)) {
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, devBounds)) {
return;
}
this->setDrawBuffers(&info, gp->getVertexStride());
@@ -513,7 +512,7 @@ void GrDrawTarget::drawNonIndexed(GrDrawState* ds,
// TODO: We should continue with incorrect blending.
GrDeviceCoordTexture dstCopy;
- if (!this->setupDstReadIfNecessary(ds, gp, &dstCopy, devBounds)) {
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, devBounds)) {
return;
}
@@ -611,7 +610,7 @@ void GrDrawTarget::drawPath(GrDrawState* ds,
&stencilSettings);
GrDeviceCoordTexture dstCopy;
- if (!this->setupDstReadIfNecessary(ds, pathProc, &dstCopy, &devBounds)) {
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, &devBounds)) {
return;
}
@@ -655,7 +654,7 @@ void GrDrawTarget::drawPaths(GrDrawState* ds,
// point, because any context that supports NV_path_rendering will also
// support NV_blend_equation_advanced.
GrDeviceCoordTexture dstCopy;
- if (!this->setupDstReadIfNecessary(ds, pathProc, &dstCopy, NULL)) {
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, NULL)) {
return;
}
@@ -768,7 +767,7 @@ void GrDrawTarget::drawIndexedInstances(GrDrawState* ds,
// TODO: We should continue with incorrect blending.
GrDeviceCoordTexture dstCopy;
- if (!this->setupDstReadIfNecessary(ds, gp, &dstCopy, devBounds)) {
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, devBounds)) {
return;
}
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 0e211ba85d..6628e37228 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -661,7 +661,6 @@ protected:
// but couldn't be made. Otherwise, returns true. This method needs to be protected because it
// needs to be accessed by GLPrograms to setup a correct drawstate
bool setupDstReadIfNecessary(GrDrawState*,
- const GrPrimitiveProcessor*,
GrDeviceCoordTexture* dstCopy,
const SkRect* drawBounds);
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 742ffade12..bc1ce7dc93 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -89,6 +89,8 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
this->adjustProgramFromOptimizations(drawState, optFlags, colorPOI, coveragePOI,
&firstColorStageIdx, &firstCoverageStageIdx);
+ fDescInfo.fReadsDst = fXferProcessor->willReadDstColor();
+
bool usesLocalCoords = false;
// Copy Stages from DS to ODS
@@ -124,31 +126,22 @@ void GrOptDrawState::adjustProgramFromOptimizations(const GrDrawState& ds,
const GrProcOptInfo& coveragePOI,
int* firstColorStageIdx,
int* firstCoverageStageIdx) {
- fDescInfo.fReadsDst = false;
fDescInfo.fReadsFragPosition = false;
if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) ||
(flags & GrXferProcessor::kOverrideColor_OptFlag)) {
*firstColorStageIdx = ds.numColorStages();
} else {
- fDescInfo.fReadsDst = colorPOI.readsDst();
fDescInfo.fReadsFragPosition = colorPOI.readsFragPosition();
}
if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) {
*firstCoverageStageIdx = ds.numCoverageStages();
} else {
- if (coveragePOI.readsDst()) {
- fDescInfo.fReadsDst = true;
- }
if (coveragePOI.readsFragPosition()) {
fDescInfo.fReadsFragPosition = true;
}
}
-
- if (fXferProcessor->willReadDstColor()) {
- fDescInfo.fReadsDst = true;
- }
}
void GrOptDrawState::finalize(GrGpu* gpu) {
diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp
index 274c5305de..a350ef783d 100644
--- a/src/gpu/GrProcOptInfo.cpp
+++ b/src/gpu/GrProcOptInfo.cpp
@@ -48,7 +48,6 @@ void GrProcOptInfo::internalCalc(const GrFragmentStage* stages,
fFirstEffectStageIndex = 0;
fInputColorIsUsed = true;
fInputColor = fInOut.color();
- fReadsDst = false;
fReadsFragPosition = initWillReadFragmentPosition;
for (int i = 0; i < stageCount; ++i) {
@@ -60,12 +59,8 @@ void GrProcOptInfo::internalCalc(const GrFragmentStage* stages,
fFirstEffectStageIndex = i;
fInputColorIsUsed = false;
// Reset these since we don't care if previous stages read these values
- fReadsDst = false;
fReadsFragPosition = initWillReadFragmentPosition;
}
- if (processor->willReadDstColor()) {
- fReadsDst = true;
- }
if (processor->willReadFragmentPosition()) {
fReadsFragPosition = true;
}
@@ -77,7 +72,6 @@ void GrProcOptInfo::internalCalc(const GrFragmentStage* stages,
// 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 = initWillReadFragmentPosition;
}
}
diff --git a/src/gpu/GrProcOptInfo.h b/src/gpu/GrProcOptInfo.h
index 43d6c558f1..75d88c64e2 100644
--- a/src/gpu/GrProcOptInfo.h
+++ b/src/gpu/GrProcOptInfo.h
@@ -28,7 +28,6 @@ public:
, fFirstEffectStageIndex(0)
, fInputColorIsUsed(true)
, fInputColor(0)
- , fReadsDst(false)
, fReadsFragPosition(false) {}
void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor startColor,
@@ -75,11 +74,6 @@ public:
GrColor inputColorToEffectiveStage() const { return fInputColor; }
/**
- * Returns true if any of the stages preserved by GrProcOptInfo read the dst color.
- */
- bool readsDst() const { return fReadsDst; }
-
- /**
* Returns true if any of the stages preserved by GrProcOptInfo read the frag position.
*/
bool readsFragPosition() const { return fReadsFragPosition; }
@@ -91,7 +85,6 @@ private:
int fFirstEffectStageIndex;
bool fInputColorIsUsed;
GrColor fInputColor;
- bool fReadsDst;
bool fReadsFragPosition;
};
diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp
index bb87616e74..fe286f6bf5 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.cpp
+++ b/src/gpu/effects/GrCoverageSetOpXP.cpp
@@ -195,22 +195,13 @@ void GrCoverageSetOpXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI,
output->fBlendedColorFlags = 0;
}
- if (coveragePOI.readsDst()) {
- output->fWillBlendWithDst = true;
- } else {
- output->fWillBlendWithDst = false;
- }
+ output->fWillBlendWithDst = false;
} else {
output->fBlendedColorFlags = 0;
output->fWillBlendWithDst = true;
}
}
-bool GrCoverageSetOpXPFactory::willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const {
- return coveragePOI.readsDst();
-}
-
GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory);
GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random,
diff --git a/src/gpu/effects/GrCoverageSetOpXP.h b/src/gpu/effects/GrCoverageSetOpXP.h
index 289b5cf307..a144f975b7 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.h
+++ b/src/gpu/effects/GrCoverageSetOpXP.h
@@ -83,8 +83,7 @@ public:
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
- bool willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const SK_OVERRIDE;
+ bool willReadDst() const SK_OVERRIDE { return false; }
private:
GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage);
diff --git a/src/gpu/effects/GrCustomXfermodePriv.h b/src/gpu/effects/GrCustomXfermodePriv.h
index 48ad7842f5..45a9d3005d 100644
--- a/src/gpu/effects/GrCustomXfermodePriv.h
+++ b/src/gpu/effects/GrCustomXfermodePriv.h
@@ -126,10 +126,7 @@ public:
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
- bool willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const SK_OVERRIDE {
- return true;
- }
+ bool willReadDst() const SK_OVERRIDE { return true; }
private:
bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE {
diff --git a/src/gpu/effects/GrDisableColorXP.h b/src/gpu/effects/GrDisableColorXP.h
index b0de66bf43..d62c3201dd 100644
--- a/src/gpu/effects/GrDisableColorXP.h
+++ b/src/gpu/effects/GrDisableColorXP.h
@@ -81,10 +81,7 @@ public:
output->fWillBlendWithDst = 0;
}
- bool willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const SK_OVERRIDE {
- return false;
- }
+ bool willReadDst() const SK_OVERRIDE { return false; }
private:
GrDisableColorXPFactory();
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index aecf685e62..5038aa333f 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -72,14 +72,8 @@ public:
fsBuilder->codeAppendf("%s = %s;", args.fOutputPrimary, args.fInputCoverage);
break;
case GrPorterDuffXferProcessor::kModulate_PrimaryOutputType:
- case GrPorterDuffXferProcessor::kCombineWithDst_PrimaryOutputType:
fsBuilder->codeAppendf("%s = %s * %s;", args.fOutputPrimary, args.fInputColor,
args.fInputCoverage);
- if (GrPorterDuffXferProcessor::kCombineWithDst_PrimaryOutputType ==
- xp.primaryOutputType()){
- fsBuilder->codeAppendf("%s += (vec4(1.0) - %s) * %s;", args.fOutputPrimary,
- args.fInputCoverage, fsBuilder->dstColor());
- }
break;
default:
SkFAIL("Unexpected Primary Output");
@@ -144,14 +138,13 @@ GrPorterDuffXferProcessor::getOptimizations(const GrProcOptInfo& colorPOI,
coveragePOI,
doesStencilWrite);
}
- this->calcOutputTypes(optFlags, caps, coveragePOI.isSolidWhite(),
- colorPOI.readsDst() || coveragePOI.readsDst());
+ this->calcOutputTypes(optFlags, caps, coveragePOI.isSolidWhite());
return optFlags;
}
void GrPorterDuffXferProcessor::calcOutputTypes(GrXferProcessor::OptFlags optFlags,
const GrDrawTargetCaps& caps,
- bool hasSolidCoverage, bool readsDst) {
+ bool hasSolidCoverage) {
if (optFlags & kIgnoreColor_OptFlag) {
if (optFlags & kIgnoreCoverage_OptFlag) {
fPrimaryOutputType = kNone_PrimaryOutputType;
@@ -184,10 +177,6 @@ void GrPorterDuffXferProcessor::calcOutputTypes(GrXferProcessor::OptFlags optFla
fSecondaryOutputType = kCoverageISC_SecondaryOutputType;
fDstBlend = (GrBlendCoeff)GrGpu::kIS2C_GrBlendCoeff;
}
- } else if (readsDst &&
- kOne_GrBlendCoeff == fSrcBlend &&
- kZero_GrBlendCoeff == fDstBlend) {
- fPrimaryOutputType = kCombineWithDst_PrimaryOutputType;
}
}
}
@@ -419,13 +408,6 @@ bool GrPorterDuffXPFactory::canApplyCoverage(const GrProcOptInfo& colorPOI,
return true;
}
- // TODO: once all SkXferEffects are XP's then we will never reads dst here since only XP's
- // will readDst and PD XP's don't read dst.
- if ((colorPOI.readsDst() || coveragePOI.readsDst()) &&
- kOne_GrBlendCoeff == fSrcCoeff && kZero_GrBlendCoeff == fDstCoeff) {
- return true;
- }
-
return false;
}
@@ -499,20 +481,9 @@ void GrPorterDuffXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI,
break;
}
- // TODO: once all SkXferEffects are XP's then we will never reads dst here since only XP's
- // will readDst and PD XP's don't read dst.
- if (colorPOI.readsDst() || coveragePOI.readsDst()) {
- output->fWillBlendWithDst = true;
- return;
- }
output->fWillBlendWithDst = false;
}
-bool GrPorterDuffXPFactory::willReadDst(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const {
- return colorPOI.readsDst() || coveragePOI.readsDst();
-}
-
GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory);
GrXPFactory* GrPorterDuffXPFactory::TestCreate(SkRandom* random,
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 8ec0d2ddbe..c88efac9f0 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -359,14 +359,11 @@ void GrGLProgramBuilder::verify(const GrPrimitiveProcessor& gp) {
}
void GrGLProgramBuilder::verify(const GrXferProcessor& xp) {
- // TODO: Once will readDst is only xp enable this assert and remove it from the
- // FragmentProcessor verify()
- //SkASSERT(fFS.hasReadDstColor() == xp.willReadDstColor());
+ SkASSERT(fFS.hasReadDstColor() == xp.willReadDstColor());
}
void GrGLProgramBuilder::verify(const GrFragmentProcessor& fp) {
SkASSERT(fFS.hasReadFragmentPosition() == fp.willReadFragmentPosition());
- SkASSERT(fFS.hasReadDstColor() == fp.willReadDstColor());
}
template <class Proc>
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 70b95e003d..0a28ba2feb 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -157,11 +157,6 @@ static void set_random_color_coverage_stages(GrGLGpu* gpu,
dummyTextures));
SkASSERT(fp);
- // don't add dst color reads to coverage stage
- if (s >= numColorProcs && fp->willReadDstColor()) {
- continue;
- }
-
// If adding this effect would exceed the max texture coord set count then generate a
// new random effect.
if (usePathRendering && gpu->glPathRendering()->texturingMode() ==
@@ -310,7 +305,7 @@ bool GrDrawTarget::programUnitTest(int maxStages) {
} else {
primProc = pathProc.get();
}
- if (!this->setupDstReadIfNecessary(&ds, primProc, &dstCopy, NULL)) {
+ if (!this->setupDstReadIfNecessary(&ds, &dstCopy, NULL)) {
SkDebugf("Couldn't setup dst read texture");
return false;
}