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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkImage.h" | 10 #include "SkImage.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 void sk_picture_recorder_delete(sk_picture_recorder_t* crec) { | 475 void sk_picture_recorder_delete(sk_picture_recorder_t* crec) { |
476 delete AsPictureRecorder(crec); | 476 delete AsPictureRecorder(crec); |
477 } | 477 } |
478 | 478 |
479 sk_canvas_t* sk_picture_recorder_begin_recording(sk_picture_recorder_t* crec, | 479 sk_canvas_t* sk_picture_recorder_begin_recording(sk_picture_recorder_t* crec, |
480 const sk_rect_t* cbounds) { | 480 const sk_rect_t* cbounds) { |
481 return ToCanvas(AsPictureRecorder(crec)->beginRecording(AsRect(*cbounds))); | 481 return ToCanvas(AsPictureRecorder(crec)->beginRecording(AsRect(*cbounds))); |
482 } | 482 } |
483 | 483 |
484 sk_picture_t* sk_picture_recorder_end_recording(sk_picture_recorder_t* crec) { | 484 sk_picture_t* sk_picture_recorder_end_recording(sk_picture_recorder_t* crec) { |
485 return ToPicture(AsPictureRecorder(crec)->endRecording()); | 485 return ToPicture(AsPictureRecorder(crec)->finishRecordingAsPicture().release
()); |
486 } | 486 } |
487 | 487 |
488 void sk_picture_ref(sk_picture_t* cpic) { | 488 void sk_picture_ref(sk_picture_t* cpic) { |
489 SkSafeRef(AsPicture(cpic)); | 489 SkSafeRef(AsPicture(cpic)); |
490 } | 490 } |
491 | 491 |
492 void sk_picture_unref(sk_picture_t* cpic) { | 492 void sk_picture_unref(sk_picture_t* cpic) { |
493 SkSafeUnref(AsPicture(cpic)); | 493 SkSafeUnref(AsPicture(cpic)); |
494 } | 494 } |
495 | 495 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 | 698 |
699 size_t sk_data_get_size(const sk_data_t* cdata) { | 699 size_t sk_data_get_size(const sk_data_t* cdata) { |
700 return AsData(cdata)->size(); | 700 return AsData(cdata)->size(); |
701 } | 701 } |
702 | 702 |
703 const void* sk_data_get_data(const sk_data_t* cdata) { | 703 const void* sk_data_get_data(const sk_data_t* cdata) { |
704 return AsData(cdata)->data(); | 704 return AsData(cdata)->data(); |
705 } | 705 } |
706 | 706 |
707 ////////////////////////////////////////////////////////////////////////////////
/////////// | 707 ////////////////////////////////////////////////////////////////////////////////
/////////// |
OLD | NEW |