| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 // emit code that gets a fragment's color from an expression for t; Has bran
ches for 3 separate | 416 // emit code that gets a fragment's color from an expression for t; Has bran
ches for 3 separate |
| 417 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b
oth using | 417 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b
oth using |
| 418 // native GLSL mix), and 4+ color gradients that use the traditional texture
lookup. | 418 // native GLSL mix), and 4+ color gradients that use the traditional texture
lookup. |
| 419 void emitColor(GrGLSLFPFragmentBuilder* fragBuilder, | 419 void emitColor(GrGLSLFPFragmentBuilder* fragBuilder, |
| 420 GrGLSLUniformHandler* uniformHandler, | 420 GrGLSLUniformHandler* uniformHandler, |
| 421 const GrGLSLCaps* caps, | 421 const GrGLSLCaps* caps, |
| 422 const GrGradientEffect&, | 422 const GrGradientEffect&, |
| 423 const char* gradientTValue, | 423 const char* gradientTValue, |
| 424 const char* outputColor, | 424 const char* outputColor, |
| 425 const char* inputColor, | 425 const char* inputColor, |
| 426 const SamplerArray& texSamplers); | 426 const SamplerHandle* texSampler); |
| 427 | 427 |
| 428 private: | 428 private: |
| 429 enum { | 429 enum { |
| 430 kPremulTypeKeyBitCnt = 1, | 430 kPremulTypeKeyBitCnt = 1, |
| 431 kPremulTypeMask = 1, | 431 kPremulTypeMask = 1, |
| 432 kPremulBeforeInterpKey = kPremulTypeMask, | 432 kPremulBeforeInterpKey = kPremulTypeMask, |
| 433 | 433 |
| 434 kTwoColorKey = 2 << kPremulTypeKeyBitCnt, | 434 kTwoColorKey = 2 << kPremulTypeKeyBitCnt, |
| 435 kThreeColorKey = 3 << kPremulTypeKeyBitCnt, | 435 kThreeColorKey = 3 << kPremulTypeKeyBitCnt, |
| 436 kColorKeyMask = kTwoColorKey | kThreeColorKey, | 436 kColorKeyMask = kTwoColorKey | kThreeColorKey, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 447 GrGLSLProgramDataManager::UniformHandle fColorStartUni; | 447 GrGLSLProgramDataManager::UniformHandle fColorStartUni; |
| 448 GrGLSLProgramDataManager::UniformHandle fColorMidUni; | 448 GrGLSLProgramDataManager::UniformHandle fColorMidUni; |
| 449 GrGLSLProgramDataManager::UniformHandle fColorEndUni; | 449 GrGLSLProgramDataManager::UniformHandle fColorEndUni; |
| 450 | 450 |
| 451 typedef GrGLSLFragmentProcessor INHERITED; | 451 typedef GrGLSLFragmentProcessor INHERITED; |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 #endif | 454 #endif |
| 455 | 455 |
| 456 #endif | 456 #endif |
| OLD | NEW |