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 "SkPatchUtils.h" | 9 #include "SkPatchUtils.h" |
10 #include "SkPicture.h" | 10 #include "SkPicture.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 const unsigned points = paint.countText(text, byteLength); | 220 const unsigned points = paint.countText(text, byteLength); |
221 APPEND(DrawPosTextH, | 221 APPEND(DrawPosTextH, |
222 delay_copy(paint), | 222 delay_copy(paint), |
223 this->copy((const char*)text, byteLength), | 223 this->copy((const char*)text, byteLength), |
224 SkToUInt(byteLength), | 224 SkToUInt(byteLength), |
225 constY, | 225 constY, |
226 this->copy(xpos, points)); | 226 this->copy(xpos, points)); |
227 } | 227 } |
228 | 228 |
229 void SkRecorder::onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 229 void SkRecorder::onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
230 const SkMatrix* matrix, const SkPaint& paint)
{ | 230 const SkMatrix* matrix, |
| 231 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM const S
kPaint& paint) { |
| 232 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_DEFAULT_METHOD |
231 APPEND(DrawTextOnPath, | 233 APPEND(DrawTextOnPath, |
232 delay_copy(paint), | 234 delay_copy(paint), |
233 this->copy((const char*)text, byteLength), | 235 this->copy((const char*)text, byteLength), |
234 byteLength, | 236 byteLength, |
235 delay_copy(path), | 237 delay_copy(path), |
| 238 method, |
236 matrix ? *matrix : SkMatrix::I()); | 239 matrix ? *matrix : SkMatrix::I()); |
237 } | 240 } |
238 | 241 |
239 void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 242 void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
240 const SkPaint& paint) { | 243 const SkPaint& paint) { |
241 APPEND(DrawTextBlob, delay_copy(paint), blob, x, y); | 244 APPEND(DrawTextBlob, delay_copy(paint), blob, x, y); |
242 } | 245 } |
243 | 246 |
244 void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con
st SkPaint* paint) { | 247 void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con
st SkPaint* paint) { |
245 APPEND(DrawPicture, this->copy(paint), pic, matrix ? *matrix : SkMatrix::I()
); | 248 APPEND(DrawPicture, this->copy(paint), pic, matrix ? *matrix : SkMatrix::I()
); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 } | 329 } |
327 | 330 |
328 void SkRecorder::addComment(const char* key, const char* value) { | 331 void SkRecorder::addComment(const char* key, const char* value) { |
329 APPEND(AddComment, this->copy(key), this->copy(value)); | 332 APPEND(AddComment, this->copy(key), this->copy(value)); |
330 } | 333 } |
331 | 334 |
332 void SkRecorder::endCommentGroup() { | 335 void SkRecorder::endCommentGroup() { |
333 APPEND(EndCommentGroup); | 336 APPEND(EndCommentGroup); |
334 } | 337 } |
335 | 338 |
OLD | NEW |