| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 protected: | 254 protected: |
| 255 | 255 |
| 256 /** Populates a pair of arrays with colors and stop info to construct a rand
om gradient. | 256 /** Populates a pair of arrays with colors and stop info to construct a rand
om gradient. |
| 257 The function decides whether stop values should be used or not. The retu
rn value indicates | 257 The function decides whether stop values should be used or not. The retu
rn value indicates |
| 258 the number of colors, which will be capped by kMaxRandomGradientColors.
colors should be | 258 the number of colors, which will be capped by kMaxRandomGradientColors.
colors should be |
| 259 sized to be at least kMaxRandomGradientColors. stops is a pointer to an
array of at least | 259 sized to be at least kMaxRandomGradientColors. stops is a pointer to an
array of at least |
| 260 size kMaxRandomGradientColors. It may be updated to NULL, indicating tha
t NULL should be | 260 size kMaxRandomGradientColors. It may be updated to NULL, indicating tha
t NULL should be |
| 261 passed to the gradient factory rather than the array. | 261 passed to the gradient factory rather than the array. |
| 262 */ | 262 */ |
| 263 static const int kMaxRandomGradientColors = 4; | 263 static const int kMaxRandomGradientColors = 4; |
| 264 static int RandomGradientParams(SkMWCRandom* r, | 264 static int RandomGradientParams(SkRandom* r, |
| 265 SkColor colors[kMaxRandomGradientColors], | 265 SkColor colors[kMaxRandomGradientColors], |
| 266 SkScalar** stops, | 266 SkScalar** stops, |
| 267 SkShader::TileMode* tm); | 267 SkShader::TileMode* tm); |
| 268 | 268 |
| 269 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE; | 269 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE; |
| 270 | 270 |
| 271 private: | 271 private: |
| 272 | 272 |
| 273 GrTextureAccess fTextureAccess; | 273 GrTextureAccess fTextureAccess; |
| 274 SkScalar fYCoord; | 274 SkScalar fYCoord; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 SkScalar fCachedYCoord; | 340 SkScalar fCachedYCoord; |
| 341 GrGLUniformManager::UniformHandle fFSYUni; | 341 GrGLUniformManager::UniformHandle fFSYUni; |
| 342 GrGLEffectMatrix fEffectMatrix; | 342 GrGLEffectMatrix fEffectMatrix; |
| 343 | 343 |
| 344 typedef GrGLEffect INHERITED; | 344 typedef GrGLEffect INHERITED; |
| 345 }; | 345 }; |
| 346 | 346 |
| 347 #endif | 347 #endif |
| 348 | 348 |
| 349 #endif | 349 #endif |
| OLD | NEW |