FuzzRegionOp.cpp 488 B

123456789101112131415161718
  1. /*
  2. * Copyright 2018 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 "fuzz/Fuzz.h"
  8. #include "fuzz/FuzzCommon.h"
  9. DEF_FUZZ(RegionOp, fuzz) { // `fuzz -t api -n RegionOp`
  10. SkRegion regionA, regionB, regionC;
  11. FuzzNiceRegion(fuzz, &regionA, 2000);
  12. FuzzNiceRegion(fuzz, &regionB, 2000);
  13. SkRegion::Op op;
  14. fuzz->nextRange(&op, 0, SkRegion::kLastOp);
  15. regionC.op(regionA, regionB, op);
  16. }