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

Unified Diff: src/gpu/gl/builders/GrGLShaderBuilder.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/gl/builders/GrGLShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLCaps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.cpp b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
index 84c3c6522ca982c438b713c840e6a2def4f82c4a..c2a9dc0bf5f9374df8a121b2513793627bb4399e 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
@@ -8,8 +8,10 @@
#include "GrGLShaderBuilder.h"
#include "GrGLProgramBuilder.h"
#include "GrGLShaderStringBuilder.h"
-#include "../GrGLGpu.h"
-#include "../GrGLShaderVar.h"
+#include "gl/GrGLCaps.h"
+#include "gl/GrGLContext.h"
+#include "gl/GrGLGpu.h"
+#include "gl/GrGLShaderVar.h"
#include "glsl/GrGLSLCaps.h"
namespace {
@@ -67,7 +69,7 @@ GrGLShaderBuilder::GrGLShaderBuilder(GrGLProgramBuilder* program)
void GrGLShaderBuilder::declAppend(const GrGLShaderVar& var) {
SkString tempDecl;
- var.appendDecl(fProgramBuilder->ctxInfo(), &tempDecl);
+ var.appendDecl(fProgramBuilder->glslCaps(), &tempDecl);
this->codeAppendf("%s;", tempDecl.c_str());
}
@@ -81,9 +83,8 @@ void GrGLShaderBuilder::emitFunction(GrSLType returnType,
fProgramBuilder->nameVariable(outName, '\0', name);
this->functions().appendf(" %s", outName->c_str());
this->functions().append("(");
- const GrGLContextInfo& ctxInfo = fProgramBuilder->gpu()->ctxInfo();
for (int i = 0; i < argCnt; ++i) {
- args[i].appendDecl(ctxInfo, &this->functions());
+ args[i].appendDecl(fProgramBuilder->glslCaps(), &this->functions());
if (i < argCnt - 1) {
this->functions().append(", ");
}
@@ -147,7 +148,7 @@ void GrGLShaderBuilder::addFeature(uint32_t featureBit, const char* extensionNam
void GrGLShaderBuilder::appendDecls(const VarArray& vars, SkString* out) const {
for (int i = 0; i < vars.count(); ++i) {
- vars[i].appendDecl(fProgramBuilder->ctxInfo(), out);
+ vars[i].appendDecl(fProgramBuilder->glslCaps(), out);
out->append(";\n");
}
}
« no previous file with comments | « src/gpu/gl/builders/GrGLShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698