| OLD | NEW |
| 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 #ifndef GrGLProgramBuilder_DEFINED | 8 #ifndef GrGLProgramBuilder_DEFINED |
| 9 #define GrGLProgramBuilder_DEFINED | 9 #define GrGLProgramBuilder_DEFINED |
| 10 | 10 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 GrGLProgramBuilder(GrGpuGL*, const GrOptDrawState&); | 233 GrGLProgramBuilder(GrGpuGL*, const GrOptDrawState&); |
| 234 | 234 |
| 235 const GrOptDrawState& optState() const { return fOptState; } | 235 const GrOptDrawState& optState() const { return fOptState; } |
| 236 const GrProgramDesc& desc() const { return fDesc; } | 236 const GrProgramDesc& desc() const { return fDesc; } |
| 237 const GrProgramDesc::KeyHeader& header() const { return fDesc.header(); } | 237 const GrProgramDesc::KeyHeader& header() const { return fDesc.header(); } |
| 238 | 238 |
| 239 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix | 239 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix |
| 240 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're | 240 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're |
| 241 // generating stage code. | 241 // generating stage code. |
| 242 void nameVariable(SkString* out, char prefix, const char* name); | 242 void nameVariable(SkString* out, char prefix, const char* name); |
| 243 void setupUniformColorAndCoverageIfNeeded(GrGLSLExpr4* inputColor, GrGLSLExp
r4* inputCoverage); | 243 void setupUniformColorAndCoverageIfNeeded(GrGLSLExpr4* inputColor, GrGLSLExp
r1* inputCoverage); |
| 244 void emitAndInstallProcs(const GrOptDrawState& optState, | 244 void emitAndInstallProcs(const GrOptDrawState& optState, |
| 245 GrGLSLExpr4* inputColor, | 245 GrGLSLExpr4* inputColor, |
| 246 GrGLSLExpr4* inputCoverage); | 246 GrGLSLExpr4* inputCoverage); |
| 247 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); | 247 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); |
| 248 template <class Proc> | 248 template <class Proc> |
| 249 void emitAndInstallProc(const Proc&, | 249 void emitAndInstallProc(const Proc&, |
| 250 int index, | 250 int index, |
| 251 const ProcKeyProvider&, | 251 const ProcKeyProvider&, |
| 252 const GrGLSLExpr4& input, | 252 const GrGLSLExpr4& input, |
| 253 GrGLSLExpr4* output); | 253 GrGLSLExpr4* output); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 SkSTArray<2, Transform, true> fTransforms; | 385 SkSTArray<2, Transform, true> fTransforms; |
| 386 bool fLocalCoordAttrib; | 386 bool fLocalCoordAttrib; |
| 387 }; | 387 }; |
| 388 | 388 |
| 389 struct GrGLInstalledFragProcs : public SkRefCnt { | 389 struct GrGLInstalledFragProcs : public SkRefCnt { |
| 390 virtual ~GrGLInstalledFragProcs(); | 390 virtual ~GrGLInstalledFragProcs(); |
| 391 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs; | 391 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs; |
| 392 }; | 392 }; |
| 393 | 393 |
| 394 #endif | 394 #endif |
| OLD | NEW |