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

Side by Side Diff: src/gpu/gl/GrGLShaderBuilder.cpp

Issue 12462008: Add GrEllipseEdgeEffect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Cleaned up nits, adjusted some interfaces Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« src/gpu/GrDrawState.h ('K') | « src/gpu/gl/GrGLShaderBuilder.h ('k') | no next file » | 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 2012 Google Inc. 2 * Copyright 2012 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 "gl/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 *outName = uni.fVariable.c_str(); 207 *outName = uni.fVariable.c_str();
208 } 208 }
209 209
210 return h; 210 return h;
211 } 211 }
212 212
213 const GrGLShaderVar& GrGLShaderBuilder::getUniformVariable(UniformHandle u) cons t { 213 const GrGLShaderVar& GrGLShaderBuilder::getUniformVariable(UniformHandle u) cons t {
214 return fUniforms[handle_to_index(u)].fVariable; 214 return fUniforms[handle_to_index(u)].fVariable;
215 } 215 }
216 216
217 void GrGLShaderBuilder::addAttribute(GrSLType type,
218 const char* name) {
219 fVSAttrs.push_back().set(type,
220 GrGLShaderVar::kAttribute_TypeModifier,
221 name);
222 }
223
217 void GrGLShaderBuilder::addVarying(GrSLType type, 224 void GrGLShaderBuilder::addVarying(GrSLType type,
218 const char* name, 225 const char* name,
219 const char** vsOutName, 226 const char** vsOutName,
220 const char** fsInName) { 227 const char** fsInName) {
221 fVSOutputs.push_back(); 228 fVSOutputs.push_back();
222 fVSOutputs.back().setType(type); 229 fVSOutputs.back().setType(type);
223 fVSOutputs.back().setTypeModifier(GrGLShaderVar::kOut_TypeModifier); 230 fVSOutputs.back().setTypeModifier(GrGLShaderVar::kOut_TypeModifier);
224 if (kNonStageIdx == fCurrentStageIdx) { 231 if (kNonStageIdx == fCurrentStageIdx) {
225 fVSOutputs.back().accessName()->printf("v%s", name); 232 fVSOutputs.back().accessName()->printf("v%s", name);
226 } else { 233 } else {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 key, 462 key,
456 vsInCoord, 463 vsInCoord,
457 fsOutColor, 464 fsOutColor,
458 fsInColor, 465 fsInColor,
459 textureSamplers); 466 textureSamplers);
460 this->fVSCode.appendf("\t}\n"); 467 this->fVSCode.appendf("\t}\n");
461 this->fFSCode.appendf("\t}\n"); 468 this->fFSCode.appendf("\t}\n");
462 469
463 return glEffect; 470 return glEffect;
464 } 471 }
OLDNEW
« src/gpu/GrDrawState.h ('K') | « src/gpu/gl/GrGLShaderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698