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

Unified Diff: src/c/sk_surface.cpp

Issue 1783063002: Revert of add Make variations to return SkImage by sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/c/sk_surface.cpp
diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp
index 6bd62a9aa9f29f47a04ddc6ea7ce46b8607af330..f7fa30f28a48c4027e86379dc668c97d617ef2fa 100644
--- a/src/c/sk_surface.cpp
+++ b/src/c/sk_surface.cpp
@@ -224,12 +224,12 @@
if (!from_c_info(*cinfo, &info)) {
return NULL;
}
- return (sk_image_t*)SkImage::MakeRasterCopy(SkPixmap(info, pixels, rowBytes)).release();
+ return (sk_image_t*)SkImage::NewRasterCopy(info, pixels, rowBytes);
}
sk_image_t* sk_image_new_from_encoded(const sk_data_t* cdata, const sk_irect_t* subset) {
- return ToImage(SkImage::MakeFromEncoded(sk_ref_sp(AsData(cdata)),
- reinterpret_cast<const SkIRect*>(subset)).release());
+ return ToImage(SkImage::NewFromEncoded(AsData(cdata),
+ reinterpret_cast<const SkIRect*>(subset)));
}
sk_data_t* sk_image_encode(const sk_image_t* cimage) {
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698