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 GrClip; |
19 class GrContext; | 19 class GrDrawContext; |
20 class GrPaint; | 20 class GrPaint; |
21 class GrRenderTarget; | 21 class GrRenderTarget; |
| 22 class GrTextureProvider; |
22 class SkBitmap; | 23 class SkBitmap; |
23 class SkBlitter; | 24 class SkBlitter; |
24 class SkCachedData; | 25 class SkCachedData; |
25 class SkMatrix; | 26 class SkMatrix; |
26 class SkPath; | 27 class SkPath; |
27 class SkRasterClip; | 28 class SkRasterClip; |
28 class SkRRect; | 29 class SkRRect; |
29 class SkStrokeRec; | 30 class SkStrokeRec; |
30 | 31 |
31 /** \class SkMaskFilter | 32 /** \class SkMaskFilter |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 */ | 90 */ |
90 virtual bool canFilterMaskGPU(const SkRect& devBounds, | 91 virtual bool canFilterMaskGPU(const SkRect& devBounds, |
91 const SkIRect& clipBounds, | 92 const SkIRect& clipBounds, |
92 const SkMatrix& ctm, | 93 const SkMatrix& ctm, |
93 SkRect* maskRect) const; | 94 SkRect* maskRect) const; |
94 | 95 |
95 /** | 96 /** |
96 * Try to directly render the mask filter into the target. Returns | 97 * Try to directly render the mask filter into the target. Returns |
97 * true if drawing was successful. | 98 * true if drawing was successful. |
98 */ | 99 */ |
99 virtual bool directFilterMaskGPU(GrContext* context, | 100 virtual bool directFilterMaskGPU(GrTextureProvider* texProvider, |
| 101 GrDrawContext* drawContext, |
100 GrRenderTarget* rt, | 102 GrRenderTarget* rt, |
101 GrPaint* grp, | 103 GrPaint* grp, |
102 const GrClip&, | 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(GrTextureProvider* texProvider, |
| 113 GrDrawContext* drawContext, |
111 GrRenderTarget* rt, | 114 GrRenderTarget* rt, |
112 GrPaint* grp, | 115 GrPaint* grp, |
113 const GrClip&, | 116 const GrClip&, |
114 const SkMatrix& viewMatrix, | 117 const SkMatrix& viewMatrix, |
115 const SkStrokeRec& strokeRec, | 118 const SkStrokeRec& strokeRec, |
116 const SkRRect& rrect) const; | 119 const SkRRect& rrect) const; |
117 | 120 |
118 /** | 121 /** |
119 * This function is used to implement filters that require an explicit src m
ask. It should only | 122 * This function is used to implement filters that require an explicit src m
ask. It should only |
120 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from | 123 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 mask and then call filterMask(). If this returns true, the specified blitte
r will be called | 224 mask and then call filterMask(). If this returns true, the specified blitte
r will be called |
222 to render that mask. Returns false if filterMask() returned false. | 225 to render that mask. Returns false if filterMask() returned false. |
223 */ | 226 */ |
224 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, | 227 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, |
225 SkBlitter*, SkPaint::Style style) const; | 228 SkBlitter*, SkPaint::Style style) const; |
226 | 229 |
227 typedef SkFlattenable INHERITED; | 230 typedef SkFlattenable INHERITED; |
228 }; | 231 }; |
229 | 232 |
230 #endif | 233 #endif |
OLD | NEW |