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

Unified Diff: src/gpu/effects/GrDistanceFieldGeoProc.cpp

Issue 1453623003: Move glsl onto EmitArgs struct for emitCode (Closed) Base URL: https://skia.googlesource.com/skia.git@moveShaders
Patch Set: nit Created 5 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/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrMatrixConvolutionEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldGeoProc.cpp
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 159f1849b92c7c6331e5db67309465997e8287ad..1f3fedef7677727ea29fc9c673f0e550bb40ab6f 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -100,7 +100,7 @@ public:
dfTexEffect.inTextureCoords()->fName);
// Use highp to work around aliasing issues
- fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(pb->glslCaps(),
+ fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(args.fGLSLCaps,
kHigh_GrSLPrecision));
fragBuilder->codeAppendf("vec2 uv = %s;\n", uv.fsIn());
@@ -338,7 +338,7 @@ public:
"TextureSize", &textureSizeUniName);
// Use highp to work around aliasing issues
- fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(pb->glslCaps(),
+ fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(args.fGLSLCaps,
kHigh_GrSLPrecision));
fragBuilder->codeAppendf("vec2 uv = %s;", v.fsIn());
@@ -350,7 +350,7 @@ public:
fragBuilder->codeAppend("float distance = "
SK_DistanceFieldMultiplier "*(texColor - " SK_DistanceFieldThreshold ");");
- fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(pb->glslCaps(),
+ fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(args.fGLSLCaps,
kHigh_GrSLPrecision));
fragBuilder->codeAppendf("vec2 st = uv*%s;", textureSizeUniName);
fragBuilder->codeAppend("float afwidth;");
@@ -574,10 +574,10 @@ public:
// create LCD offset adjusted by inverse of transform
// Use highp to work around aliasing issues
- fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(pb->glslCaps(),
+ fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(args.fGLSLCaps,
kHigh_GrSLPrecision));
fragBuilder->codeAppendf("vec2 uv = %s;\n", uv.fsIn());
- fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(pb->glslCaps(),
+ fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(args.fGLSLCaps,
kHigh_GrSLPrecision));
SkScalar lcdDelta = 1.0f / (3.0f * atlas->width());
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrMatrixConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698