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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 * determines the gradient value. | 322 * determines the gradient value. |
323 */ | 323 */ |
324 | 324 |
325 class GrTextureStripAtlas; | 325 class GrTextureStripAtlas; |
326 | 326 |
327 // Base class for Gr gradient effects | 327 // Base class for Gr gradient effects |
328 class GrGradientEffect : public GrFragmentProcessor { | 328 class GrGradientEffect : public GrFragmentProcessor { |
329 public: | 329 public: |
330 | 330 |
331 GrGradientEffect(GrContext* ctx, | 331 GrGradientEffect(GrContext* ctx, |
| 332 GrShaderDataManager*, |
332 const SkGradientShaderBase& shader, | 333 const SkGradientShaderBase& shader, |
333 const SkMatrix& matrix, | 334 const SkMatrix& matrix, |
334 SkShader::TileMode tileMode); | 335 SkShader::TileMode tileMode); |
335 | 336 |
336 virtual ~GrGradientEffect(); | 337 virtual ~GrGradientEffect(); |
337 | 338 |
338 bool useAtlas() const { return SkToBool(-1 != fRow); } | 339 bool useAtlas() const { return SkToBool(-1 != fRow); } |
339 SkScalar getYCoord() const { return fYCoord; }; | 340 SkScalar getYCoord() const { return fYCoord; }; |
340 | 341 |
341 SkGradientShaderBase::GpuColorType getColorType() const { return fColorType;
} | 342 SkGradientShaderBase::GpuColorType getColorType() const { return fColorType;
} |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 GrGLProgramDataManager::UniformHandle fColorStartUni; | 447 GrGLProgramDataManager::UniformHandle fColorStartUni; |
447 GrGLProgramDataManager::UniformHandle fColorMidUni; | 448 GrGLProgramDataManager::UniformHandle fColorMidUni; |
448 GrGLProgramDataManager::UniformHandle fColorEndUni; | 449 GrGLProgramDataManager::UniformHandle fColorEndUni; |
449 | 450 |
450 typedef GrGLFragmentProcessor INHERITED; | 451 typedef GrGLFragmentProcessor INHERITED; |
451 }; | 452 }; |
452 | 453 |
453 #endif | 454 #endif |
454 | 455 |
455 #endif | 456 #endif |
OLD | NEW |