aboutsummaryrefslogtreecommitdiffhomepage
path: root/fuzz/fuzz.cpp
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-08-02 14:40:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-02 14:40:46 -0700
commit38d909ec2875f79952de08f36adfaac5680d2c53 (patch)
treea11067146b42f3faa8531d6ef912f7246bbde1f2 /fuzz/fuzz.cpp
parentada5a44f3bdac10a8a0c53b34f5add7aea9fdbb0 (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 'fuzz/fuzz.cpp')
-rw-r--r--fuzz/fuzz.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fuzz/fuzz.cpp b/fuzz/fuzz.cpp
index 4ca253343d..d2dc787dbe 100644
--- a/fuzz/fuzz.cpp
+++ b/fuzz/fuzz.cpp
@@ -44,31 +44,31 @@ int main(int argc, char** argv) {
SkCommandLineFlags::Parse(argc, argv);
const char* path = FLAGS_bytes.isEmpty() ? argv[0] : FLAGS_bytes[0];
- SkAutoTUnref<SkData> bytes(SkData::NewFromFileName(path));
+ sk_sp<SkData> bytes(SkData::MakeFromFileName(path));
if (!bytes) {
SkDebugf("Could not read %s\n", path);
return 2;
}
- uint8_t option = calculate_option(bytes);
+ uint8_t option = calculate_option(bytes.get());
if (!FLAGS_type.isEmpty()) {
switch (FLAGS_type[0][0]) {
- case 'a': return fuzz_api(bytes);
+ case 'a': return fuzz_api(bytes.get());
- case 'c': return fuzz_color_deserialize(bytes);
+ case 'c': return fuzz_color_deserialize(bytes.get());
case 'i':
if (FLAGS_type[0][1] == 'c') { //icc
- return fuzz_icc(bytes);
+ return fuzz_icc(bytes.get());
}
// We only allow one degree of freedom to avoid a search space explosion for afl-fuzz.
if (FLAGS_type[0][6] == 's') { // image_scale
- return fuzz_img(bytes, option, 0);
+ return fuzz_img(bytes.get(), option, 0);
}
// image_mode
- return fuzz_img(bytes, 0, option);
- case 's': return fuzz_skp(bytes);
+ return fuzz_img(bytes.get(), 0, option);
+ case 's': return fuzz_skp(bytes.get());
}
}
return printUsage(argv[0]);