| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 passed to the gradient factory rather than the array. | 281 passed to the gradient factory rather than the array. |
| 282 */ | 282 */ |
| 283 static const int kMaxRandomGradientColors = 4; | 283 static const int kMaxRandomGradientColors = 4; |
| 284 static int RandomGradientParams(SkRandom* r, | 284 static int RandomGradientParams(SkRandom* r, |
| 285 SkColor colors[kMaxRandomGradientColors], | 285 SkColor colors[kMaxRandomGradientColors], |
| 286 SkScalar** stops, | 286 SkScalar** stops, |
| 287 SkShader::TileMode* tm); | 287 SkShader::TileMode* tm); |
| 288 | 288 |
| 289 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE; | 289 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE; |
| 290 | 290 |
| 291 const GrCoordTransform& getCoordTransform() const { return fCoordTransform;
} |
| 292 |
| 291 private: | 293 private: |
| 292 static const GrCoordSet kCoordSet = kLocal_GrCoordSet; | 294 static const GrCoordSet kCoordSet = kLocal_GrCoordSet; |
| 293 | 295 |
| 294 enum { | 296 enum { |
| 295 kMaxAnalyticColors = 3 // if more colors use texture | 297 kMaxAnalyticColors = 3 // if more colors use texture |
| 296 }; | 298 }; |
| 297 | 299 |
| 298 GrCoordTransform fCoordTransform; | 300 GrCoordTransform fCoordTransform; |
| 299 GrTextureAccess fTextureAccess; | 301 GrTextureAccess fTextureAccess; |
| 300 SkScalar fYCoord; | 302 SkScalar fYCoord; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 GrGLUniformManager::UniformHandle fColorStartUni; | 380 GrGLUniformManager::UniformHandle fColorStartUni; |
| 379 GrGLUniformManager::UniformHandle fColorMidUni; | 381 GrGLUniformManager::UniformHandle fColorMidUni; |
| 380 GrGLUniformManager::UniformHandle fColorEndUni; | 382 GrGLUniformManager::UniformHandle fColorEndUni; |
| 381 | 383 |
| 382 typedef GrGLEffect INHERITED; | 384 typedef GrGLEffect INHERITED; |
| 383 }; | 385 }; |
| 384 | 386 |
| 385 #endif | 387 #endif |
| 386 | 388 |
| 387 #endif | 389 #endif |
| OLD | NEW |