Index: src/c/sk_surface.cpp |
diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp |
index f7fa30f28a48c4027e86379dc668c97d617ef2fa..6bd62a9aa9f29f47a04ddc6ea7ce46b8607af330 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) { |