skia2/tests/PathOpsInverseTest.cpp
Mike Reed 4241f5e0a8 Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 19:13:44 +00:00

35 lines
1.4 KiB
C++

/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "tests/PathOpsExtendedTest.h"
DEF_TEST(PathOpsInverse, reporter) {
SkPath one, two;
int testCount = 0;
for (int op = kDifference_SkPathOp; op <= kReverseDifference_SkPathOp; ++op) {
for (int oneFill = SkPath::kWinding_FillType; oneFill <= SkPath::kInverseEvenOdd_FillType;
++oneFill) {
for (int oneDir = SkPath::kCW_Direction; oneDir != SkPath::kCCW_Direction; ++oneDir) {
one.reset();
one.setFillType((SkPath::FillType) oneFill);
one.addRect(0, 0, 6, 6, (SkPath::Direction) oneDir);
for (int twoFill = SkPath::kWinding_FillType;
twoFill <= SkPath::kInverseEvenOdd_FillType; ++twoFill) {
for (int twoDir = SkPath::kCW_Direction; twoDir != SkPath::kCCW_Direction;
++twoDir) {
two.reset();
two.setFillType((SkPath::FillType) twoFill);
two.addRect(3, 3, 9, 9, (SkPath::Direction) twoDir);
SkString testName;
testName.printf("inverseTest%d", ++testCount);
testPathOp(reporter, one, two, (SkPathOp) op, testName.c_str());
}
}
}
}
}
}