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

Side by Side Diff: src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp

Issue 808593003: Rename GrGpuGL to GrGLGpu for consistency (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/builders/GrGLShaderBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLVertexShaderBuilder.h" 8 #include "GrGLVertexShaderBuilder.h"
9 #include "GrGLProgramBuilder.h" 9 #include "GrGLProgramBuilder.h"
10 #include "GrGLShaderStringBuilder.h" 10 #include "GrGLShaderStringBuilder.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const GrGeometryProcessor::VertexAttribArray& v = gp->getAttribs(); 78 const GrGeometryProcessor::VertexAttribArray& v = gp->getAttribs();
79 int vaCount = v.count(); 79 int vaCount = v.count();
80 for (int i = 0; i < vaCount; i++) { 80 for (int i = 0; i < vaCount; i++) {
81 GL_CALL(BindAttribLocation(programID, i, v[i].fName)); 81 GL_CALL(BindAttribLocation(programID, i, v[i].fName));
82 } 82 }
83 return; 83 return;
84 } 84 }
85 85
86 bool GrGLVertexBuilder::compileAndAttachShaders(GrGLuint programId, 86 bool GrGLVertexBuilder::compileAndAttachShaders(GrGLuint programId,
87 SkTDArray<GrGLuint>* shaderIds) const { 87 SkTDArray<GrGLuint>* shaderIds) const {
88 GrGpuGL* gpu = fProgramBuilder->gpu(); 88 GrGLGpu* gpu = fProgramBuilder->gpu();
89 const GrGLContext& glCtx = gpu->glContext(); 89 const GrGLContext& glCtx = gpu->glContext();
90 const GrGLContextInfo& ctxInfo = gpu->ctxInfo(); 90 const GrGLContextInfo& ctxInfo = gpu->ctxInfo();
91 SkString vertShaderSrc(GrGetGLSLVersionDecl(ctxInfo)); 91 SkString vertShaderSrc(GrGetGLSLVersionDecl(ctxInfo));
92 fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kVertex_Visibility, &vertShaderSrc); 92 fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kVertex_Visibility, &vertShaderSrc);
93 this->appendDecls(fInputs, &vertShaderSrc); 93 this->appendDecls(fInputs, &vertShaderSrc);
94 this->appendDecls(fOutputs, &vertShaderSrc); 94 this->appendDecls(fOutputs, &vertShaderSrc);
95 vertShaderSrc.append("void main() {"); 95 vertShaderSrc.append("void main() {");
96 vertShaderSrc.append(fCode); 96 vertShaderSrc.append(fCode);
97 vertShaderSrc.append("}\n"); 97 vertShaderSrc.append("}\n");
98 GrGLuint vertShaderId = GrGLCompileAndAttachShader(glCtx, programId, 98 GrGLuint vertShaderId = GrGLCompileAndAttachShader(glCtx, programId,
(...skipping 11 matching lines...) Expand all
110 for (int i = 0; i < fInputs.count(); ++i) { 110 for (int i = 0; i < fInputs.count(); ++i) {
111 const GrGLShaderVar& attr = fInputs[i]; 111 const GrGLShaderVar& attr = fInputs[i];
112 // if attribute already added, don't add it again 112 // if attribute already added, don't add it again
113 if (attr.getName().equals(var.getName())) { 113 if (attr.getName().equals(var.getName())) {
114 return false; 114 return false;
115 } 115 }
116 } 116 }
117 fInputs.push_back(var); 117 fInputs.push_back(var);
118 return true; 118 return true;
119 } 119 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLShaderBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698