| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkShader_DEFINED | 10 #ifndef SkShader_DEFINED |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 struct GradientInfo { | 305 struct GradientInfo { |
| 306 int fColorCount; //!< In-out parameter, specifies passed size | 306 int fColorCount; //!< In-out parameter, specifies passed size |
| 307 // of fColors/fColorOffsets on input, and | 307 // of fColors/fColorOffsets on input, and |
| 308 // actual number of colors/offsets on | 308 // actual number of colors/offsets on |
| 309 // output. | 309 // output. |
| 310 SkColor* fColors; //!< The colors in the gradient. | 310 SkColor* fColors; //!< The colors in the gradient. |
| 311 SkScalar* fColorOffsets; //!< The unit offset for color transitions. | 311 SkScalar* fColorOffsets; //!< The unit offset for color transitions. |
| 312 SkPoint fPoint[2]; //!< Type specific, see above. | 312 SkPoint fPoint[2]; //!< Type specific, see above. |
| 313 SkScalar fRadius[2]; //!< Type specific, see above. | 313 SkScalar fRadius[2]; //!< Type specific, see above. |
| 314 TileMode fTileMode; //!< The tile mode used. | 314 TileMode fTileMode; //!< The tile mode used. |
| 315 uint32_t fGradientFlags; //!< see SkGradientShader::Flags |
| 315 }; | 316 }; |
| 316 | 317 |
| 317 virtual GradientType asAGradient(GradientInfo* info) const; | 318 virtual GradientType asAGradient(GradientInfo* info) const; |
| 318 | 319 |
| 319 /** | 320 /** |
| 320 * If the shader subclass has a GrEffect implementation, this installs an e
ffect on the stage. | 321 * If the shader subclass has a GrEffect implementation, this installs an e
ffect on the stage. |
| 321 * The GrContext may be used by the effect to create textures. The GPU devi
ce does not call | 322 * The GrContext may be used by the effect to create textures. The GPU devi
ce does not call |
| 322 * setContext. Instead we pass the paint here in case the shader needs pain
t info. | 323 * setContext. Instead we pass the paint here in case the shader needs pain
t info. |
| 323 */ | 324 */ |
| 324 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) c
onst; | 325 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) c
onst; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 SkDEBUGCODE(SkBool8 fInSetContext;) | 368 SkDEBUGCODE(SkBool8 fInSetContext;) |
| 368 | 369 |
| 369 static SkShader* CreateBitmapShader(const SkBitmap& src, | 370 static SkShader* CreateBitmapShader(const SkBitmap& src, |
| 370 TileMode, TileMode, | 371 TileMode, TileMode, |
| 371 void* storage, size_t storageSize); | 372 void* storage, size_t storageSize); |
| 372 friend class SkAutoBitmapShaderInstall; | 373 friend class SkAutoBitmapShaderInstall; |
| 373 typedef SkFlattenable INHERITED; | 374 typedef SkFlattenable INHERITED; |
| 374 }; | 375 }; |
| 375 | 376 |
| 376 #endif | 377 #endif |
| OLD | NEW |