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 #ifndef SkShader_DEFINED | 8 #ifndef SkShader_DEFINED |
9 #define SkShader_DEFINED | 9 #define SkShader_DEFINED |
10 | 10 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 * | 320 * |
321 * The GrContext may be used by the to create textures that are required by
the returned | 321 * The GrContext may be used by the to create textures that are required by
the returned |
322 * processor. | 322 * processor. |
323 * | 323 * |
324 * The returned GrFragmentProcessor should expect an unpremultiplied input
color and | 324 * The returned GrFragmentProcessor should expect an unpremultiplied input
color and |
325 * produce a premultiplied output. | 325 * produce a premultiplied output. |
326 */ | 326 */ |
327 virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*, | 327 virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*, |
328 const SkMatrix& viewM
atrix, | 328 const SkMatrix& viewM
atrix, |
329 const SkMatrix* local
Matrix, | 329 const SkMatrix* local
Matrix, |
330 SkFilterQuality) cons
t; | 330 SkFilterQuality, |
| 331 SkSourceGammaTreatmen
t) const; |
331 | 332 |
332 /** | 333 /** |
333 * If the shader can represent its "average" luminance in a single color, r
eturn true and | 334 * If the shader can represent its "average" luminance in a single color, r
eturn true and |
334 * if color is not NULL, return that color. If it cannot, return false and
ignore the color | 335 * if color is not NULL, return that color. If it cannot, return false and
ignore the color |
335 * parameter. | 336 * parameter. |
336 * | 337 * |
337 * Note: if this returns true, the returned color will always be opaque, as
only the RGB | 338 * Note: if this returns true, the returned color will always be opaque, as
only the RGB |
338 * components are used to compute luminance. | 339 * components are used to compute luminance. |
339 */ | 340 */ |
340 bool asLuminanceColor(SkColor*) const; | 341 bool asLuminanceColor(SkColor*) const; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 SkMatrix fLocalMatrix; | 499 SkMatrix fLocalMatrix; |
499 | 500 |
500 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 501 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
501 friend class SkLocalMatrixShader; | 502 friend class SkLocalMatrixShader; |
502 friend class SkBitmapProcShader; // for computeTotalInverse() | 503 friend class SkBitmapProcShader; // for computeTotalInverse() |
503 | 504 |
504 typedef SkFlattenable INHERITED; | 505 typedef SkFlattenable INHERITED; |
505 }; | 506 }; |
506 | 507 |
507 #endif | 508 #endif |
OLD | NEW |