| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 | 8 |
| 9 #ifndef SkShader_DEFINED | 9 #ifndef SkShader_DEFINED |
| 10 #define SkShader_DEFINED | 10 #define SkShader_DEFINED |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 virtual GradientType asAGradient(GradientInfo* info) const; | 354 virtual GradientType asAGradient(GradientInfo* info) const; |
| 355 | 355 |
| 356 /** | 356 /** |
| 357 * If the shader subclass has a GrEffect implementation, this resturns the
effect to install. | 357 * If the shader subclass has a GrEffect implementation, this resturns the
effect to install. |
| 358 * The incoming color to the effect has r=g=b=a all extracted from the SkPa
int's alpha. | 358 * The incoming color to the effect has r=g=b=a all extracted from the SkPa
int's alpha. |
| 359 * The output color should be the computed SkShader premul color modulated
by the incoming | 359 * The output color should be the computed SkShader premul color modulated
by the incoming |
| 360 * color. The GrContext may be used by the effect to create textures. The G
PU device does not | 360 * color. The GrContext may be used by the effect to create textures. The G
PU device does not |
| 361 * call createContext. Instead we pass the SkPaint here in case the shader
needs paint info. | 361 * call createContext. Instead we pass the SkPaint here in case the shader
needs paint info. |
| 362 */ | 362 */ |
| 363 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) c
onst; | 363 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint, |
| 364 const SkMatrix* localMatrixOrNull) const; |
| 364 | 365 |
| 365 ////////////////////////////////////////////////////////////////////////// | 366 ////////////////////////////////////////////////////////////////////////// |
| 366 // Factory methods for stock shaders | 367 // Factory methods for stock shaders |
| 367 | 368 |
| 368 /** | 369 /** |
| 369 * Call this to create a new "empty" shader, that will not draw anything. | 370 * Call this to create a new "empty" shader, that will not draw anything. |
| 370 */ | 371 */ |
| 371 static SkShader* CreateEmptyShader(); | 372 static SkShader* CreateEmptyShader(); |
| 372 | 373 |
| 373 /** Call this to create a new shader that will draw with the specified bitma
p. | 374 /** Call this to create a new shader that will draw with the specified bitma
p. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 */ | 434 */ |
| 434 virtual Context* onCreateContext(const ContextRec&, void* storage) const; | 435 virtual Context* onCreateContext(const ContextRec&, void* storage) const; |
| 435 | 436 |
| 436 private: | 437 private: |
| 437 SkMatrix fLocalMatrix; | 438 SkMatrix fLocalMatrix; |
| 438 | 439 |
| 439 typedef SkFlattenable INHERITED; | 440 typedef SkFlattenable INHERITED; |
| 440 }; | 441 }; |
| 441 | 442 |
| 442 #endif | 443 #endif |
| OLD | NEW |