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 #include "SkStrokeRec.h" | 17 #include "SkStrokeRec.h" |
18 | 18 |
19 class GrClip; | 19 class GrClip; |
20 class GrContext; | 20 class GrContext; |
21 class GrRenderTargetContext; | 21 class GrRenderTargetContext; |
22 class GrPaint; | 22 class GrPaint; |
23 class GrRenderTarget; | 23 class GrRenderTarget; |
24 class GrTextureProvider; | 24 class GrTextureProvider; |
| 25 class GrTextureProxy; |
25 class SkBitmap; | 26 class SkBitmap; |
26 class SkBlitter; | 27 class SkBlitter; |
27 class SkCachedData; | 28 class SkCachedData; |
28 class SkMatrix; | 29 class SkMatrix; |
29 class SkPath; | 30 class SkPath; |
30 class SkRasterClip; | 31 class SkRasterClip; |
31 class SkRRect; | 32 class SkRRect; |
32 | 33 |
33 /** \class SkMaskFilter | 34 /** \class SkMaskFilter |
34 | 35 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 const SkRRect& rrect, | 133 const SkRRect& rrect, |
133 const SkRRect& devRRect) const; | 134 const SkRRect& devRRect) const; |
134 | 135 |
135 /** | 136 /** |
136 * This function is used to implement filters that require an explicit src m
ask. It should only | 137 * This function is used to implement filters that require an explicit src m
ask. It should only |
137 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from | 138 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from |
138 * that call. | 139 * that call. |
139 * Implementations are free to get the GrContext from the src texture in ord
er to create | 140 * Implementations are free to get the GrContext from the src texture in ord
er to create |
140 * additional textures and perform multiple passes. | 141 * additional textures and perform multiple passes. |
141 */ | 142 */ |
142 virtual bool filterMaskGPU(GrTexture* src, | 143 virtual bool filterMaskGPU(GrTextureProxy* src, |
143 const SkMatrix& ctm, | 144 const SkMatrix& ctm, |
144 const SkIRect& maskRect, | 145 const SkIRect& maskRect, |
145 GrTexture** result) const; | 146 GrTextureProxy** result) const; |
146 #endif | 147 #endif |
147 | 148 |
148 /** | 149 /** |
149 * The fast bounds function is used to enable the paint to be culled early | 150 * The fast bounds function is used to enable the paint to be culled early |
150 * in the drawing pipeline. This function accepts the current bounds of the | 151 * in the drawing pipeline. This function accepts the current bounds of the |
151 * paint as its src param and the filter adjust those bounds using its | 152 * paint as its src param and the filter adjust those bounds using its |
152 * current mask and returns the result using the dest param. Callers are | 153 * current mask and returns the result using the dest param. Callers are |
153 * allowed to provide the same struct for both src and dest so each | 154 * allowed to provide the same struct for both src and dest so each |
154 * implementation must accomodate that behavior. | 155 * implementation must accomodate that behavior. |
155 * | 156 * |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 mask and then call filterMask(). If this returns true, the specified blitte
r will be called | 235 mask and then call filterMask(). If this returns true, the specified blitte
r will be called |
235 to render that mask. Returns false if filterMask() returned false. | 236 to render that mask. Returns false if filterMask() returned false. |
236 */ | 237 */ |
237 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, | 238 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, |
238 SkBlitter*) const; | 239 SkBlitter*) const; |
239 | 240 |
240 typedef SkFlattenable INHERITED; | 241 typedef SkFlattenable INHERITED; |
241 }; | 242 }; |
242 | 243 |
243 #endif | 244 #endif |
OLD | NEW |