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