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 |
11 #define SkMaskFilter_DEFINED | 11 #define SkMaskFilter_DEFINED |
12 | 12 |
13 #include "SkBlurTypes.h" | 13 #include "SkBlurTypes.h" |
14 #include "SkFlattenable.h" | 14 #include "SkFlattenable.h" |
15 #include "SkMask.h" | 15 #include "SkMask.h" |
16 #include "SkPaint.h" | 16 #include "SkPaint.h" |
17 | 17 |
| 18 class GrClip; |
18 class GrContext; | 19 class GrContext; |
19 class GrPaint; | 20 class GrPaint; |
20 class GrRenderTarget; | 21 class GrRenderTarget; |
21 class SkBitmap; | 22 class SkBitmap; |
22 class SkBlitter; | 23 class SkBlitter; |
23 class SkCachedData; | 24 class SkCachedData; |
24 class SkMatrix; | 25 class SkMatrix; |
25 class SkPath; | 26 class SkPath; |
26 class SkRasterClip; | 27 class SkRasterClip; |
27 class SkRRect; | 28 class SkRRect; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 const SkMatrix& ctm, | 94 const SkMatrix& ctm, |
94 SkRect* maskRect) const; | 95 SkRect* maskRect) const; |
95 | 96 |
96 /** | 97 /** |
97 * Try to directly render the mask filter into the target. Returns | 98 * Try to directly render the mask filter into the target. Returns |
98 * true if drawing was successful. | 99 * true if drawing was successful. |
99 */ | 100 */ |
100 virtual bool directFilterMaskGPU(GrContext* context, | 101 virtual bool directFilterMaskGPU(GrContext* context, |
101 GrRenderTarget* rt, | 102 GrRenderTarget* rt, |
102 GrPaint* grp, | 103 GrPaint* grp, |
| 104 const GrClip&, |
103 const SkMatrix& viewMatrix, | 105 const SkMatrix& viewMatrix, |
104 const SkStrokeRec& strokeRec, | 106 const SkStrokeRec& strokeRec, |
105 const SkPath& path) const; | 107 const SkPath& path) const; |
106 /** | 108 /** |
107 * Try to directly render a rounded rect mask filter into the target. Retu
rns | 109 * Try to directly render a rounded rect mask filter into the target. Retu
rns |
108 * true if drawing was successful. | 110 * true if drawing was successful. |
109 */ | 111 */ |
110 virtual bool directFilterRRectMaskGPU(GrContext* context, | 112 virtual bool directFilterRRectMaskGPU(GrContext* context, |
111 GrRenderTarget* rt, | 113 GrRenderTarget* rt, |
112 GrPaint* grp, | 114 GrPaint* grp, |
| 115 const GrClip&, |
113 const SkMatrix& viewMatrix, | 116 const SkMatrix& viewMatrix, |
114 const SkStrokeRec& strokeRec, | 117 const SkStrokeRec& strokeRec, |
115 const SkRRect& rrect) const; | 118 const SkRRect& rrect) const; |
116 | 119 |
117 /** | 120 /** |
118 * This function is used to implement filters that require an explicit src m
ask. It should only | 121 * This function is used to implement filters that require an explicit src m
ask. It should only |
119 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from | 122 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from |
120 * that call. canOverwriteSrc indicates whether the implementation may treat
src as a scratch | 123 * that call. canOverwriteSrc indicates whether the implementation may treat
src as a scratch |
121 * texture and overwrite its contents. When true it is also legal to return
src as the result. | 124 * texture and overwrite its contents. When true it is also legal to return
src as the result. |
122 * Implementations are free to get the GrContext from the src texture in ord
er to create | 125 * Implementations are free to get the GrContext from the src texture in ord
er to create |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 mask and then call filterMask(). If this returns true, the specified blitte
r will be called | 223 mask and then call filterMask(). If this returns true, the specified blitte
r will be called |
221 to render that mask. Returns false if filterMask() returned false. | 224 to render that mask. Returns false if filterMask() returned false. |
222 */ | 225 */ |
223 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, | 226 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, |
224 SkBlitter*, SkPaint::Style style) const; | 227 SkBlitter*, SkPaint::Style style) const; |
225 | 228 |
226 typedef SkFlattenable INHERITED; | 229 typedef SkFlattenable INHERITED; |
227 }; | 230 }; |
228 | 231 |
229 #endif | 232 #endif |
OLD | NEW |