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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 // Emits the uniform used as the y-coord to texture samples in derived class
es. Subclasses | 415 // Emits the uniform used as the y-coord to texture samples in derived class
es. Subclasses |
416 // should call this method from their emitCode(). | 416 // should call this method from their emitCode(). |
417 void emitUniforms(GrGLSLFPBuilder* builder, const GrGradientEffect&); | 417 void emitUniforms(GrGLSLFPBuilder* builder, const GrGradientEffect&); |
418 | 418 |
419 | 419 |
420 // emit code that gets a fragment's color from an expression for t; Has bran
ches for 3 separate | 420 // emit code that gets a fragment's color from an expression for t; Has bran
ches for 3 separate |
421 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b
oth using | 421 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b
oth using |
422 // native GLSL mix), and 4+ color gradients that use the traditional texture
lookup. | 422 // native GLSL mix), and 4+ color gradients that use the traditional texture
lookup. |
423 void emitColor(GrGLSLFPBuilder* builder, | 423 void emitColor(GrGLSLFPBuilder* builder, |
424 GrGLSLFragmentBuilder* fragBuilder, | 424 GrGLSLFragmentBuilder* fragBuilder, |
| 425 const GrGLSLCaps* caps, |
425 const GrGradientEffect&, | 426 const GrGradientEffect&, |
426 const char* gradientTValue, | 427 const char* gradientTValue, |
427 const char* outputColor, | 428 const char* outputColor, |
428 const char* inputColor, | 429 const char* inputColor, |
429 const TextureSamplerArray& samplers); | 430 const TextureSamplerArray& samplers); |
430 | 431 |
431 private: | 432 private: |
432 enum { | 433 enum { |
433 kPremulTypeKeyBitCnt = 1, | 434 kPremulTypeKeyBitCnt = 1, |
434 kPremulTypeMask = 1, | 435 kPremulTypeMask = 1, |
(...skipping 15 matching lines...) Expand all Loading... |
450 GrGLSLProgramDataManager::UniformHandle fColorStartUni; | 451 GrGLSLProgramDataManager::UniformHandle fColorStartUni; |
451 GrGLSLProgramDataManager::UniformHandle fColorMidUni; | 452 GrGLSLProgramDataManager::UniformHandle fColorMidUni; |
452 GrGLSLProgramDataManager::UniformHandle fColorEndUni; | 453 GrGLSLProgramDataManager::UniformHandle fColorEndUni; |
453 | 454 |
454 typedef GrGLSLFragmentProcessor INHERITED; | 455 typedef GrGLSLFragmentProcessor INHERITED; |
455 }; | 456 }; |
456 | 457 |
457 #endif | 458 #endif |
458 | 459 |
459 #endif | 460 #endif |
OLD | NEW |