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

Unified Diff: src/gpu/gl/GrGLProgram.cpp

Issue 700943005: Send coverage VA as floats instead of bytes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use floats instead of scalars Created 6 years, 1 month 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 319dcceff19c53fa45fb08d0ab557767363d1d66..3456a424d0ee76f76c35cdecef30ae9a4fe52e0b 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -232,8 +232,7 @@ void GrGLProgram::setCoverage(const GrOptDrawState& optState, uint8_t coverage)
case GrProgramDesc::kUniform_ColorInput:
if (fCoverage != coverage) {
// OpenGL ES doesn't support unsigned byte varieties of glUniform
- static const float ONE_OVER_255 = 1.f / 255.f;
- GrGLfloat c = coverage * ONE_OVER_255;
+ GrGLfloat c = GrNormalizeByteToFloat(coverage);
fProgramDataManager.set1f(fBuiltinUniformHandles.fCoverageUni, c);
fCoverage = coverage;
}
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698