whitelist_typefaces.cpp 700 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright 2013 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #include "include/core/SkGraphics.h"
  8. extern bool CheckChecksums();
  9. extern bool GenerateChecksums();
  10. int main(int argc, char** argv) {
  11. if (argc == 2) {
  12. SkAutoGraphics ag; // Enable use of SkRTConfig
  13. if (!strcmp(argv[1], "--check")) {
  14. return (int) !CheckChecksums();
  15. }
  16. if (!strcmp(argv[1], "--generate")) {
  17. if (!GenerateChecksums()) {
  18. return 2;
  19. }
  20. return 0;
  21. }
  22. }
  23. SkDebugf("Usage:\n %s [--check] [--generate]\n\n", argv[0]);
  24. return 3;
  25. }