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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 1132883002: Remove coverage multiplies when it is known to be fully opaque. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.cpp
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index 0349af64805c2894adfac5c52ff43767a90c8d66..1996d77d799abcfed655aed95cfdc4d79d8089ef 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -49,18 +49,17 @@ public:
bool hasVertexCoverage = SkToBool(fInCoverage) && !init.fCoverageIgnored;
bool covIsSolidWhite = !hasVertexCoverage && 0xff == this->coverage();
- if (covIsSolidWhite) {
+ if (init.fCoverageIgnored) {
+ local->fInputCoverageType = kIgnored_GrGPInput;
+ } else if (covIsSolidWhite) {
local->fInputCoverageType = kAllOnes_GrGPInput;
- } else if (!hasVertexCoverage) {
- local->fInputCoverageType = kUniform_GrGPInput;
- local->fCoverage = this->coverage();
} else if (hasVertexCoverage) {
SkASSERT(fInCoverage);
local->fInputCoverageType = kAttribute_GrGPInput;
} else {
- local->fInputCoverageType = kIgnored_GrGPInput;
+ local->fInputCoverageType = kUniform_GrGPInput;
+ local->fCoverage = this->coverage();
}
-
local->fUsesLocalCoords = init.fUsesLocalCoords;
}
« no previous file with comments | « no previous file | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698