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

Unified Diff: src/gpu/GrDrawState.cpp

Issue 649783003: Force input coverage to be only a byte in gpu shaders. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/GrAARectRenderer.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.cpp
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index c4b8154852084847e1dbb205e5a0b367015f0a9a..d300f2b9bbd12d6d78f66bbccedefe2a144a82f8 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -389,7 +389,7 @@ bool GrDrawState::hasSolidCoverage() const {
}
GrProcessor::InvariantOutput inout;
- inout.fIsSingleComponent = false;
+ inout.fIsSingleComponent = true;
// Initialize to an unknown starting coverage if per-vertex coverage is specified.
if (this->hasCoverageVertexAttribute()) {
inout.fValidFlags = 0;
@@ -738,7 +738,7 @@ bool GrDrawState::srcAlphaWillBeOne() const {
// The shader generated for coverage drawing runs the full coverage computation and then
// makes the shader output be the multiplication of color and coverage. We mirror that here.
GrProcessor::InvariantOutput inoutCoverage;
- inoutCoverage.fIsSingleComponent = false;
+ inoutCoverage.fIsSingleComponent = true;
if (this->hasCoverageVertexAttribute()) {
inoutCoverage.fValidFlags = 0;
inoutCoverage.fColor = 0; // suppresses any warnings.
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698