Index: src/gpu/GrOptDrawState.cpp |
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp |
index 742ffade125f8b448af7ea6a3487396ea8d486af..bc1ce7dc930258052749c203fde00296401dd236 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) { |