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

Unified Diff: bench/GLVec4ScalarBench.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/GLInstancedArraysBench.cpp ('k') | bench/GLVertexAttributesBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GLVec4ScalarBench.cpp
diff --git a/bench/GLVec4ScalarBench.cpp b/bench/GLVec4ScalarBench.cpp
index 5dcf4c17a11d15ee1ab0d11d331720486c3338da..e210499401813f12f899b33c0e22d1541e494466 100644
--- a/bench/GLVec4ScalarBench.cpp
+++ b/bench/GLVec4ScalarBench.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"
@@ -105,13 +106,13 @@ GrGLuint GLVec4ScalarBench::setupShader(const GrGLContext* ctx) {
GrGLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_TypeModifier);
SkString vshaderTxt(version);
- aPosition.appendDecl(*ctx, &vshaderTxt);
+ aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
vshaderTxt.append(";\n");
- aColor.appendDecl(*ctx, &vshaderTxt);
+ aColor.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
vshaderTxt.append(";\n");
- oPosition.appendDecl(*ctx, &vshaderTxt);
+ oPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
vshaderTxt.append(";\n");
- oColor.appendDecl(*ctx, &vshaderTxt);
+ oColor.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
vshaderTxt.append(";\n");
vshaderTxt.append(
@@ -134,15 +135,15 @@ GrGLuint GLVec4ScalarBench::setupShader(const GrGLContext* ctx) {
GrGLAppendGLSLDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, gl->fStandard,
&fshaderTxt);
oPosition.setTypeModifier(GrShaderVar::kVaryingIn_TypeModifier);
- oPosition.appendDecl(*ctx, &fshaderTxt);
+ oPosition.appendDecl(ctx->caps()->glslCaps(), &fshaderTxt);
fshaderTxt.append(";\n");
oColor.setTypeModifier(GrShaderVar::kVaryingIn_TypeModifier);
- oColor.appendDecl(*ctx, &fshaderTxt);
+ oColor.appendDecl(ctx->caps()->glslCaps(), &fshaderTxt);
fshaderTxt.append(";\n");
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 {
« no previous file with comments | « bench/GLInstancedArraysBench.cpp ('k') | bench/GLVertexAttributesBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698