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

Unified Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp

Issue 1403373012: Make appending default precision be controled by GLSL (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/GrGLGpu.cpp ('k') | src/gpu/glsl/GrGLSL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index d31482a4bb9a708ef151bff2884d8c3e8c455139..73098547a8b2182e82bc0c8f5a0e1cb0df7b00a4 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -8,7 +8,7 @@
#include "GrGLFragmentShaderBuilder.h"
#include "GrGLProgramBuilder.h"
#include "gl/GrGLGpu.h"
-#include "gl/GrGLGLSL.h"
+#include "glsl/GrGLSL.h"
#include "glsl/GrGLSLCaps.h"
#define GL_CALL(X) GR_GL_CALL(fProgramBuilder->gpu()->glInterface(), X)
@@ -267,17 +267,16 @@ const char* GrGLFragmentShaderBuilder::getSecondaryColorOutputName() const {
bool GrGLFragmentShaderBuilder::compileAndAttachShaders(GrGLuint programId,
SkTDArray<GrGLuint>* shaderIds) {
- GrGLGpu* gpu = fProgramBuilder->gpu();
this->versionDecl() = fProgramBuilder->glslCaps()->versionDeclString();
- GrGLAppendGLSLDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision,
- gpu->glStandard(),
- &this->precisionQualifier());
+ GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision,
+ *fProgramBuilder->glslCaps(),
+ &this->precisionQualifier());
this->compileAndAppendLayoutQualifiers();
fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kFragment_Visibility,
&this->uniforms());
this->appendDecls(fInputs, &this->inputs());
// We shouldn't have declared outputs on 1.10
- SkASSERT(k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty());
+ SkASSERT(k110_GrGLSLGeneration != fProgramBuilder->gpu()->glslGeneration() || fOutputs.empty());
this->appendDecls(fOutputs, &this->outputs());
return this->finalize(programId, GR_GL_FRAGMENT_SHADER, shaderIds);
}
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/glsl/GrGLSL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698