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

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

Issue 1414373002: Move shader precision modifier check onto GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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/effects/GrDistanceFieldGeoProc.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureDomain.cpp
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index ae0a614dcaee9718354af36c6d00ac6cfa61a9da..400c0b6e1c685a286bd9c71e88f6771b65509a3a 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -9,6 +9,7 @@
#include "GrInvariantOutput.h"
#include "GrSimpleTextureEffect.h"
#include "SkFloatingPoint.h"
+#include "gl/GrGLContext.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
@@ -99,11 +100,11 @@ void GrTextureDomain::GLDomain::sampleTexture(GrGLShaderBuilder* builder,
inCoords.c_str());
builder->codeAppend(";");
- builder->codeAppend(GrGLShaderVar::PrecisionString(kHigh_GrSLPrecision,
- program->ctxInfo().standard()));
+ builder->codeAppend(GrGLShaderVar::PrecisionString(program->glslCaps(),
+ kHigh_GrSLPrecision));
builder->codeAppendf("float x = (%s).x;", inCoords.c_str());
- builder->codeAppend(GrGLShaderVar::PrecisionString(kHigh_GrSLPrecision,
- program->ctxInfo().standard()));
+ builder->codeAppend(GrGLShaderVar::PrecisionString(program->glslCaps(),
+ kHigh_GrSLPrecision));
builder->codeAppendf("float y = (%s).y;", inCoords.c_str());
builder->codeAppendf("x = abs(2.0*(x - %s.x)/(%s.z - %s.x) - 1.0);",
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698