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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 CodeStage* fCodeStage; | 221 CodeStage* fCodeStage; |
222 int fSavedIndex; | 222 int fSavedIndex; |
223 const GrEffectStage* fSavedEffectStage; | 223 const GrEffectStage* fSavedEffectStage; |
224 }; | 224 }; |
225 private: | 225 private: |
226 void validate() const { SkASSERT((NULL == fEffectStage) == (-1 == fCurre
ntIndex)); } | 226 void validate() const { SkASSERT((NULL == fEffectStage) == (-1 == fCurre
ntIndex)); } |
227 int fNextIndex; | 227 int fNextIndex; |
228 int fCurrentIndex; | 228 int fCurrentIndex; |
229 const GrEffectStage* fEffectStage; | 229 const GrEffectStage* fEffectStage; |
230 } fCodeStage; | 230 } fCodeStage; |
| 231 |
231 private: | 232 private: |
232 | 233 |
233 /** | 234 /** |
234 * The base class will emit the fragment code that precedes the per-effect c
ode and then call | 235 * The base class will emit the fragment code that precedes the per-effect c
ode and then call |
235 * this function. The subclass can use it to insert additional fragment code
that should | 236 * this function. The subclass can use it to insert additional fragment code
that should |
236 * execute before the effects' code and/or emit other shaders (e.g. geometry
, vertex). | 237 * execute before the effects' code and/or emit other shaders (e.g. geometry
, vertex). |
237 * | 238 * |
238 * The subclass can modify the initial color or coverage | 239 * The subclass can modify the initial color or coverage |
239 */ | 240 */ |
240 virtual void emitCodeBeforeEffects(GrGLSLExpr4* color, | 241 virtual void emitCodeBeforeEffects(GrGLSLExpr4* color, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 int effectCnt, | 368 int effectCnt, |
368 const GrGLProgramDesc::Effe
ctKeyProvider&, | 369 const GrGLProgramDesc::Effe
ctKeyProvider&, |
369 GrGLSLExpr4* inOutFSColor)
SK_OVERRIDE; | 370 GrGLSLExpr4* inOutFSColor)
SK_OVERRIDE; |
370 | 371 |
371 virtual void emitCodeAfterEffects() SK_OVERRIDE {} | 372 virtual void emitCodeAfterEffects() SK_OVERRIDE {} |
372 | 373 |
373 typedef GrGLProgramBuilder INHERITED; | 374 typedef GrGLProgramBuilder INHERITED; |
374 }; | 375 }; |
375 | 376 |
376 #endif | 377 #endif |
OLD | NEW |