OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkLayerDrawLooper_DEFINED | 8 #ifndef SkLayerDrawLooper_DEFINED |
9 #define SkLayerDrawLooper_DEFINED | 9 #define SkLayerDrawLooper_DEFINED |
10 | 10 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 */ | 135 */ |
136 void addLayer() { this->addLayer(0, 0); } | 136 void addLayer() { this->addLayer(0, 0); } |
137 | 137 |
138 /// Similar to addLayer, but adds a layer to the top. | 138 /// Similar to addLayer, but adds a layer to the top. |
139 SkPaint* addLayerOnTop(const LayerInfo&); | 139 SkPaint* addLayerOnTop(const LayerInfo&); |
140 | 140 |
141 /** | 141 /** |
142 * Pass list of layers on to newly built looper and return it. This wil
l | 142 * Pass list of layers on to newly built looper and return it. This wil
l |
143 * also reset the builder, so it can be used to build another looper. | 143 * also reset the builder, so it can be used to build another looper. |
144 */ | 144 */ |
145 SkLayerDrawLooper* detachLooper(); | 145 sk_sp<SkDrawLooper> detach(); |
| 146 #ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR |
| 147 SkLayerDrawLooper* detachLooper() { |
| 148 return (SkLayerDrawLooper*)this->detach().release(); |
| 149 } |
| 150 #endif |
146 | 151 |
147 private: | 152 private: |
148 Rec* fRecs; | 153 Rec* fRecs; |
149 Rec* fTopRec; | 154 Rec* fTopRec; |
150 int fCount; | 155 int fCount; |
151 }; | 156 }; |
152 }; | 157 }; |
153 | 158 |
154 #endif | 159 #endif |
OLD | NEW |