Force input coverage to be only a byte in gpu shaders.
Prime coverage invariant output calculations with single component
BUG=skia:
Review URL: https://codereview.chromium.org/649783003
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index c4b8154..d300f2b 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -389,7 +389,7 @@
}
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 @@
// 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.