| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 /** | 80 /** |
| 81 * The fast bounds functions are used to enable the paint to be culled early | 81 * The fast bounds functions are used to enable the paint to be culled early |
| 82 * in the drawing pipeline. If a subclass can support this feature it must | 82 * in the drawing pipeline. If a subclass can support this feature it must |
| 83 * return true for the canComputeFastBounds() function. If that function | 83 * return true for the canComputeFastBounds() function. If that function |
| 84 * returns false then computeFastBounds behavior is undefined otherwise it | 84 * returns false then computeFastBounds behavior is undefined otherwise it |
| 85 * is expected to have the following behavior. Given the parent paint and | 85 * is expected to have the following behavior. Given the parent paint and |
| 86 * the parent's bounding rect the subclass must fill in and return the | 86 * the parent's bounding rect the subclass must fill in and return the |
| 87 * storage rect, where the storage rect is with the union of the src rect | 87 * storage rect, where the storage rect is with the union of the src rect |
| 88 * and the looper's bounding rect. | 88 * and the looper's bounding rect. |
| 89 */ | 89 */ |
| 90 virtual bool canComputeFastBounds(const SkPaint& paint) const; | 90 bool canComputeFastBounds(const SkPaint& paint) const; |
| 91 virtual void computeFastBounds(const SkPaint& paint, | 91 void computeFastBounds(const SkPaint& paint, const SkRect& src, SkRect* dst)
const; |
| 92 const SkRect& src, SkRect* dst) const; | |
| 93 | 92 |
| 94 struct BlurShadowRec { | 93 struct BlurShadowRec { |
| 95 SkScalar fSigma; | 94 SkScalar fSigma; |
| 96 SkVector fOffset; | 95 SkVector fOffset; |
| 97 SkColor fColor; | 96 SkColor fColor; |
| 98 SkBlurStyle fStyle; | 97 SkBlurStyle fStyle; |
| 99 SkBlurQuality fQuality; | 98 SkBlurQuality fQuality; |
| 100 }; | 99 }; |
| 101 /** | 100 /** |
| 102 * If this looper can be interpreted as having two layers, such that | 101 * If this looper can be interpreted as having two layers, such that |
| (...skipping 10 matching lines...) Expand all Loading... |
| 113 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) | 112 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) |
| 114 | 113 |
| 115 protected: | 114 protected: |
| 116 SkDrawLooper() {} | 115 SkDrawLooper() {} |
| 117 | 116 |
| 118 private: | 117 private: |
| 119 typedef SkFlattenable INHERITED; | 118 typedef SkFlattenable INHERITED; |
| 120 }; | 119 }; |
| 121 | 120 |
| 122 #endif | 121 #endif |
| OLD | NEW |