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

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

Issue 23754003: Isolate VertexBuilder from GrGLShaderBuilder (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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/gl/GrGLEffectMatrix.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
11 11
12 #include "GrDrawState.h" 12 #include "GrDrawState.h"
13 #include "GrGLContext.h" 13 #include "GrGLContext.h"
14 #include "GrGLProgramDesc.h" 14 #include "GrGLProgramDesc.h"
15 #include "GrGLShaderBuilder.h"
15 #include "GrGLSL.h" 16 #include "GrGLSL.h"
16 #include "GrGLTexture.h" 17 #include "GrGLTexture.h"
17 #include "GrGLUniformManager.h" 18 #include "GrGLUniformManager.h"
18 19
19 #include "SkString.h" 20 #include "SkString.h"
20 #include "SkXfermode.h" 21 #include "SkXfermode.h"
21 22
22 class GrBinHashKeyBuilder; 23 class GrBinHashKeyBuilder;
23 class GrGLEffect; 24 class GrGLEffect;
24 class GrGLShaderBuilder; 25 class GrGLShaderBuilder;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 /** 156 /**
156 * This is the heavy initialization routine for building a GLProgram. colorS tages and 157 * This is the heavy initialization routine for building a GLProgram. colorS tages and
157 * coverageStages correspond to the output of GrGLProgramDesc::Build(). 158 * coverageStages correspond to the output of GrGLProgramDesc::Build().
158 */ 159 */
159 bool genProgram(const GrEffectStage* colorStages[], const GrEffectStage* cov erageStages[]); 160 bool genProgram(const GrEffectStage* colorStages[], const GrEffectStage* cov erageStages[]);
160 161
161 GrSLConstantVec genInputColor(GrGLShaderBuilder* builder, SkString* inColor) ; 162 GrSLConstantVec genInputColor(GrGLShaderBuilder* builder, SkString* inColor) ;
162 163
163 GrSLConstantVec genInputCoverage(GrGLShaderBuilder* builder, SkString* inCov erage); 164 GrSLConstantVec genInputCoverage(GrGLShaderBuilder* builder, SkString* inCov erage);
164 165
165 void genGeometryShader(GrGLShaderBuilder* segments) const; 166 void genGeometryShader(GrGLShaderBuilder::VertexBuilder* vertexBuilder) cons t;
166 167
167 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and links the program 168 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and links the program
168 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder, 169 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder,
169 bool bindColorOut, 170 bool bindColorOut,
170 bool bindDualSrcOut); 171 bool bindDualSrcOut);
171 172
172 // Sets the texture units for samplers 173 // Sets the texture units for samplers
173 void initSamplerUniforms(); 174 void initSamplerUniforms();
174 void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx); 175 void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx);
175 176
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 GrGLProgramDesc fDesc; 211 GrGLProgramDesc fDesc;
211 const GrGLContext& fContext; 212 const GrGLContext& fContext;
212 213
213 GrGLUniformManager fUniformManager; 214 GrGLUniformManager fUniformManager;
214 UniformHandles fUniformHandles; 215 UniformHandles fUniformHandles;
215 216
216 typedef GrRefCnt INHERITED; 217 typedef GrRefCnt INHERITED;
217 }; 218 };
218 219
219 #endif 220 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLEffectMatrix.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698