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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 const SkIRect& clipBounds, | 90 const SkIRect& clipBounds, |
91 const SkMatrix& ctm, | 91 const SkMatrix& ctm, |
92 SkRect* maskRect) const; | 92 SkRect* maskRect) const; |
93 | 93 |
94 /** | 94 /** |
95 * Try to directly render the mask filter into the target. Returns | 95 * Try to directly render the mask filter into the target. Returns |
96 * true if drawing was successful. | 96 * true if drawing was successful. |
97 */ | 97 */ |
98 virtual bool directFilterMaskGPU(GrContext* context, | 98 virtual bool directFilterMaskGPU(GrContext* context, |
99 GrPaint* grp, | 99 GrPaint* grp, |
| 100 const SkMatrix& viewMatrix, |
100 const SkStrokeRec& strokeRec, | 101 const SkStrokeRec& strokeRec, |
101 const SkPath& path) const; | 102 const SkPath& path) const; |
102 /** | 103 /** |
103 * Try to directly render a rounded rect mask filter into the target. Retu
rns | 104 * Try to directly render a rounded rect mask filter into the target. Retu
rns |
104 * true if drawing was successful. | 105 * true if drawing was successful. |
105 */ | 106 */ |
106 virtual bool directFilterRRectMaskGPU(GrContext* context, | 107 virtual bool directFilterRRectMaskGPU(GrContext* context, |
107 GrPaint* grp, | 108 GrPaint* grp, |
| 109 const SkMatrix& viewMatrix, |
108 const SkStrokeRec& strokeRec, | 110 const SkStrokeRec& strokeRec, |
109 const SkRRect& rrect) const; | 111 const SkRRect& rrect) const; |
110 | 112 |
111 /** | 113 /** |
112 * 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 |
113 * 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 |
114 * 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 |
115 * 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. |
116 * 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 |
117 * additional textures and perform multiple passes. | 119 * additional textures and perform multiple passes. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 mask and then call filterMask(). If this returns true, the specified blitte
r will be called | 209 mask and then call filterMask(). If this returns true, the specified blitte
r will be called |
208 to render that mask. Returns false if filterMask() returned false. | 210 to render that mask. Returns false if filterMask() returned false. |
209 */ | 211 */ |
210 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, | 212 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, |
211 SkBlitter*, SkPaint::Style style) const; | 213 SkBlitter*, SkPaint::Style style) const; |
212 | 214 |
213 typedef SkFlattenable INHERITED; | 215 typedef SkFlattenable INHERITED; |
214 }; | 216 }; |
215 | 217 |
216 #endif | 218 #endif |
OLD | NEW |