OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkMaskFilter_DEFINED | 10 #ifndef SkMaskFilter_DEFINED |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 SkRect* maskRect) const; | 94 SkRect* maskRect) const; |
95 | 95 |
96 /** | 96 /** |
97 * Try to directly render the mask filter into the target. Returns | 97 * Try to directly render the mask filter into the target. Returns |
98 * true if drawing was successful. | 98 * true if drawing was successful. |
99 */ | 99 */ |
100 virtual bool directFilterMaskGPU(GrContext* context, | 100 virtual bool directFilterMaskGPU(GrContext* context, |
101 GrPaint* grp, | 101 GrPaint* grp, |
102 const SkStrokeRec& strokeRec, | 102 const SkStrokeRec& strokeRec, |
103 const SkPath& path) const; | 103 const SkPath& path) const; |
| 104 /** |
| 105 * Try to directly render a rounded rect mask filter into the target. Retu
rns |
| 106 * true if drawing was successful. |
| 107 */ |
| 108 virtual bool directFilterRRectMaskGPU(GrContext* context, |
| 109 GrPaint* grp, |
| 110 const SkStrokeRec& strokeRec, |
| 111 const SkRRect& rrect) const; |
104 | 112 |
105 /** | 113 /** |
106 * This function is used to implement filters that require an explicit src m
ask. It should only | 114 * This function is used to implement filters that require an explicit src m
ask. It should only |
107 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from | 115 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from |
108 * that call. canOverwriteSrc indicates whether the implementation may treat
src as a scratch | 116 * that call. canOverwriteSrc indicates whether the implementation may treat
src as a scratch |
109 * texture and overwrite its contents. When true it is also legal to return
src as the result. | 117 * texture and overwrite its contents. When true it is also legal to return
src as the result. |
110 * Implementations are free to get the GrContext from the src texture in ord
er to create | 118 * Implementations are free to get the GrContext from the src texture in ord
er to create |
111 * additional textures and perform multiple passes. | 119 * additional textures and perform multiple passes. |
112 */ | 120 */ |
113 virtual bool filterMaskGPU(GrTexture* src, | 121 virtual bool filterMaskGPU(GrTexture* src, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 to render that mask. Returns false if filterMask() returned false. | 201 to render that mask. Returns false if filterMask() returned false. |
194 */ | 202 */ |
195 bool filterRRect(const SkRRect& devRRect, const SkMatrix& devMatrix, | 203 bool filterRRect(const SkRRect& devRRect, const SkMatrix& devMatrix, |
196 const SkRasterClip&, SkBounder*, SkBlitter* blitter, | 204 const SkRasterClip&, SkBounder*, SkBlitter* blitter, |
197 SkPaint::Style style) const; | 205 SkPaint::Style style) const; |
198 | 206 |
199 typedef SkFlattenable INHERITED; | 207 typedef SkFlattenable INHERITED; |
200 }; | 208 }; |
201 | 209 |
202 #endif | 210 #endif |
OLD | NEW |