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

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

Issue 1416423003: Make GrGLSLProgramBuilder base class for ProgramBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit 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/gl/builders/GrGLVertexShaderBuilder.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/GrGLVertexShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
index f19d63fffa23e0046ee5042fc4e9dc4bc47d420f..c4054e292bfdc2706b4f24c87cf20545007ac0b6 100644
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
@@ -6,19 +6,14 @@
*/
#include "GrGLVertexShaderBuilder.h"
-#include "GrGLProgramBuilder.h"
-#include "../GrGLGLSL.h"
-#include "../GrGLGpu.h"
+#include "glsl/GrGLSLProgramBuilder.h"
-#define GL_CALL(X) GR_GL_CALL(fProgramBuilder->gpu()->glInterface(), X)
-#define GL_CALL_RET(R, X) GR_GL_CALL_RET(fProgramBuilder->gpu()->glInterface(), R, X)
-
-GrGLVertexBuilder::GrGLVertexBuilder(GrGLProgramBuilder* program)
+GrGLVertexBuilder::GrGLVertexBuilder(GrGLSLProgramBuilder* program)
: INHERITED(program)
, fRtAdjustName(nullptr) {
}
-void GrGLVertexBuilder::addVarying(const char* name, GrSLPrecision precision, GrGLVarying* v) {
+void GrGLVertexBuilder::addVarying(const char* name, GrSLPrecision precision, GrGLSLVarying* v) {
fOutputs.push_back();
fOutputs.back().setType(v->fType);
fOutputs.back().setTypeModifier(GrGLSLShaderVar::kVaryingOut_TypeModifier);
@@ -45,7 +40,7 @@ void GrGLVertexBuilder::transformToNormalizedDeviceSpace(const GrShaderVar& posV
// setup RT Uniform
fProgramBuilder->fUniformHandles.fRTAdjustmentUni =
- fProgramBuilder->addUniform(GrGLProgramBuilder::kVertex_Visibility,
+ fProgramBuilder->addUniform(GrGLSLProgramBuilder::kVertex_Visibility,
kVec4f_GrSLType, precision,
fProgramBuilder->rtAdjustment(),
&fRtAdjustName);
@@ -77,16 +72,6 @@ void GrGLVertexBuilder::transformToNormalizedDeviceSpace(const GrShaderVar& posV
this->codeAppend("gl_PointSize = 1.0;");
}
-void GrGLVertexBuilder::bindVertexAttributes(GrGLuint programID) {
- const GrPrimitiveProcessor& primProc = fProgramBuilder->primitiveProcessor();
-
- int vaCount = primProc.numAttribs();
- for (int i = 0; i < vaCount; i++) {
- GL_CALL(BindAttribLocation(programID, i, primProc.getAttrib(i).fName));
- }
- return;
-}
-
bool GrGLVertexBuilder::addAttribute(const GrShaderVar& var) {
SkASSERT(GrShaderVar::kAttribute_TypeModifier == var.getTypeModifier());
for (int i = 0; i < fInputs.count(); ++i) {
@@ -99,3 +84,4 @@ bool GrGLVertexBuilder::addAttribute(const GrShaderVar& var) {
fInputs.push_back(var);
return true;
}
+
« no previous file with comments | « src/gpu/gl/builders/GrGLVertexShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698