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

Unified Diff: src/gpu/glsl/GrGLSLShaderBuilder.cpp

Issue 1881513002: Add appendPrecisionModifier method to GrGLSLShaderBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/glsl/GrGLSLShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLShaderVar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLShaderBuilder.cpp
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index 93b9f8a57aee00d5754e68e39287e940c398e009..795e5cb585de66e0ea6c78c60f5a4af821561020 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -35,6 +35,12 @@ void GrGLSLShaderBuilder::declAppend(const GrGLSLShaderVar& var) {
this->codeAppendf("%s;", tempDecl.c_str());
}
+void GrGLSLShaderBuilder::appendPrecisionModifier(GrSLPrecision precision) {
+ if (fProgramBuilder->glslCaps()->usesPrecisionModifiers()) {
+ this->codeAppendf("%s ", GrGLSLPrecisionString(precision));
+ }
+}
+
void GrGLSLShaderBuilder::emitFunction(GrSLType returnType,
const char* name,
int argCnt,
« no previous file with comments | « src/gpu/glsl/GrGLSLShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLShaderVar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698