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

Unified Diff: dm/DM.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. 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
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 7fe6efaf89e0e81dc9e6f4ca14e7a55a8dbb2ef6..4387fde1e179ccf54364cae13638c595953f711f 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -304,7 +304,7 @@ static SkTHashSet<SkString> gUninterestingHashes;
static void gather_uninteresting_hashes() {
if (!FLAGS_uninterestingHashesFile.isEmpty()) {
- SkAutoTUnref<SkData> data(SkData::NewFromFileName(FLAGS_uninterestingHashesFile[0]));
+ sk_sp<SkData> data(SkData::MakeFromFileName(FLAGS_uninterestingHashesFile[0]));
if (!data) {
info("WARNING: unable to read uninteresting hashes from %s\n",
FLAGS_uninterestingHashesFile[0]);
@@ -489,12 +489,12 @@ static void push_image_gen_src(Path path, ImageGenSrc::Mode mode, SkAlphaType al
}
static void push_codec_srcs(Path path) {
- SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(path.c_str()));
+ sk_sp<SkData> encoded(SkData::MakeFromFileName(path.c_str()));
if (!encoded) {
info("Couldn't read %s.", path.c_str());
return;
}
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded.get()));
if (nullptr == codec.get()) {
info("Couldn't create codec for %s.", path.c_str());
return;
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMJsonWriter.cpp » ('j') | include/core/SkData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698