| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 * canvas and/or paint). When false is finally returned, drawing for th
e object | 49 * canvas and/or paint). When false is finally returned, drawing for th
e object |
| 50 * stops. | 50 * stops. |
| 51 * | 51 * |
| 52 * On each call, the paint will be in its original state, but the | 52 * On each call, the paint will be in its original state, but the |
| 53 * canvas will be as it was following the previous call to next() or | 53 * canvas will be as it was following the previous call to next() or |
| 54 * createContext(). | 54 * createContext(). |
| 55 * | 55 * |
| 56 * The implementation must ensure that, when next() finally returns | 56 * The implementation must ensure that, when next() finally returns |
| 57 * false, the canvas has been restored to the state it was | 57 * false, the canvas has been restored to the state it was |
| 58 * initially, before createContext() was first called. | 58 * initially, before createContext() was first called. |
| 59 * |
| 60 * It is an error to call SkCanvas::restore() or SkCanvas::restoreToCou
nt on the canvas |
| 61 * from this function, unless corresponding SkCanvas::save() or SkCanva
s::saveLayer() has |
| 62 * been called. The corresponding save call must be made from this func
tion, but it may be |
| 63 * made from earlier invocation. |
| 59 */ | 64 */ |
| 60 virtual bool next(SkCanvas* canvas, SkPaint* paint) = 0; | 65 virtual bool next(SkCanvas* canvas, SkPaint* paint) = 0; |
| 61 }; | 66 }; |
| 62 | 67 |
| 63 /** | 68 /** |
| 64 * Called right before something is being drawn. Returns a Context | 69 * Called right before something is being drawn. Returns a Context |
| 65 * whose next() method should be called until it returns false. | 70 * whose next() method should be called until it returns false. |
| 66 * The caller has to ensure that the storage pointer provides enough | 71 * The caller has to ensure that the storage pointer provides enough |
| 67 * memory for the Context. The required size can be queried by calling | 72 * memory for the Context. The required size can be queried by calling |
| 68 * contextSize(). It is also the caller's responsibility to destroy the | 73 * contextSize(). It is also the caller's responsibility to destroy the |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) | 117 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) |
| 113 | 118 |
| 114 protected: | 119 protected: |
| 115 SkDrawLooper() {} | 120 SkDrawLooper() {} |
| 116 | 121 |
| 117 private: | 122 private: |
| 118 typedef SkFlattenable INHERITED; | 123 typedef SkFlattenable INHERITED; |
| 119 }; | 124 }; |
| 120 | 125 |
| 121 #endif | 126 #endif |
| OLD | NEW |