OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 The Android Open Source Project | 3 * Copyright 2011 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 SkDrawLooper_DEFINED | 10 #ifndef SkDrawLooper_DEFINED |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 * returns false then computeFastBounds behavior is undefined otherwise it | 81 * returns false then computeFastBounds behavior is undefined otherwise it |
82 * is expected to have the following behavior. Given the parent paint and | 82 * is expected to have the following behavior. Given the parent paint and |
83 * the parent's bounding rect the subclass must fill in and return the | 83 * the parent's bounding rect the subclass must fill in and return the |
84 * storage rect, where the storage rect is with the union of the src rect | 84 * storage rect, where the storage rect is with the union of the src rect |
85 * and the looper's bounding rect. | 85 * and the looper's bounding rect. |
86 */ | 86 */ |
87 virtual bool canComputeFastBounds(const SkPaint& paint) const; | 87 virtual bool canComputeFastBounds(const SkPaint& paint) const; |
88 virtual void computeFastBounds(const SkPaint& paint, | 88 virtual void computeFastBounds(const SkPaint& paint, |
89 const SkRect& src, SkRect* dst) const; | 89 const SkRect& src, SkRect* dst) const; |
90 | 90 |
91 SkDEVCODE(virtual void toString(SkString* str) const = 0;) | 91 SK_TO_STRING_PUREVIRT() |
92 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) | 92 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) |
93 | 93 |
94 protected: | 94 protected: |
95 SkDrawLooper() {} | 95 SkDrawLooper() {} |
96 SkDrawLooper(SkReadBuffer& buffer) : INHERITED(buffer) {} | 96 SkDrawLooper(SkReadBuffer& buffer) : INHERITED(buffer) {} |
97 | 97 |
98 private: | 98 private: |
99 typedef SkFlattenable INHERITED; | 99 typedef SkFlattenable INHERITED; |
100 }; | 100 }; |
101 | 101 |
102 #endif | 102 #endif |
OLD | NEW |