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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 * current mask and returns the result using the dest param. Callers are | 117 * current mask and returns the result using the dest param. Callers are |
118 * allowed to provide the same struct for both src and dest so each | 118 * allowed to provide the same struct for both src and dest so each |
119 * implementation must accomodate that behavior. | 119 * implementation must accomodate that behavior. |
120 * | 120 * |
121 * The default impl calls filterMask with the src mask having no image, | 121 * The default impl calls filterMask with the src mask having no image, |
122 * but subclasses may override this if they can compute the rect faster. | 122 * but subclasses may override this if they can compute the rect faster. |
123 */ | 123 */ |
124 virtual void computeFastBounds(const SkRect& src, SkRect* dest) const; | 124 virtual void computeFastBounds(const SkRect& src, SkRect* dest) const; |
125 | 125 |
126 SkDEVCODE(virtual void toString(SkString* str) const = 0;) | 126 SkDEVCODE(virtual void toString(SkString* str) const = 0;) |
| 127 SK_DEFINE_FLATTENABLE_EFFECT_TYPE(SkMaskFilter) |
127 | 128 |
128 protected: | 129 protected: |
129 // empty for now, but lets get our subclass to remember to init us for the f
uture | 130 // empty for now, but lets get our subclass to remember to init us for the f
uture |
130 SkMaskFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {} | 131 SkMaskFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {} |
131 | 132 |
132 enum FilterReturn { | 133 enum FilterReturn { |
133 kFalse_FilterReturn, | 134 kFalse_FilterReturn, |
134 kTrue_FilterReturn, | 135 kTrue_FilterReturn, |
135 kUnimplemented_FilterReturn | 136 kUnimplemented_FilterReturn |
136 }; | 137 }; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 This method is not exported to java. | 171 This method is not exported to java. |
171 */ | 172 */ |
172 bool filterPath(const SkPath& devPath, const SkMatrix& devMatrix, | 173 bool filterPath(const SkPath& devPath, const SkMatrix& devMatrix, |
173 const SkRasterClip&, SkBounder*, SkBlitter* blitter, | 174 const SkRasterClip&, SkBounder*, SkBlitter* blitter, |
174 SkPaint::Style style) const; | 175 SkPaint::Style style) const; |
175 | 176 |
176 typedef SkFlattenable INHERITED; | 177 typedef SkFlattenable INHERITED; |
177 }; | 178 }; |
178 | 179 |
179 #endif | 180 #endif |
OLD | NEW |