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