198 {
199 static const int gNumCases = 8;
200 static const SkRect gAnswerRectsBW[gNumCases] = {
201
202 { 40, 40, 50, 50 },
203 { 10, 10, 50, 50 },
204
205
206 { 40, 40, 80, 80 },
207 { 0, 0, 100, 100 },
208
209
210 { 10, 10, 50, 50 },
211 { 40, 40, 50, 50 },
212
213
214 { 0, 0, 100, 100 },
215 { 40, 40, 80, 80 },
216 };
217
221 };
222
224
227
231
233
236
239 bool isIntersectionOfRects = false;
240
241 int testCase = 0;
243 for (int invBits = 0; invBits < numBitTests; ++invBits) {
244 for (size_t op = 0; op < std::size(gOps); ++op) {
245
247 bool doInvA =
SkToBool(invBits & 1);
248 bool doInvB =
SkToBool(invBits & 2);
249
254
255 switch (primType) {
258 SkDEBUGFAIL(
"Don't call this with kEmpty or kShader.");
259 break;
263 break;
267 break;
271 break;
272 }
273
276
278 &isIntersectionOfRects);
279
283 } else {
285 }
286
289 ++testCase;
290
292 }
293 }
294}
#define SkDEBUGFAIL(message)
static constexpr bool SkToBool(const T &x)
void clipRect(const SkRect &, const SkMatrix &matrix, SkClipOp, bool doAA)
void clipRRect(const SkRRect &, const SkMatrix &matrix, SkClipOp, bool doAA)
void getConservativeBounds(int offsetX, int offsetY, int maxWidth, int maxHeight, SkRect *devBounds, bool *isIntersectionOfRects=nullptr) const
uint32_t getTopmostGenID() const
static const uint32_t kWideOpenGenID
void clipPath(const SkPath &, const SkMatrix &matrix, SkClipOp, bool doAA)
void setFillType(SkPathFillType ft)
SkPath & addRoundRect(const SkRect &rect, SkScalar rx, SkScalar ry, SkPathDirection dir=SkPathDirection::kCW)
void setOval(const SkRect &oval)
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)