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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 * | 317 * |
318 * The GPU device does not call SkShader::createContext(), instead we pass
the view matrix, | 318 * The GPU device does not call SkShader::createContext(), instead we pass
the view matrix, |
319 * local matrix, and filter quality directly. | 319 * local matrix, and filter quality directly. |
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 sk_sp<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, | 330 SkFilterQuality, |
331 SkSourceGammaTreatmen
t) const; | 331 SkSourceGammaTreatmen
t) const; |
332 | 332 |
333 /** | 333 /** |
334 * 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 |
335 * 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 |
336 * parameter. | 336 * parameter. |
337 * | 337 * |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 SkMatrix fLocalMatrix; | 499 SkMatrix fLocalMatrix; |
500 | 500 |
501 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 501 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
502 friend class SkLocalMatrixShader; | 502 friend class SkLocalMatrixShader; |
503 friend class SkBitmapProcShader; // for computeTotalInverse() | 503 friend class SkBitmapProcShader; // for computeTotalInverse() |
504 | 504 |
505 typedef SkFlattenable INHERITED; | 505 typedef SkFlattenable INHERITED; |
506 }; | 506 }; |
507 | 507 |
508 #endif | 508 #endif |
OLD | NEW |