gl programs rewrite
BUG=skia:
Review URL: https://codereview.chromium.org/628633003
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index f967a6f..07243fc 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -404,7 +404,7 @@
if (this->hasCoverageVertexAttribute()) {
inout.fValidFlags = 0;
} else {
- inout.fColor = fCoverage;
+ inout.fColor = this->getCoverageColor();
inout.fValidFlags = kRGBA_GrColorComponentFlags;
}
@@ -413,6 +413,7 @@
const GrGeometryProcessor* gp = fGeometryProcessor->getGeometryProcessor();
gp->computeInvariantOutput(&inout);
}
+
for (int s = 0; s < this->numCoverageStages(); ++s) {
const GrProcessor* processor = this->getCoverageStage(s).getProcessor();
processor->computeInvariantOutput(&inout);
@@ -640,8 +641,8 @@
////////////////////////////////////////////////////////////////////////////////
GrDrawState::BlendOptFlags GrDrawState::getBlendOpts(bool forceCoverage,
- GrBlendCoeff* srcCoeff,
- GrBlendCoeff* dstCoeff) const {
+ GrBlendCoeff* srcCoeff,
+ GrBlendCoeff* dstCoeff) const {
GrBlendCoeff bogusSrcCoeff, bogusDstCoeff;
if (NULL == srcCoeff) {
srcCoeff = &bogusSrcCoeff;