diff options
author | bungeman <bungeman@google.com> | 2016-08-03 13:32:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-03 13:32:32 -0700 |
commit | ffae30db4ade45b469ac3432ec373b6f6daee6e7 (patch) | |
tree | acef6794a40b4525c09301cdf07590dcb4358d5b /gm | |
parent | d1ec89b1aca8f37a460a425259a23275f4d9a81d (diff) |
Convert SkAutoTUnref<SkData> to sk_sp<SkData>.
With the move from SkData::NewXXX to SkData::MakeXXX most
SkAutoTUnref<SkData> were changed to sk_sp<SkData>. However,
there are still a few SkAutoTUnref<SkData> around, so clean
them up.
Review-Url: https://codereview.chromium.org/2212493002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/image.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gm/image.cpp b/gm/image.cpp index b57ec3a687..a67ed202db 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&); |