Index: src/gpu/GrDrawTarget.cpp |
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
index 10fa6b202d2da49f9b11b018ffea83d8cd6d05be..fd5e476c4ea402fc4396053b4ef994483479cf86 100644 |
--- a/src/gpu/GrDrawTarget.cpp |
+++ b/src/gpu/GrDrawTarget.cpp |
@@ -615,9 +615,15 @@ void GrDrawTarget::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
bool GrDrawTarget::canApplyCoverage() const { |
// we can correctly apply coverage if a) we have dual source blending |
- // or b) one of our blend optimizations applies. |
+ // or b) one of our blend optimizations applies |
+ // or c) the src, dst blend coeffs are 1,0 and we will read Dst Color |
+ GrBlendCoeff srcCoeff; |
+ GrBlendCoeff dstCoeff; |
+ GrDrawState::BlendOptFlags flag = this->getDrawState().getBlendOpts(true, &srcCoeff, &dstCoeff); |
return this->caps()->dualSourceBlendingSupport() || |
- GrDrawState::kNone_BlendOpt != this->getDrawState().getBlendOpts(true); |
+ GrDrawState::kNone_BlendOpt != flag || |
+ (this->getDrawState().willEffectReadDstColor() && |
+ kOne_GrBlendCoeff == srcCoeff && kZero_GrBlendCoeff == dstCoeff); |
} |
//////////////////////////////////////////////////////////////////////////////// |