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

Side by Side Diff: src/gpu/gl/GrGLProgram.h

Issue 13895006: Expand modulate, add, subtract, extract component glsl helpers. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/gl/GrGLProgram.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 2011 Google Inc. 2 * Copyright 2011 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 8
9 #ifndef GrGLProgram_DEFINED 9 #ifndef GrGLProgram_DEFINED
10 #define GrGLProgram_DEFINED 10 #define GrGLProgram_DEFINED
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const GrGLProgramDesc& desc, 118 const GrGLProgramDesc& desc,
119 const GrEffectStage* stages[]); 119 const GrEffectStage* stages[]);
120 120
121 bool succeeded() const { return 0 != fProgramID; } 121 bool succeeded() const { return 0 != fProgramID; }
122 122
123 /** 123 /**
124 * This is the heavy initialization routine for building a GLProgram. 124 * This is the heavy initialization routine for building a GLProgram.
125 */ 125 */
126 bool genProgram(const GrEffectStage* stages[]); 126 bool genProgram(const GrEffectStage* stages[]);
127 127
128 void genInputColor(GrGLShaderBuilder* builder, SkString* inColor); 128 GrSLConstantVec genInputColor(GrGLShaderBuilder* builder, SkString* inColor) ;
129
130 GrSLConstantVec genInputCoverage(GrGLShaderBuilder* builder, SkString* inCov erage);
129 131
130 void genGeometryShader(GrGLShaderBuilder* segments) const; 132 void genGeometryShader(GrGLShaderBuilder* segments) const;
131 133
132 typedef GrGLUniformManager::UniformHandle UniformHandle; 134 typedef GrGLUniformManager::UniformHandle UniformHandle;
133 135
134 void genUniformCoverage(GrGLShaderBuilder* segments, SkString* inOutCoverage );
135
136 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and links the program 136 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and links the program
137 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder, 137 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder,
138 bool bindColorOut, 138 bool bindColorOut,
139 bool bindDualSrcOut); 139 bool bindDualSrcOut);
140 140
141 // Sets the texture units for samplers 141 // Sets the texture units for samplers
142 void initSamplerUniforms(); 142 void initSamplerUniforms();
143 143
144 bool compileShaders(const GrGLShaderBuilder& builder); 144 bool compileShaders(const GrGLShaderBuilder& builder);
145 145
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 GrGLProgramDesc fDesc; 205 GrGLProgramDesc fDesc;
206 const GrGLContext& fContext; 206 const GrGLContext& fContext;
207 207
208 GrGLUniformManager fUniformManager; 208 GrGLUniformManager fUniformManager;
209 UniformHandles fUniformHandles; 209 UniformHandles fUniformHandles;
210 210
211 typedef GrRefCnt INHERITED; 211 typedef GrRefCnt INHERITED;
212 }; 212 };
213 213
214 #endif 214 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698