diff options
author | bungeman <bungeman@google.com> | 2016-08-02 14:40:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-02 14:40:46 -0700 |
commit | 38d909ec2875f79952de08f36adfaac5680d2c53 (patch) | |
tree | a11067146b42f3faa8531d6ef912f7246bbde1f2 /tests/PDFJpegEmbedTest.cpp | |
parent | ada5a44f3bdac10a8a0c53b34f5add7aea9fdbb0 (diff) |
Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.
This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004
Review-Url: https://codereview.chromium.org/2206633004
Diffstat (limited to 'tests/PDFJpegEmbedTest.cpp')
-rw-r--r-- | tests/PDFJpegEmbedTest.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/PDFJpegEmbedTest.cpp b/tests/PDFJpegEmbedTest.cpp index 5ef4a2dbfc..6b10f04932 100644 --- a/tests/PDFJpegEmbedTest.cpp +++ b/tests/PDFJpegEmbedTest.cpp @@ -38,10 +38,10 @@ static bool is_subset_of(SkData* smaller, SkData* larger) { } -static SkData* load_resource( +static sk_sp<SkData> load_resource( skiatest::Reporter* r, const char* test, const char* filename) { SkString path(GetResourcePath(filename)); - SkData* data = SkData::NewFromFileName(path.c_str()); + sk_sp<SkData> data(SkData::MakeFromFileName(path.c_str())); if (!data) { INFOF(r, "\n%s: Resource '%s' can not be found.\n", test, filename); @@ -124,13 +124,12 @@ DEF_TEST(JpegIdentification, r) { {"mandrill_512_q075.jpg", true, SkJFIFInfo::kYCbCr}, {"randPixels.jpg", true, SkJFIFInfo::kYCbCr}}; for (size_t i = 0; i < SK_ARRAY_COUNT(kTests); ++i) { - SkAutoTUnref<SkData> data( - load_resource(r, "JpegIdentification", kTests[i].path)); + sk_sp<SkData> data(load_resource(r, "JpegIdentification", kTests[i].path)); if (!data) { continue; } SkJFIFInfo info; - bool isJfif = SkIsJFIF(data, &info); + bool isJfif = SkIsJFIF(data.get(), &info); if (isJfif != kTests[i].isJfif) { ERRORF(r, "%s failed isJfif test", kTests[i].path); continue; |