OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #include "SkRecorder.h" | 8 #include "SkRecorder.h" |
9 #include "SkPicture.h" | 9 #include "SkPicture.h" |
10 | 10 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 this->copy(vertices, vertexCount), | 188 this->copy(vertices, vertexCount), |
189 texs ? this->copy(texs, vertexCount) : NULL, | 189 texs ? this->copy(texs, vertexCount) : NULL, |
190 colors ? this->copy(colors, vertexCount) : NULL, | 190 colors ? this->copy(colors, vertexCount) : NULL, |
191 xmode, | 191 xmode, |
192 this->copy(indices, indexCount), | 192 this->copy(indices, indexCount), |
193 indexCount, | 193 indexCount, |
194 delay_copy(paint)); | 194 delay_copy(paint)); |
195 } | 195 } |
196 | 196 |
197 void SkRecorder::willSave(SkCanvas::SaveFlags flags) { | 197 void SkRecorder::willSave(SkCanvas::SaveFlags flags) { |
198 APPEND(Save, flags); | 198 APPEND(Save |
| 199 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 200 , flags |
| 201 #endif |
| 202 ); |
199 INHERITED(willSave, flags); | 203 INHERITED(willSave, flags); |
200 } | 204 } |
201 | 205 |
202 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds, | 206 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds, |
203 const SkPaint* paint, | 207 const SkPaint* paint, |
204 SkCanvas::SaveFlags flags)
{ | 208 SkCanvas::SaveFlags flags)
{ |
205 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags); | 209 APPEND(SaveLayer, this->copy(bounds), this->copy(paint) |
| 210 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 211 , flags |
| 212 #endif |
| 213 ); |
206 INHERITED(willSaveLayer, bounds, paint, flags); | 214 INHERITED(willSaveLayer, bounds, paint, flags); |
207 return SkCanvas::kNoLayer_SaveLayerStrategy; | 215 return SkCanvas::kNoLayer_SaveLayerStrategy; |
208 } | 216 } |
209 | 217 |
210 void SkRecorder::willRestore() { | 218 void SkRecorder::willRestore() { |
211 APPEND(Restore); | 219 APPEND(Restore); |
212 INHERITED(willRestore); | 220 INHERITED(willRestore); |
213 } | 221 } |
214 | 222 |
215 void SkRecorder::onPushCull(const SkRect& rect) { | 223 void SkRecorder::onPushCull(const SkRect& rect) { |
(...skipping 26 matching lines...) Expand all Loading... |
242 | 250 |
243 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { | 251 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { |
244 APPEND(ClipPath, delay_copy(path), op, edgeStyle == kSoft_ClipEdgeStyle); | 252 APPEND(ClipPath, delay_copy(path), op, edgeStyle == kSoft_ClipEdgeStyle); |
245 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is
InverseFillType()); | 253 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is
InverseFillType()); |
246 } | 254 } |
247 | 255 |
248 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 256 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
249 APPEND(ClipRegion, delay_copy(deviceRgn), op); | 257 APPEND(ClipRegion, delay_copy(deviceRgn), op); |
250 INHERITED(onClipRegion, deviceRgn, op); | 258 INHERITED(onClipRegion, deviceRgn, op); |
251 } | 259 } |
OLD | NEW |