33 : fDoSimpleClipFirst(doSimpleClipFirst) {
40 str.
printf(
"complexclip3_%s", fDoSimpleClipFirst ?
"simple" :
"complex");
49 SkRect r1 = { 10, 20, 70, 80 };
51 .
arcTo(r1, 30, 300,
false)
55 SkPath* firstClip = &clipSimple;
56 SkPath* secondClip = &clipComplex;
57 if (!fDoSimpleClipFirst) {
58 std::swap(firstClip, secondClip);
62 paint.setAntiAlias(
true);
81 for (
int invA = 0; invA < 2; ++invA) {
82 for (
int aaBits = 0; aaBits < 4; ++aaBits) {
84 for (
size_t op = 0; op < std::size(gOps); ++op) {
85 for (
int invB = 0; invB < 2; ++invB) {
97 canvas->
clipPath(*secondClip, gOps[op].fOp, doAAB);
100 SkRect r = { 0, 0, 100, 100 };
108 str.
printf(
"%s%s %s %s%s", doAAA ?
"A" :
"B",
129 bool fDoSimpleClipFirst;
131 using INHERITED =
GM;
137DEF_GM(
return new ComplexClip3GM(
true); )
139DEF_GM(
return new ComplexClip3GM(
false); )
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorBLACK
static constexpr bool SkToBool(const T &x)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void setColor(SkColor color)
void setAntiAlias(bool aa)
SkPathBuilder & arcTo(const SkRect &oval, SkScalar startAngleDeg, SkScalar sweepAngleDeg, bool forceMoveTo)
SkPathBuilder & moveTo(SkPoint pt)
void setFillType(SkPathFillType ft)
static SkPath Circle(SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
ComplexClip3GM(bool doSimpleClipFirst)
SkString getName() const override
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
constexpr SkColor gPathColor
static constexpr SkISize Make(int32_t w, int32_t h)