| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 SkColor* colorSrc, Rec* recSrc, | 252 SkColor* colorSrc, Rec* recSrc, |
| 253 int count); | 253 int count); |
| 254 | 254 |
| 255 private: | 255 private: |
| 256 enum { | 256 enum { |
| 257 kColorStorageCount = 4, // more than this many colors, and we'll use sk_
malloc for the space | 257 kColorStorageCount = 4, // more than this many colors, and we'll use sk_
malloc for the space |
| 258 | 258 |
| 259 kStorageSize = kColorStorageCount * (sizeof(SkColor) + sizeof(SkScalar)
+ sizeof(Rec)) | 259 kStorageSize = kColorStorageCount * (sizeof(SkColor) + sizeof(SkScalar)
+ sizeof(Rec)) |
| 260 }; | 260 }; |
| 261 SkColor fStorage[(kStorageSize + 3) >> 2]; | 261 SkColor fStorage[(kStorageSize + 3) >> 2]; |
| 262 public: |
| 262 SkColor* fOrigColors; // original colors, before modulation by paint in c
ontext. | 263 SkColor* fOrigColors; // original colors, before modulation by paint in c
ontext. |
| 263 SkScalar* fOrigPos; // original positions | 264 SkScalar* fOrigPos; // original positions |
| 265 |
| 266 bool colorsAreOpaque() const { return fColorsAreOpaque; } |
| 267 |
| 268 private: |
| 264 bool fColorsAreOpaque; | 269 bool fColorsAreOpaque; |
| 265 | 270 |
| 266 GradientShaderCache* refCache(U8CPU alpha, bool dither) const; | 271 GradientShaderCache* refCache(U8CPU alpha, bool dither) const; |
| 267 mutable SkMutex fCacheMutex; | 272 mutable SkMutex fCacheMutex; |
| 268 mutable SkAutoTUnref<GradientShaderCache> fCache; | 273 mutable SkAutoTUnref<GradientShaderCache> fCache; |
| 269 | 274 |
| 270 void initCommon(); | 275 void initCommon(); |
| 271 | 276 |
| 272 typedef SkShader INHERITED; | 277 typedef SkShader INHERITED; |
| 273 }; | 278 }; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 GrGLSLProgramDataManager::UniformHandle fColorStartUni; | 454 GrGLSLProgramDataManager::UniformHandle fColorStartUni; |
| 450 GrGLSLProgramDataManager::UniformHandle fColorMidUni; | 455 GrGLSLProgramDataManager::UniformHandle fColorMidUni; |
| 451 GrGLSLProgramDataManager::UniformHandle fColorEndUni; | 456 GrGLSLProgramDataManager::UniformHandle fColorEndUni; |
| 452 | 457 |
| 453 typedef GrGLFragmentProcessor INHERITED; | 458 typedef GrGLFragmentProcessor INHERITED; |
| 454 }; | 459 }; |
| 455 | 460 |
| 456 #endif | 461 #endif |
| 457 | 462 |
| 458 #endif | 463 #endif |
| OLD | NEW |