Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: src/c/sk_surface.cpp

Issue 1810813003: update callsites for Make image factories (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: start to take advantage of sk_sp drawImage Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « samplecode/SampleTextureDomain.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 //////////////////////////////////////////////////////////////////////////////// ///////////
OLDNEW
« no previous file with comments | « samplecode/SampleTextureDomain.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698