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

Unified Diff: src/gpu/glsl/GrGLSLGeometryProcessor.cpp

Issue 1462123003: Create GrGLSLVaryingHandler class for program building (Closed) Base URL: https://skia.googlesource.com/skia.git@putCapsOnArgs
Patch Set: fix release builder Created 5 years, 1 month 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/glsl/GrGLSLGeometryProcessor.h ('k') | src/gpu/glsl/GrGLSLGeometryShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLGeometryProcessor.cpp
diff --git a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
index 706a8a846175a0fea6679a3ec15b9db3258f4370..8a1e81a1f8ee400bc1ff15df4eb9d915d93d258a 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
@@ -10,6 +10,7 @@
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProcessorTypes.h"
#include "glsl/GrGLSLProgramBuilder.h"
+#include "glsl/GrGLSLVarying.h"
#include "glsl/GrGLSLVertexShaderBuilder.h"
void GrGLSLGeometryProcessor::emitCode(EmitArgs& args) {
@@ -21,6 +22,7 @@ void GrGLSLGeometryProcessor::emitCode(EmitArgs& args) {
void GrGLSLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
GrGLSLVertexBuilder* vb,
+ GrGLSLVaryingHandler* varyingHandler,
const GrShaderVar& posVar,
const char* localCoords,
const SkMatrix& localMatrix,
@@ -56,7 +58,7 @@ void GrGLSLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
strVaryingName.appendf("_%i_%i", i, t);
GrGLSLVertToFrag v(varyingType);
- pb->addVarying(strVaryingName.c_str(), &v, precision);
+ varyingHandler->addVarying(strVaryingName.c_str(), &v, precision);
SkASSERT(kVec2f_GrSLType == varyingType || kVec3f_GrSLType == varyingType);
SkNEW_APPEND_TO_TARRAY(&(*tout)[i], GrGLSLTransformedCoords,
@@ -94,6 +96,7 @@ void GrGLSLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
void GrGLSLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
GrGLSLVertexBuilder* vb,
+ GrGLSLVaryingHandler* varyingHandler,
const char* localCoords,
const TransformsIn& tin,
TransformsOut* tout) {
@@ -111,7 +114,7 @@ void GrGLSLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
strVaryingName.appendf("_%i_%i", i, t);
GrGLSLVertToFrag v(varyingType);
- pb->addVarying(strVaryingName.c_str(), &v, precision);
+ varyingHandler->addVarying(strVaryingName.c_str(), &v, precision);
vb->codeAppendf("%s = %s;", v.vsOut(), localCoords);
SkNEW_APPEND_TO_TARRAY(&(*tout)[i],
« no previous file with comments | « src/gpu/glsl/GrGLSLGeometryProcessor.h ('k') | src/gpu/glsl/GrGLSLGeometryShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698