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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 }; | 214 }; |
215 | 215 |
216 // Determines and returns the gradient is a two color gradient, symmetric th
ree color gradient | 216 // Determines and returns the gradient is a two color gradient, symmetric th
ree color gradient |
217 // or other (texture gradient). If it is two or symmetric three color, the c
olors array will | 217 // or other (texture gradient). If it is two or symmetric three color, the c
olors array will |
218 // also be filled with the gradient colors | 218 // also be filled with the gradient colors |
219 GpuColorType getGpuColorType(SkColor colors[3]) const; | 219 GpuColorType getGpuColorType(SkColor colors[3]) const; |
220 | 220 |
221 uint32_t getGradFlags() const { return fGradFlags; } | 221 uint32_t getGradFlags() const { return fGradFlags; } |
222 | 222 |
223 protected: | 223 protected: |
| 224 class GradientShaderBase4fContext; |
| 225 |
224 SkGradientShaderBase(SkReadBuffer& ); | 226 SkGradientShaderBase(SkReadBuffer& ); |
225 void flatten(SkWriteBuffer&) const override; | 227 void flatten(SkWriteBuffer&) const override; |
226 SK_TO_STRING_OVERRIDE() | 228 SK_TO_STRING_OVERRIDE() |
227 | 229 |
228 const SkMatrix fPtsToUnit; | 230 const SkMatrix fPtsToUnit; |
229 TileMode fTileMode; | 231 TileMode fTileMode; |
230 TileProc fTileProc; | 232 TileProc fTileProc; |
231 int fColorCount; | 233 int fColorCount; |
232 uint8_t fGradFlags; | 234 uint8_t fGradFlags; |
233 | 235 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 GrGLSLProgramDataManager::UniformHandle fColorStartUni; | 457 GrGLSLProgramDataManager::UniformHandle fColorStartUni; |
456 GrGLSLProgramDataManager::UniformHandle fColorMidUni; | 458 GrGLSLProgramDataManager::UniformHandle fColorMidUni; |
457 GrGLSLProgramDataManager::UniformHandle fColorEndUni; | 459 GrGLSLProgramDataManager::UniformHandle fColorEndUni; |
458 | 460 |
459 typedef GrGLSLFragmentProcessor INHERITED; | 461 typedef GrGLSLFragmentProcessor INHERITED; |
460 }; | 462 }; |
461 | 463 |
462 #endif | 464 #endif |
463 | 465 |
464 #endif | 466 #endif |
OLD | NEW |