OLD | NEW |
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 #ifndef SkGradientShaderPriv_DEFINED | 8 #ifndef SkGradientShaderPriv_DEFINED |
9 #define SkGradientShaderPriv_DEFINED | 9 #define SkGradientShaderPriv_DEFINED |
10 | 10 |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 void emitUniforms(GrGLShaderBuilder* builder, EffectKey key); | 364 void emitUniforms(GrGLShaderBuilder* builder, EffectKey key); |
365 | 365 |
366 | 366 |
367 // emit code that gets a fragment's color from an expression for t; Has bran
ches for 3 separate | 367 // emit code that gets a fragment's color from an expression for t; Has bran
ches for 3 separate |
368 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b
oth using | 368 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b
oth using |
369 // native GLSL mix), and 4+ color gradients that use the traditional texture
lookup. | 369 // native GLSL mix), and 4+ color gradients that use the traditional texture
lookup. |
370 void emitColor(GrGLShaderBuilder* builder, | 370 void emitColor(GrGLShaderBuilder* builder, |
371 const char* gradientTValue, | 371 const char* gradientTValue, |
372 EffectKey key, | 372 EffectKey key, |
373 const char* outputColor, | 373 const char* outputColor, |
374 const char* inputColor, | 374 const GrGLSLExpr4& inputColor, |
375 const TextureSamplerArray& samplers); | 375 const TextureSamplerArray& samplers); |
376 | 376 |
377 private: | 377 private: |
378 SkScalar fCachedYCoord; | 378 SkScalar fCachedYCoord; |
379 GrGLUniformManager::UniformHandle fFSYUni; | 379 GrGLUniformManager::UniformHandle fFSYUni; |
380 GrGLUniformManager::UniformHandle fColorStartUni; | 380 GrGLUniformManager::UniformHandle fColorStartUni; |
381 GrGLUniformManager::UniformHandle fColorMidUni; | 381 GrGLUniformManager::UniformHandle fColorMidUni; |
382 GrGLUniformManager::UniformHandle fColorEndUni; | 382 GrGLUniformManager::UniformHandle fColorEndUni; |
383 | 383 |
384 typedef GrGLEffect INHERITED; | 384 typedef GrGLEffect INHERITED; |
385 }; | 385 }; |
386 | 386 |
387 #endif | 387 #endif |
388 | 388 |
389 #endif | 389 #endif |
OLD | NEW |