Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 425153003: Remove kDisableBlend_BlendOptFlag as it is no longer needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Nit Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698