| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 SkSafeUnref((SkSurface*)csurf); | 456 SkSafeUnref((SkSurface*)csurf); |
| 457 } | 457 } |
| 458 | 458 |
| 459 sk_canvas_t* sk_surface_get_canvas(sk_surface_t* csurf) { | 459 sk_canvas_t* sk_surface_get_canvas(sk_surface_t* csurf) { |
| 460 SkSurface* surf = (SkSurface*)csurf; | 460 SkSurface* surf = (SkSurface*)csurf; |
| 461 return (sk_canvas_t*)surf->getCanvas(); | 461 return (sk_canvas_t*)surf->getCanvas(); |
| 462 } | 462 } |
| 463 | 463 |
| 464 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t* csurf) { | 464 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t* csurf) { |
| 465 SkSurface* surf = (SkSurface*)csurf; | 465 SkSurface* surf = (SkSurface*)csurf; |
| 466 return (sk_image_t*)surf->newImageSnapshot(); | 466 return (sk_image_t*)surf->makeImageSnapshot().release(); |
| 467 } | 467 } |
| 468 | 468 |
| 469 ////////////////////////////////////////////////////////////////////////////////
/////////// | 469 ////////////////////////////////////////////////////////////////////////////////
/////////// |
| 470 | 470 |
| 471 sk_picture_recorder_t* sk_picture_recorder_new() { | 471 sk_picture_recorder_t* sk_picture_recorder_new() { |
| 472 return ToPictureRecorder(new SkPictureRecorder); | 472 return ToPictureRecorder(new SkPictureRecorder); |
| 473 } | 473 } |
| 474 | 474 |
| 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); |
| (...skipping 221 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 |