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

Unified Diff: tools/get_images_from_skps.cpp

Issue 2339273002: SkFontData to use smart pointers. (Closed)
Patch Set: SkStream::MakeFromFile as well. Created 4 years, 3 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
Index: tools/get_images_from_skps.cpp
diff --git a/tools/get_images_from_skps.cpp b/tools/get_images_from_skps.cpp
index 1ec70b3531f7dcd345d6c882648b92e340bccaeb..e38a245915b4c5335a0278c9de387e9e7330d2c4 100644
--- a/tools/get_images_from_skps.cpp
+++ b/tools/get_images_from_skps.cpp
@@ -128,9 +128,9 @@ int main(int argc, char** argv) {
SkOSFile::Iter iter(inputs, "skp");
for (SkString file; iter.next(&file); ) {
- SkAutoTDelete<SkStream> stream =
- SkStream::NewFromFile(SkOSPath::Join(inputs, file.c_str()).c_str());
- sk_sp<SkPicture> picture(SkPicture::MakeFromStream(stream));
+ std::unique_ptr<SkStream> stream =
+ SkStream::MakeFromFile(SkOSPath::Join(inputs, file.c_str()).c_str());
+ sk_sp<SkPicture> picture(SkPicture::MakeFromStream(stream.get()));
SkDynamicMemoryWStream scratch;
Sniffer sniff(file.c_str());

Powered by Google App Engine
This is Rietveld 408576698