Index: src/gpu/gl/GrGLProgramDesc.cpp |
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp |
index 8b731fbc2c71244e80a6f6dc87262280e31e214a..b53fa89fe9ccd2639e50e9c8f045c7beecf2b612 100644 |
--- a/src/gpu/gl/GrGLProgramDesc.cpp |
+++ b/src/gpu/gl/GrGLProgramDesc.cpp |
@@ -70,7 +70,8 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState, |
bool colorIsTransBlack = SkToBool(blendOpts & GrDrawState::kEmitTransBlack_BlendOptFlag); |
bool colorIsSolidWhite = (blendOpts & GrDrawState::kEmitCoverage_BlendOptFlag) || |
- (!requiresColorAttrib && 0xffffffff == drawState.getColor()); |
+ (!requiresColorAttrib && 0xffffffff == drawState.getColor()) || |
+ (drawState.numColorStages() > 0 && !(*drawState.getColorStage(0).getEffect())->willUseInputColor()); |
int numEffects = (skipColor ? 0 : drawState.numColorStages()) + |
(skipCoverage ? 0 : drawState.numCoverageStages()); |
@@ -111,7 +112,6 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState, |
header->fHasVertexCode = hasVertexCode || requiresLocalCoordAttrib; |
header->fEmitsPointSize = isPoints; |
- header->fColorFilterXfermode = skipColor ? SkXfermode::kDst_Mode : drawState.getColorFilterMode(); |
// Currently the experimental GS will only work with triangle prims (and it doesn't do anything |
// other than pass through values from the VS to the FS anyway). |
@@ -200,11 +200,6 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState, |
bool separateCoverageFromColor = false; |
if (!drawState.isCoverageDrawing() && !skipCoverage && |
(drawState.numCoverageStages() > 0 || requiresCoverageAttrib)) { |
- // color filter is applied between color/coverage computation |
- if (SkXfermode::kDst_Mode != header->fColorFilterXfermode) { |
- separateCoverageFromColor = true; |
- } |
- |
// If we're stenciling then we want to discard samples that have zero coverage |
if (drawState.getStencil().doesWrite()) { |
header->fDiscardIfZeroCoverage = true; |