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

Unified Diff: gm/image.cpp

Issue 2212493002: Convert SkAutoTUnref<SkData> to sk_sp<SkData>. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « fuzz/Fuzz.h ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index b57ec3a687e4b93c75ef3c27b2b97220945374e1..a67ed202dbea196f157d3d55e6877cc6f1de2c9c 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -349,14 +349,14 @@ static SkImageGenerator* gen_picture(const SkImageInfo& info) {
static SkImageGenerator* gen_png(const SkImageInfo& info) {
sk_sp<SkImage> image(make_raster(info, nullptr, draw_opaque_contents));
- SkAutoTUnref<SkData> data(image->encode(SkImageEncoder::kPNG_Type, 100));
- return SkImageGenerator::NewFromEncoded(data);
+ sk_sp<SkData> data(image->encode(SkImageEncoder::kPNG_Type, 100));
+ return SkImageGenerator::NewFromEncoded(data.get());
}
static SkImageGenerator* gen_jpg(const SkImageInfo& info) {
sk_sp<SkImage> image(make_raster(info, nullptr, draw_opaque_contents));
- SkAutoTUnref<SkData> data(image->encode(SkImageEncoder::kJPEG_Type, 100));
- return SkImageGenerator::NewFromEncoded(data);
+ sk_sp<SkData> data(image->encode(SkImageEncoder::kJPEG_Type, 100));
+ return SkImageGenerator::NewFromEncoded(data.get());
}
typedef SkImageGenerator* (*GeneratorMakerProc)(const SkImageInfo&);
« no previous file with comments | « fuzz/Fuzz.h ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698