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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 const SkColor* fColors; | 93 const SkColor* fColors; |
94 const SkScalar* fPos; | 94 const SkScalar* fPos; |
95 int fCount; | 95 int fCount; |
96 SkShader::TileMode fTileMode; | 96 SkShader::TileMode fTileMode; |
97 SkUnitMapper* fMapper; | 97 SkUnitMapper* fMapper; |
98 uint32_t fGradFlags; | 98 uint32_t fGradFlags; |
99 }; | 99 }; |
100 | 100 |
101 public: | 101 public: |
102 SkGradientShaderBase(const Descriptor& desc); | 102 SkGradientShaderBase(const Descriptor& desc, const SkMatrix* localMatrix); |
103 virtual ~SkGradientShaderBase(); | 103 virtual ~SkGradientShaderBase(); |
104 | 104 |
105 // The cache is initialized on-demand when getCache16/32 is called. | 105 // The cache is initialized on-demand when getCache16/32 is called. |
106 class GradientShaderCache : public SkRefCnt { | 106 class GradientShaderCache : public SkRefCnt { |
107 public: | 107 public: |
108 GradientShaderCache(U8CPU alpha, const SkGradientShaderBase& shader); | 108 GradientShaderCache(U8CPU alpha, const SkGradientShaderBase& shader); |
109 ~GradientShaderCache(); | 109 ~GradientShaderCache(); |
110 | 110 |
111 const uint16_t* getCache16(); | 111 const uint16_t* getCache16(); |
112 const SkPMColor* getCache32(); | 112 const SkPMColor* getCache32(); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 GrGLUniformManager::UniformHandle fColorStartUni; | 442 GrGLUniformManager::UniformHandle fColorStartUni; |
443 GrGLUniformManager::UniformHandle fColorMidUni; | 443 GrGLUniformManager::UniformHandle fColorMidUni; |
444 GrGLUniformManager::UniformHandle fColorEndUni; | 444 GrGLUniformManager::UniformHandle fColorEndUni; |
445 | 445 |
446 typedef GrGLEffect INHERITED; | 446 typedef GrGLEffect INHERITED; |
447 }; | 447 }; |
448 | 448 |
449 #endif | 449 #endif |
450 | 450 |
451 #endif | 451 #endif |
OLD | NEW |