aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLVarying.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-05-29 15:33:06 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-30 18:11:48 +0000
commit70132d0c73431320d4e637868e98d8b36da05eff (patch)
tree19e3f536a0312a48e6acf80ec4e58024bec2a0df /src/gpu/glsl/GrGLSLVarying.cpp
parent8f480d91eea1421c1f9d7251699b710fd0cf2197 (diff)
Make GrPrimitiveProcessor::Attribute a class, hide data members.
Change-Id: I008881d79c82fdde6bb68fe2218e62ccc9c538dd Reviewed-on: https://skia-review.googlesource.com/130600 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLVarying.cpp')
-rw-r--r--src/gpu/glsl/GrGLSLVarying.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gpu/glsl/GrGLSLVarying.cpp b/src/gpu/glsl/GrGLSLVarying.cpp
index c5cef3492a..f8ec1c24d9 100644
--- a/src/gpu/glsl/GrGLSLVarying.cpp
+++ b/src/gpu/glsl/GrGLSLVarying.cpp
@@ -13,10 +13,10 @@ void GrGLSLVaryingHandler::addPassThroughAttribute(const GrGeometryProcessor::At
const char* output,
Interpolation interpolation) {
SkASSERT(!fProgramBuilder->primitiveProcessor().willUseGeoShader());
- GrSLType type = GrVertexAttribTypeToSLType(input->fType);
+ GrSLType type = GrVertexAttribTypeToSLType(input->type());
GrGLSLVarying v(type);
- this->addVarying(input->fName, &v, interpolation);
- fProgramBuilder->fVS.codeAppendf("%s = %s;", v.vsOut(), input->fName);
+ this->addVarying(input->name(), &v, interpolation);
+ fProgramBuilder->fVS.codeAppendf("%s = %s;", v.vsOut(), input->name());
fProgramBuilder->fFS.codeAppendf("%s = %s;", output, v.fsIn());
}
@@ -70,10 +70,7 @@ void GrGLSLVaryingHandler::emitAttributes(const GrGeometryProcessor& gp) {
int vaCount = gp.numAttribs();
for (int i = 0; i < vaCount; i++) {
const GrGeometryProcessor::Attribute& attr = gp.getAttrib(i);
- this->addAttribute(GrShaderVar(attr.fName,
- GrVertexAttribTypeToSLType(attr.fType),
- GrShaderVar::kIn_TypeModifier,
- GrShaderVar::kNonArray));
+ this->addAttribute(attr.asShaderVar());
}
}