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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 * | 314 * |
315 * The GrContext may be used by the to create textures that are required by
the returned | 315 * The GrContext may be used by the to create textures that are required by
the returned |
316 * processor. | 316 * processor. |
317 * | 317 * |
318 * The returned GrFragmentProcessor should expect an unpremultiplied input
color and | 318 * The returned GrFragmentProcessor should expect an unpremultiplied input
color and |
319 * produce a premultiplied output. | 319 * produce a premultiplied output. |
320 */ | 320 */ |
321 virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*, | 321 virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*, |
322 const SkMatrix& viewM
atrix, | 322 const SkMatrix& viewM
atrix, |
323 const SkMatrix* local
Matrix, | 323 const SkMatrix* local
Matrix, |
324 SkFilterQuality) cons
t; | 324 SkFilterQuality, |
| 325 GrRenderTarget* dst)
const; |
325 | 326 |
326 /** | 327 /** |
327 * If the shader can represent its "average" luminance in a single color, r
eturn true and | 328 * If the shader can represent its "average" luminance in a single color, r
eturn true and |
328 * if color is not NULL, return that color. If it cannot, return false and
ignore the color | 329 * if color is not NULL, return that color. If it cannot, return false and
ignore the color |
329 * parameter. | 330 * parameter. |
330 * | 331 * |
331 * Note: if this returns true, the returned color will always be opaque, as
only the RGB | 332 * Note: if this returns true, the returned color will always be opaque, as
only the RGB |
332 * components are used to compute luminance. | 333 * components are used to compute luminance. |
333 */ | 334 */ |
334 bool asLuminanceColor(SkColor*) const; | 335 bool asLuminanceColor(SkColor*) const; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 SkMatrix fLocalMatrix; | 440 SkMatrix fLocalMatrix; |
440 | 441 |
441 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 442 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
442 friend class SkLocalMatrixShader; | 443 friend class SkLocalMatrixShader; |
443 friend class SkBitmapProcShader; // for computeTotalInverse() | 444 friend class SkBitmapProcShader; // for computeTotalInverse() |
444 | 445 |
445 typedef SkFlattenable INHERITED; | 446 typedef SkFlattenable INHERITED; |
446 }; | 447 }; |
447 | 448 |
448 #endif | 449 #endif |
OLD | NEW |