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