| 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 GrContext; | 18 class GrContext; |
| 19 class GrPaint; | 19 class GrPaint; |
| 20 class GrRenderTarget; |
| 20 class SkBitmap; | 21 class SkBitmap; |
| 21 class SkBlitter; | 22 class SkBlitter; |
| 22 class SkCachedData; | 23 class SkCachedData; |
| 23 class SkMatrix; | 24 class SkMatrix; |
| 24 class SkPath; | 25 class SkPath; |
| 25 class SkRasterClip; | 26 class SkRasterClip; |
| 26 class SkRRect; | 27 class SkRRect; |
| 27 class SkStrokeRec; | 28 class SkStrokeRec; |
| 28 | 29 |
| 29 /** \class SkMaskFilter | 30 /** \class SkMaskFilter |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(GrContext* context, |
| 101 GrRenderTarget* rt, |
| 100 GrPaint* grp, | 102 GrPaint* grp, |
| 101 const SkMatrix& viewMatrix, | 103 const SkMatrix& viewMatrix, |
| 102 const SkStrokeRec& strokeRec, | 104 const SkStrokeRec& strokeRec, |
| 103 const SkPath& path) const; | 105 const SkPath& path) const; |
| 104 /** | 106 /** |
| 105 * Try to directly render a rounded rect mask filter into the target. Retu
rns | 107 * Try to directly render a rounded rect mask filter into the target. Retu
rns |
| 106 * true if drawing was successful. | 108 * true if drawing was successful. |
| 107 */ | 109 */ |
| 108 virtual bool directFilterRRectMaskGPU(GrContext* context, | 110 virtual bool directFilterRRectMaskGPU(GrContext* context, |
| 111 GrRenderTarget* rt, |
| 109 GrPaint* grp, | 112 GrPaint* grp, |
| 110 const SkMatrix& viewMatrix, | 113 const SkMatrix& viewMatrix, |
| 111 const SkStrokeRec& strokeRec, | 114 const SkStrokeRec& strokeRec, |
| 112 const SkRRect& rrect) const; | 115 const SkRRect& rrect) const; |
| 113 | 116 |
| 114 /** | 117 /** |
| 115 * This function is used to implement filters that require an explicit src m
ask. It should only | 118 * This function is used to implement filters that require an explicit src m
ask. It should only |
| 116 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from | 119 * be called if canFilterMaskGPU returned true and the maskRect param should
be the output from |
| 117 * that call. canOverwriteSrc indicates whether the implementation may treat
src as a scratch | 120 * that call. canOverwriteSrc indicates whether the implementation may treat
src as a scratch |
| 118 * texture and overwrite its contents. When true it is also legal to return
src as the result. | 121 * texture and overwrite its contents. When true it is also legal to return
src as the result. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 mask and then call filterMask(). If this returns true, the specified blitte
r will be called | 220 mask and then call filterMask(). If this returns true, the specified blitte
r will be called |
| 218 to render that mask. Returns false if filterMask() returned false. | 221 to render that mask. Returns false if filterMask() returned false. |
| 219 */ | 222 */ |
| 220 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, | 223 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste
rClip&, |
| 221 SkBlitter*, SkPaint::Style style) const; | 224 SkBlitter*, SkPaint::Style style) const; |
| 222 | 225 |
| 223 typedef SkFlattenable INHERITED; | 226 typedef SkFlattenable INHERITED; |
| 224 }; | 227 }; |
| 225 | 228 |
| 226 #endif | 229 #endif |
| OLD | NEW |