253 {
254#if DEBUG_DUMP_VERIFY
255#ifndef SK_DEBUG
257#endif
258 if (SkPathOpsDebug::gDumpOp) {
260 }
261#endif
269 result->setFillType(fillType);
272 }
273 return true;
274 }
277 switch (op) {
279 break;
283 break;
286 work = one;
287 }
288 break;
290 if (!
two.isEmpty()) {
292 }
293 break;
294 default:
296 }
299 }
301 }
308 const SkPath* minuend = &one;
312 swap(minuend, subtrahend);
314 }
315#if DEBUG_SORT
316 SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault;
317#endif
318
321 return false;
322 }
323 const int xorMask =
builder.xorMask();
324 builder.addOperand(*subtrahend);
326 return false;
327 }
328#if DEBUG_DUMP_SEGMENTS
330#endif
331
332 const int xorOpMask =
builder.xorMask();
336 result->setFillType(fillType);
337 return true;
338 }
339
341 do {
345 ;
346 }
while ((current = current->
next()));
347#if DEBUG_VALIDATE
349#endif
351#if DEBUG_COIN
352 globalState.debugAddToGlobalCoinDicts();
353#endif
354 if (!success) {
355 return false;
356 }
357#if DEBUG_ALIGNMENT
359#endif
360
363 result->setFillType(fillType);
365 if (!
bridgeOp(contourList, op, xorMask, xorOpMask, &wrapper)) {
367 return false;
368 }
369 wrapper.assemble();
370#if DEBUG_T_SECT_LOOP_COUNT
371 static SkMutex& debugWorstLoop = *(new SkMutex);
372 {
374 if (!gVerboseFinalize) {
375 gVerboseFinalize = &ReportPathOpsDebugging;
376 }
377 debugWorstState.debugDoYourWorst(&globalState);
378 }
379#endif
380 return true;
381}
static float next(float f)
bool AddIntersectTs(SkOpContour *test, SkOpContour *next, SkOpCoincidence *coincidence)
bool SortContourList(SkOpContourHead **contourList, bool evenOdd, bool oppEvenOdd)
bool HandleCoincidence(SkOpContourHead *contourList, SkOpCoincidence *coincidence)
#define SkDEBUGPARAMS(...)
static const bool gOutInverse[kReverseDifference_SkPathOp+1][2][2]
static bool bridgeOp(SkOpContourHead *contourList, const SkPathOp op, const int xorMask, const int xorOpMask, SkPathWriter *writer)
static const SkPathOp gOpInverse[kReverseDifference_SkPathOp+1][2][2]
@ kReverseDifference_SkPathOp
subtract the first path from the op path
@ kDifference_SkPathOp
subtract the op path from the first path
@ kIntersect_SkPathOp
intersect the two paths
@ kUnion_SkPathOp
union (inclusive-or) the two paths
@ kXOR_SkPathOp
exclusive-or the two paths
bool SK_API Simplify(const SkPath &path, SkPath *result)
void swap(sk_sp< T > &a, sk_sp< T > &b)
void dumpSegments(const char *prefix="seg", SkPathOp op=(SkPathOp) -1) const
bool isInverseFillType() const
void toggleInverseFillType()
bool isRect(SkRect *rect, bool *isClosed=nullptr, SkPathDirection *direction=nullptr) const
bool intersect(const SkRect &r)