diff options
author | reed <reed@google.com> | 2016-03-10 12:45:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-10 12:45:18 -0800 |
commit | bd73ffb83022f1f6b1997e2a91c049949e88a8a2 (patch) | |
tree | 5e716db9736fe7a3d9a4df87cab4bc70938f73a7 /src/c | |
parent | a6b439a0af614e2e79b35ad41df7b72736d5d1b9 (diff) |
add Make variations to return SkImage by sk_sp
some internal call-sites update, but not. Will follow-up in future to complete that.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1778393002
Review URL: https://codereview.chromium.org/1778393002
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/sk_surface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp index f7fa30f28a..6bd62a9aa9 100644 --- a/src/c/sk_surface.cpp +++ b/src/c/sk_surface.cpp @@ -224,12 +224,12 @@ sk_image_t* sk_image_new_raster_copy(const sk_imageinfo_t* cinfo, const void* pi if (!from_c_info(*cinfo, &info)) { return NULL; } - return (sk_image_t*)SkImage::NewRasterCopy(info, pixels, rowBytes); + return (sk_image_t*)SkImage::MakeRasterCopy(SkPixmap(info, pixels, rowBytes)).release(); } sk_image_t* sk_image_new_from_encoded(const sk_data_t* cdata, const sk_irect_t* subset) { - return ToImage(SkImage::NewFromEncoded(AsData(cdata), - reinterpret_cast<const SkIRect*>(subset))); + return ToImage(SkImage::MakeFromEncoded(sk_ref_sp(AsData(cdata)), + reinterpret_cast<const SkIRect*>(subset)).release()); } sk_data_t* sk_image_encode(const sk_image_t* cimage) { |