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 SkPaint_DEFINED | 8 #ifndef SkPaint_DEFINED |
9 #define SkPaint_DEFINED | 9 #define SkPaint_DEFINED |
10 | 10 |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 * then the shader will use the paint's entire color to "colorize" its outp
ut (modulating the | 492 * then the shader will use the paint's entire color to "colorize" its outp
ut (modulating the |
493 * bitmap's alpha with the paint's color+alpha). | 493 * bitmap's alpha with the paint's color+alpha). |
494 * | 494 * |
495 * Pass NULL to clear any previous shader. | 495 * Pass NULL to clear any previous shader. |
496 * As a convenience, the parameter passed is also returned. | 496 * As a convenience, the parameter passed is also returned. |
497 * If a previous shader exists, its reference count is decremented. | 497 * If a previous shader exists, its reference count is decremented. |
498 * If shader is not NULL, its reference count is incremented. | 498 * If shader is not NULL, its reference count is incremented. |
499 * @param shader May be NULL. The shader to be installed in the paint | 499 * @param shader May be NULL. The shader to be installed in the paint |
500 * @return shader | 500 * @return shader |
501 */ | 501 */ |
| 502 void setShader(sk_sp<SkShader>); |
| 503 #ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR |
502 SkShader* setShader(SkShader* shader); | 504 SkShader* setShader(SkShader* shader); |
503 void setShader(sk_sp<SkShader>); | 505 #endif |
504 | 506 |
505 /** Get the paint's colorfilter. If there is a colorfilter, its reference | 507 /** Get the paint's colorfilter. If there is a colorfilter, its reference |
506 count is not changed. | 508 count is not changed. |
507 @return the paint's colorfilter (or NULL) | 509 @return the paint's colorfilter (or NULL) |
508 */ | 510 */ |
509 SkColorFilter* getColorFilter() const { return fColorFilter.get(); } | 511 SkColorFilter* getColorFilter() const { return fColorFilter.get(); } |
510 | 512 |
511 /** Set or clear the paint's colorfilter, returning the parameter. | 513 /** Set or clear the paint's colorfilter, returning the parameter. |
512 <p /> | 514 <p /> |
513 If the paint already has a filter, its reference count is decremented. | 515 If the paint already has a filter, its reference count is decremented. |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 friend class GrStencilAndCoverTextContext; | 1156 friend class GrStencilAndCoverTextContext; |
1155 friend class GrPathRendering; | 1157 friend class GrPathRendering; |
1156 friend class GrTextUtils; | 1158 friend class GrTextUtils; |
1157 friend class GrGLPathRendering; | 1159 friend class GrGLPathRendering; |
1158 friend class SkScalerContext; | 1160 friend class SkScalerContext; |
1159 friend class SkTextBaseIter; | 1161 friend class SkTextBaseIter; |
1160 friend class SkCanonicalizePaint; | 1162 friend class SkCanonicalizePaint; |
1161 }; | 1163 }; |
1162 | 1164 |
1163 #endif | 1165 #endif |
OLD | NEW |