xref: /aosp_15_r20/external/skia/experimental/filterfuzz/filterfuzz.cpp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 // Copyright 2021 Google LLC.
2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3 
4 
5 #include "include/core/SkGraphics.h"
6 #include "tools/flags/CommandLineFlags.h"
7 
8 static DEFINE_int_2(option, o, 0, "An option");
9 
10 static void exitf(const char* format, ...) SK_PRINTF_LIKE(1, 2);
11 
exitf(const char * format,...)12 static void exitf(const char* format, ...) {
13     va_list args;
14     va_start(args, format);
15     vfprintf(stderr, format, args);
16     va_end(args);
17 
18     exit(1);
19 }
20 
main(int argc,char ** argv)21 int main(int argc, char** argv) {
22     CommandLineFlags::Parse(argc, argv);
23 
24     if (FLAGS_option) {
25         exitf("Invalid option\n");
26     }
27 
28     SkGraphics::Init();
29 
30     return 0;
31 }
32