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

Unified Diff: bench/GLVertexAttributesBench.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 | « bench/GLVec4ScalarBench.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GLVertexAttributesBench.cpp
diff --git a/bench/GLVertexAttributesBench.cpp b/bench/GLVertexAttributesBench.cpp
index 6a4ccf5063e74f0a2c07b7ee3e30d7aece02d8ef..34c99deca134debe7b2285b6d0cda2e83745b20a 100644
--- a/bench/GLVertexAttributesBench.cpp
+++ b/bench/GLVertexAttributesBench.cpp
@@ -11,6 +11,7 @@
#if SK_SUPPORT_GPU
#include "GLBench.h"
+#include "gl/GrGLContext.h"
#include "gl/GrGLGLSL.h"
#include "gl/GrGLInterface.h"
#include "gl/GrGLShaderVar.h"
@@ -72,16 +73,16 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
SkTArray<GrGLShaderVar> oVars;
SkString vshaderTxt(version);
- aPosition.appendDecl(*ctx, &vshaderTxt);
+ aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
vshaderTxt.append(";\n");
for (uint32_t i = 0; i < attribs; i++) {
SkString aname;
aname.appendf("a_color_%d", i);
aVars.push_back(GrGLShaderVar(aname.c_str(),
- kVec4f_GrSLType,
- GrShaderVar::kAttribute_TypeModifier));
- aVars.back().appendDecl(*ctx, &vshaderTxt);
+ kVec4f_GrSLType,
+ GrShaderVar::kAttribute_TypeModifier));
+ aVars.back().appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
vshaderTxt.append(";\n");
}
@@ -90,9 +91,9 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
SkString oname;
oname.appendf("o_color_%d", i);
oVars.push_back(GrGLShaderVar(oname.c_str(),
- kVec4f_GrSLType,
- GrShaderVar::kVaryingOut_TypeModifier));
- oVars.back().appendDecl(*ctx, &vshaderTxt);
+ kVec4f_GrSLType,
+ GrShaderVar::kVaryingOut_TypeModifier));
+ oVars.back().appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
vshaderTxt.append(";\n");
}
@@ -122,7 +123,7 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
const char* fsOutName;
if (ctx->caps()->glslCaps()->mustDeclareFragmentShaderOutput()) {
- oFragColor.appendDecl(*ctx, &fshaderTxt);
+ oFragColor.appendDecl(ctx->caps()->glslCaps(), &fshaderTxt);
fshaderTxt.append(";\n");
fsOutName = oFragColor.c_str();
} else {
@@ -131,7 +132,7 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
for (uint32_t i = 0; i < maxAttribs; i++) {
oVars[i].setTypeModifier(GrShaderVar::kVaryingIn_TypeModifier);
- oVars[i].appendDecl(*ctx, &fshaderTxt);
+ oVars[i].appendDecl(ctx->caps()->glslCaps(), &fshaderTxt);
fshaderTxt.append(";\n");
}
« no previous file with comments | « bench/GLVec4ScalarBench.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698