diff options
102 files changed, 20134 insertions, 20124 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index f9e5fd3d21..a18bb5029d 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -107,7 +107,7 @@ bool BRDSrc::veto(SinkFlags flags) const { static SkBitmapRegionDecoder* create_brd(Path path) { sk_sp<SkData> encoded(SkData::MakeFromFileName(path.c_str())); if (!encoded) { - return NULL; + return nullptr; } return SkBitmapRegionDecoder::Create(encoded, SkBitmapRegionDecoder::kAndroidCodec_Strategy); } diff --git a/fuzz/fuzz.cpp b/fuzz/fuzz.cpp index bb2b1c803e..d0f31506e9 100644 --- a/fuzz/fuzz.cpp +++ b/fuzz/fuzz.cpp @@ -513,7 +513,7 @@ static void fuzz_filter_fuzz(sk_sp<SkData> bytes) { bytes->data(), bytes->size()); // Adding some info, but the test passed if we got here without any trouble - if (flattenable != NULL) { + if (flattenable != nullptr) { SkDebugf("Valid stream detected.\n"); // Let's see if using the filters can cause any trouble... SkPaint paint; diff --git a/gm/colorfilterimagefilter.cpp b/gm/colorfilterimagefilter.cpp index 73b9f20d2b..7ca2426a7d 100644 --- a/gm/colorfilterimagefilter.cpp +++ b/gm/colorfilterimagefilter.cpp @@ -180,7 +180,7 @@ DEF_SIMPLE_GM(colorfilterimagefilter_layer, canvas, 32, 32) { sk_sp<SkColorFilter> cf(SkColorFilter::MakeMatrixFilterRowMajor255(cm.fMat)); SkPaint p; p.setImageFilter(SkColorFilterImageFilter::Make(std::move(cf), nullptr)); - canvas->saveLayer(NULL, &p); + canvas->saveLayer(nullptr, &p); canvas->clear(SK_ColorRED); } diff --git a/gm/convexpolyclip.cpp b/gm/convexpolyclip.cpp index fb7c9d4fab..2de071ff69 100644 --- a/gm/convexpolyclip.cpp +++ b/gm/convexpolyclip.cpp @@ -59,7 +59,7 @@ static SkBitmap make_bmp(int w, int h) { paint.setAntiAlias(true); sk_tool_utils::set_portable_typeface(&paint); paint.setTextSize(wScalar / 2.2f); - paint.setShader(0); + paint.setShader(nullptr); paint.setColor(sk_tool_utils::color_to_565(SK_ColorLTGRAY)); constexpr char kTxt[] = "Skia"; SkPoint texPos = { wScalar / 17, hScalar / 2 + paint.getTextSize() / 2.5f }; diff --git a/gm/gamma.cpp b/gm/gamma.cpp index 818895792a..afb1c2b04b 100644 --- a/gm/gamma.cpp +++ b/gm/gamma.cpp @@ -127,11 +127,11 @@ DEF_SIMPLE_GM(gamma, canvas, 850, 200) { // sRGB sources decoded to linear before computing mipmaps? p.setShader(SkShader::MakeBitmapShader(mipmapBmp, rpt, rpt, &scaleMatrix)); p.setFilterQuality(SkFilterQuality::kMedium_SkFilterQuality); - nextRect("MipMaps", 0); + nextRect("MipMaps", nullptr); // 50% grey via paint color. Paint color (SkColor) is specified to be sRGB! p.setColor(0xffbcbcbc); - nextRect("Color", 0); + nextRect("Color", nullptr); { // Black -> White gradient, scaled to sample just the middle. diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index f880883cd4..3304f3c3ec 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -393,7 +393,7 @@ public: it has non-null pixels). */ bool readyToDraw() const { - return this->getPixels() != NULL; + return this->getPixels() != nullptr; } /** Returns a non-zero, unique value corresponding to the pixels in our @@ -564,12 +564,12 @@ public: #endif bool extractAlpha(SkBitmap* dst) const { - return this->extractAlpha(dst, NULL, NULL, NULL); + return this->extractAlpha(dst, nullptr, nullptr, nullptr); } bool extractAlpha(SkBitmap* dst, const SkPaint* paint, SkIPoint* offset) const { - return this->extractAlpha(dst, paint, NULL, offset); + return this->extractAlpha(dst, paint, nullptr, offset); } /** Set dst to contain alpha layer of this bitmap. If destination bitmap diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 5881808520..e856eebcf4 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -96,7 +96,7 @@ public: * by any device/pixels. Typically this use used by subclasses who handle * the draw calls in some other way. */ - SkCanvas(int width, int height, const SkSurfaceProps* props = NULL); + SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr); /** Construct a canvas with the specified device to draw into. @@ -193,7 +193,7 @@ public: * * On failure, returns NULL and the info, rowBytes, and origin parameters are ignored. */ - void* accessTopLayerPixels(SkImageInfo* info, size_t* rowBytes, SkIPoint* origin = NULL); + void* accessTopLayerPixels(SkImageInfo* info, size_t* rowBytes, SkIPoint* origin = nullptr); SkRasterHandleAllocator::Handle accessTopRasterHandle() const; @@ -733,9 +733,10 @@ public: @param top The position of the top side of the image being drawn @param paint The paint used to draw the image, or NULL */ - void drawImage(const SkImage* image, SkScalar left, SkScalar top, const SkPaint* paint = NULL); + void drawImage(const SkImage* image, SkScalar left, SkScalar top, + const SkPaint* paint = nullptr); void drawImage(const sk_sp<SkImage>& image, SkScalar left, SkScalar top, - const SkPaint* paint = NULL) { + const SkPaint* paint = nullptr) { this->drawImage(image.get(), left, top, paint); } @@ -843,7 +844,7 @@ public: @param paint The paint used to draw the bitmap, or NULL */ void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, - const SkPaint* paint = NULL); + const SkPaint* paint = nullptr); /** Draw the specified bitmap, scaling and translating so that it fills the specified * dst rect. If the src rect is non-null, only that subset of the bitmap is transformed @@ -881,7 +882,7 @@ public: * - The sides (along the shrink axis) and center are not drawn */ void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst, - const SkPaint* paint = NULL); + const SkPaint* paint = nullptr); /** * Specifies coordinates to divide a bitmap into (xCount*yCount) rects. @@ -1056,7 +1057,7 @@ public: canvas. */ void drawPicture(const SkPicture* picture) { - this->drawPicture(picture, NULL, NULL); + this->drawPicture(picture, nullptr, nullptr); } void drawPicture(const sk_sp<SkPicture>& picture) { this->drawPicture(picture.get()); @@ -1153,7 +1154,7 @@ public: * If the intent is to force the contents of the drawable into this canvas immediately, * then drawable->draw(canvas) may be called. */ - void drawDrawable(SkDrawable* drawable, const SkMatrix* matrix = NULL); + void drawDrawable(SkDrawable* drawable, const SkMatrix* matrix = nullptr); void drawDrawable(SkDrawable* drawable, SkScalar x, SkScalar y); /** @@ -1356,7 +1357,7 @@ protected: // If non-NULL, The imageFilter parameter will be used to expand the clip // and offscreen bounds for any margin required by the filter DAG. bool clipRectBounds(const SkRect* bounds, SaveLayerFlags flags, SkIRect* intersection, - const SkImageFilter* imageFilter = NULL); + const SkImageFilter* imageFilter = nullptr); private: /** After calling saveLayer(), there can be any number of devices that make @@ -1583,7 +1584,7 @@ public: void restore() { if (fCanvas) { fCanvas->restoreToCount(fSaveCount); - fCanvas = NULL; + fCanvas = nullptr; } } diff --git a/include/core/SkDataTable.h b/include/core/SkDataTable.h index f8aba9a559..a46f74efba 100644 --- a/include/core/SkDataTable.h +++ b/include/core/SkDataTable.h @@ -42,10 +42,10 @@ public: * @param size If non-null, this returns the byte size of this entry. This * will be the same value that atSize(index) would return. */ - const void* at(int index, size_t* size = NULL) const; + const void* at(int index, size_t* size = nullptr) const; template <typename T> - const T* atT(int index, size_t* size = NULL) const { + const T* atT(int index, size_t* size = nullptr) const { return reinterpret_cast<const T*>(this->at(index, size)); } diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h index 0d9c23b8bf..ac08224b46 100644 --- a/include/core/SkDocument.h +++ b/include/core/SkDocument.h @@ -178,7 +178,7 @@ public: * scope when endPage() or close() is called, or the document is deleted. */ SkCanvas* beginPage(SkScalar width, SkScalar height, - const SkRect* content = NULL); + const SkRect* content = nullptr); /** * Call endPage() when the content for the current page has been drawn diff --git a/include/core/SkDrawable.h b/include/core/SkDrawable.h index c5053a847d..f466d0a59c 100644 --- a/include/core/SkDrawable.h +++ b/include/core/SkDrawable.h @@ -32,7 +32,7 @@ public: * (i.e. the saveLevel() on the canvas will match what it was when draw() was called, * and the current matrix and clip settings will not be changed. */ - void draw(SkCanvas*, const SkMatrix* = NULL); + void draw(SkCanvas*, const SkMatrix* = nullptr); void draw(SkCanvas*, SkScalar x, SkScalar y); SkPicture* newPictureSnapshot(); diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index d9b0fb04ab..60000798e4 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -434,13 +434,13 @@ private: }; /** - * Helper to unflatten the common data, and return NULL if we fail. + * Helper to unflatten the common data, and return nullptr if we fail. */ #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ Common localVar; \ do { \ if (!localVar.unflatten(buffer, expectedCount)) { \ - return NULL; \ + return nullptr; \ } \ } while (0) diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h index d3cbda3cf9..f659bf7742 100644 --- a/include/core/SkImageInfo.h +++ b/include/core/SkImageInfo.h @@ -144,7 +144,7 @@ static inline size_t SkColorTypeComputeOffset(SkColorType ct, int x, int y, size * alphaType for this colorType, return it in canonical. */ bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType, - SkAlphaType* canonical = NULL); + SkAlphaType* canonical = nullptr); /////////////////////////////////////////////////////////////////////////////// diff --git a/include/core/SkMask.h b/include/core/SkMask.h index a6d5606478..9d3a7b495f 100644 --- a/include/core/SkMask.h +++ b/include/core/SkMask.h @@ -59,7 +59,7 @@ struct SkMask { uint8_t* getAddr1(int x, int y) const { SkASSERT(kBW_Format == fFormat); SkASSERT(fBounds.contains(x, y)); - SkASSERT(fImage != NULL); + SkASSERT(fImage != nullptr); return fImage + ((x - fBounds.fLeft) >> 3) + (y - fBounds.fTop) * fRowBytes; } @@ -70,7 +70,7 @@ struct SkMask { uint8_t* getAddr8(int x, int y) const { SkASSERT(kA8_Format == fFormat); SkASSERT(fBounds.contains(x, y)); - SkASSERT(fImage != NULL); + SkASSERT(fImage != nullptr); return fImage + x - fBounds.fLeft + (y - fBounds.fTop) * fRowBytes; } @@ -82,7 +82,7 @@ struct SkMask { uint16_t* getAddrLCD16(int x, int y) const { SkASSERT(kLCD16_Format == fFormat); SkASSERT(fBounds.contains(x, y)); - SkASSERT(fImage != NULL); + SkASSERT(fImage != nullptr); uint16_t* row = (uint16_t*)(fImage + (y - fBounds.fTop) * fRowBytes); return row + (x - fBounds.fLeft); } @@ -95,7 +95,7 @@ struct SkMask { uint32_t* getAddr32(int x, int y) const { SkASSERT(kARGB32_Format == fFormat); SkASSERT(fBounds.contains(x, y)); - SkASSERT(fImage != NULL); + SkASSERT(fImage != nullptr); uint32_t* row = (uint32_t*)(fImage + (y - fBounds.fTop) * fRowBytes); return row + (x - fBounds.fLeft); } diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h index 1752f26d13..746f176f4c 100644 --- a/include/core/SkMatrix.h +++ b/include/core/SkMatrix.h @@ -682,7 +682,7 @@ public: * * Possible reasons to fail: perspective, one or more scale factors are zero. */ - bool decomposeScale(SkSize* scale, SkMatrix* remaining = NULL) const; + bool decomposeScale(SkSize* scale, SkMatrix* remaining = nullptr) const; /** * Return a reference to a const identity matrix diff --git a/include/core/SkMetaData.h b/include/core/SkMetaData.h index c8ca7f1419..a8ebaac2ad 100644 --- a/include/core/SkMetaData.h +++ b/include/core/SkMetaData.h @@ -48,14 +48,14 @@ public: void reset(); - bool findS32(const char name[], int32_t* value = NULL) const; - bool findScalar(const char name[], SkScalar* value = NULL) const; + bool findS32(const char name[], int32_t* value = nullptr) const; + bool findScalar(const char name[], SkScalar* value = nullptr) const; const SkScalar* findScalars(const char name[], int* count, - SkScalar values[] = NULL) const; + SkScalar values[] = nullptr) const; const char* findString(const char name[]) const; - bool findPtr(const char name[], void** value = NULL, PtrProc* = NULL) const; - bool findBool(const char name[], bool* value = NULL) const; - const void* findData(const char name[], size_t* byteCount = NULL) const; + bool findPtr(const char name[], void** value = nullptr, PtrProc* = nullptr) const; + bool findBool(const char name[], bool* value = nullptr) const; + const void* findData(const char name[], size_t* byteCount = nullptr) const; bool hasS32(const char name[], int32_t value) const { int32_t v; @@ -67,8 +67,8 @@ public: } bool hasString(const char name[], const char value[]) const { const char* v = this->findString(name); - return (v == NULL && value == NULL) || - (v != NULL && value != NULL && !strcmp(v, value)); + return (v == nullptr && value == nullptr) || + (v != nullptr && value != nullptr && !strcmp(v, value)); } bool hasPtr(const char name[], void* value) const { void* v; @@ -86,9 +86,9 @@ public: void setS32(const char name[], int32_t value); void setScalar(const char name[], SkScalar value); - SkScalar* setScalars(const char name[], int count, const SkScalar values[] = NULL); + SkScalar* setScalars(const char name[], int count, const SkScalar values[] = nullptr); void setString(const char name[], const char value[]); - void setPtr(const char name[], void* value, PtrProc proc = NULL); + void setPtr(const char name[], void* value, PtrProc proc = nullptr); void setBool(const char name[], bool value); // the data is copied from the input pointer. void setData(const char name[], const void* data, size_t byteCount); @@ -101,7 +101,7 @@ public: bool removeData(const char name[]); // helpers for SkRefCnt - bool findRefCnt(const char name[], SkRefCnt** ptr = NULL) { + bool findRefCnt(const char name[], SkRefCnt** ptr = nullptr) { return this->findPtr(name, reinterpret_cast<void**>(ptr)); } bool hasRefCnt(const char name[], SkRefCnt* ptr) { @@ -131,7 +131,7 @@ public: class Iter { public: - Iter() : fRec(NULL) {} + Iter() : fRec(nullptr) {} Iter(const SkMetaData&); /** Reset the iterator, so that calling next() will return the first diff --git a/include/core/SkMultiPictureDraw.h b/include/core/SkMultiPictureDraw.h index 9995721ab9..e798f06263 100644 --- a/include/core/SkMultiPictureDraw.h +++ b/include/core/SkMultiPictureDraw.h @@ -40,8 +40,8 @@ public: */ void add(SkCanvas* canvas, const SkPicture* picture, - const SkMatrix* matrix = NULL, - const SkPaint* paint = NULL); + const SkMatrix* matrix = nullptr, + const SkPaint* paint = nullptr); /** * Perform all the previously added draws. This will reset the state diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 56daaf3a8a..e2937c9ea5 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -739,7 +739,7 @@ public: @return true if the path represents style fill, or false if it represents hairline */ bool getFillPath(const SkPath& src, SkPath* dst) const { - return this->getFillPath(src, dst, NULL, 1); + return this->getFillPath(src, dst, nullptr, 1); } /** Optional colors used when filling a path, such as a gradient. @@ -1293,7 +1293,7 @@ public: @return recommended spacing between lines */ - SkScalar getFontSpacing() const { return this->getFontMetrics(NULL, 0); } + SkScalar getFontSpacing() const { return this->getFontMetrics(nullptr, 0); } /** Converts text into glyph indices. Returns the number of glyph indices represented by text. @@ -1355,7 +1355,7 @@ public: @return number of glyphs represented by text of length byteLength */ int countText(const void* text, size_t byteLength) const { - return this->textToGlyphs(text, byteLength, NULL); + return this->textToGlyphs(text, byteLength, nullptr); } /** Returns the advance width of text if kVerticalText_Flag is clear, @@ -1386,7 +1386,7 @@ public: @return advance width or height */ SkScalar measureText(const void* text, size_t length) const { - return this->measureText(text, length, NULL); + return this->measureText(text, length, nullptr); } /** Returns the bytes of text that fit within maxWidth. @@ -1407,7 +1407,7 @@ public: @return bytes of text that fit, always less than or equal to length */ size_t breakText(const void* text, size_t length, SkScalar maxWidth, - SkScalar* measuredWidth = NULL) const; + SkScalar* measuredWidth = nullptr) const; /** Retrieves the advance and bounds for each glyph in text, and returns the glyph count in text. @@ -1428,7 +1428,7 @@ public: @return glyph count in text */ int getTextWidths(const void* text, size_t byteLength, SkScalar widths[], - SkRect bounds[] = NULL) const; + SkRect bounds[] = nullptr) const; /** Returns the geometry as SkPath equivalent to the drawn text. Uses SkPaint::TextEncoding to decode text, SkTypeface to get the glyph paths, diff --git a/include/core/SkPath.h b/include/core/SkPath.h index 0a70f0e9ad..f0d6f3b2ae 100644 --- a/include/core/SkPath.h +++ b/include/core/SkPath.h @@ -663,7 +663,7 @@ public: * @param direction If not null, set to the rectangle's direction * @return true if the path specifies a rectangle */ - bool isRect(SkRect* rect, bool* isClosed = NULL, Direction* direction = NULL) const; + bool isRect(SkRect* rect, bool* isClosed = nullptr, Direction* direction = nullptr) const; /** Returns true if the path specifies a pair of nested rectangles, or would draw a pair of nested rectangles when filled. If so, and if @@ -677,7 +677,7 @@ public: @param dirs If not null, returns the direction of the rects @return true if the path describes a pair of nested rectangles */ - bool isNestedFillRects(SkRect rect[2], Direction dirs[2] = NULL) const; + bool isNestedFillRects(SkRect rect[2], Direction dirs[2] = nullptr) const; /** * Add a closed rectangle contour to the path diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h index 65adb33f3c..8988139d1f 100644 --- a/include/core/SkPathEffect.h +++ b/include/core/SkPathEffect.h @@ -76,7 +76,7 @@ public: public: PointData() : fFlags(0) - , fPoints(NULL) + , fPoints(nullptr) , fNumPoints(0) { fSize.set(SK_Scalar1, SK_Scalar1); // 'asPoints' needs to initialize/fill-in 'fClipRect' if it sets @@ -132,7 +132,7 @@ public: }; struct DashInfo { - DashInfo() : fIntervals(NULL), fCount(0), fPhase(0) {} + DashInfo() : fIntervals(nullptr), fCount(0), fPhase(0) {} DashInfo(SkScalar* intervals, int32_t count, SkScalar phase) : fIntervals(intervals), fCount(count), fPhase(phase) {} diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 891c11dae5..290434c8ad 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -96,7 +96,7 @@ public: @param canvas the canvas receiving the drawing commands. @param callback a callback that allows interruption of playback */ - virtual void playback(SkCanvas*, AbortCallback* = NULL) const = 0; + virtual void playback(SkCanvas*, AbortCallback* = nullptr) const = 0; /** Return a cull rect for this picture. Ops recorded into this picture that attempt to draw outside the cull might not be drawn. @@ -152,11 +152,11 @@ public: #ifdef SK_SUPPORT_LEGACY_PICTURE_GPUVETO /** Return true if the picture is suitable for rendering on the GPU. */ - bool suitableForGpuRasterization(GrContext*, const char** whyNot = NULL) const; + bool suitableForGpuRasterization(GrContext*, const char** whyNot = nullptr) const; #endif // Returns NULL if this is not an SkBigPicture. - virtual const SkBigPicture* asSkBigPicture() const { return NULL; } + virtual const SkBigPicture* asSkBigPicture() const { return nullptr; } // Global setting to enable or disable security precautions for serialization. static void SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set); diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h index 09839cba5e..cadd193afc 100644 --- a/include/core/SkPictureRecorder.h +++ b/include/core/SkPictureRecorder.h @@ -48,11 +48,11 @@ public: @return the canvas. */ SkCanvas* beginRecording(const SkRect& bounds, - SkBBHFactory* bbhFactory = NULL, + SkBBHFactory* bbhFactory = nullptr, uint32_t recordFlags = 0); SkCanvas* beginRecording(SkScalar width, SkScalar height, - SkBBHFactory* bbhFactory = NULL, + SkBBHFactory* bbhFactory = nullptr, uint32_t recordFlags = 0) { return this->beginRecording(SkRect::MakeWH(width, height), bbhFactory, recordFlags); } diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h index b14cbdf20e..49f0f97f2f 100644 --- a/include/core/SkPixelRef.h +++ b/include/core/SkPixelRef.h @@ -97,7 +97,7 @@ public: fAddedToCache.store(true); } - virtual SkDiscardableMemory* diagnostic_only_getDiscardable() const { return NULL; } + virtual SkDiscardableMemory* diagnostic_only_getDiscardable() const { return nullptr; } protected: // default impl does nothing. diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h index c703386d1f..55e38cca4b 100644 --- a/include/core/SkPixmap.h +++ b/include/core/SkPixmap.h @@ -22,7 +22,7 @@ struct SkMask; class SK_API SkPixmap { public: SkPixmap() - : fPixels(NULL), fRowBytes(0), fInfo(SkImageInfo::MakeUnknown(0, 0)) + : fPixels(nullptr), fRowBytes(0), fInfo(SkImageInfo::MakeUnknown(0, 0)) {} SkPixmap(const SkImageInfo& info, const void* addr, size_t rowBytes) @@ -32,7 +32,7 @@ public: void reset(); void reset(const SkImageInfo& info, const void* addr, size_t rowBytes); void reset(const SkImageInfo& info) { - this->reset(info, NULL, 0); + this->reset(info, nullptr, 0); } // overrides the colorspace in the SkImageInfo of the pixmap diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h index f5ecbab78c..2cc57126f2 100644 --- a/include/core/SkPoint.h +++ b/include/core/SkPoint.h @@ -496,7 +496,7 @@ struct SK_API SkPoint { */ SkScalar distanceToLineBetweenSqd(const SkPoint& a, const SkPoint& b, - Side* side = NULL) const; + Side* side = nullptr) const; /** * Returns the distance to the infinite line between two pts. Also @@ -505,7 +505,7 @@ struct SK_API SkPoint { */ SkScalar distanceToLineBetween(const SkPoint& a, const SkPoint& b, - Side* side = NULL) const { + Side* side = nullptr) const { return SkScalarSqrt(this->distanceToLineBetweenSqd(a, b, side)); } diff --git a/include/core/SkRegion.h b/include/core/SkRegion.h index 49e5a19dbb..32be090764 100644 --- a/include/core/SkRegion.h +++ b/include/core/SkRegion.h @@ -20,7 +20,7 @@ namespace android { } #define SkRegion_gEmptyRunHeadPtr ((SkRegion::RunHead*)-1) -#define SkRegion_gRectRunHeadPtr 0 +#define SkRegion_gRectRunHeadPtr nullptr /** \class SkRegion @@ -316,7 +316,7 @@ public: */ class SK_API Iterator { public: - Iterator() : fRgn(NULL), fDone(true) {} + Iterator() : fRgn(nullptr), fDone(true) {} Iterator(const SkRegion&); // if we have a region, reset to it and return true, else return false bool rewind(); diff --git a/include/core/SkStream.h b/include/core/SkStream.h index 1862117bb6..fde6baf0c9 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -59,7 +59,7 @@ public: * @return the actual number bytes that could be skipped. */ size_t skip(size_t size) { - return this->read(NULL, size); + return this->read(nullptr, size); } /** @@ -104,7 +104,7 @@ public: /** Duplicates this stream. If this cannot be done, returns NULL. * The returned stream will be positioned at the beginning of its data. */ - virtual SkStreamRewindable* duplicate() const { return NULL; } + virtual SkStreamRewindable* duplicate() const { return nullptr; } //SkStreamSeekable /** Returns true if this stream can report it's current position. */ @@ -127,7 +127,7 @@ public: /** Duplicates this stream. If this cannot be done, returns NULL. * The returned stream will be positioned the same as this stream. */ - virtual SkStreamSeekable* fork() const { return NULL; } + virtual SkStreamSeekable* fork() const { return nullptr; } //SkStreamAsset /** Returns true if this stream can report it's total length. */ @@ -138,7 +138,7 @@ public: //SkStreamMemory /** Returns the starting address for the data. If this cannot be done, returns NULL. */ //TODO: replace with virtual const SkData* getData() - virtual const void* getMemoryBase() { return NULL; } + virtual const void* getMemoryBase() { return nullptr; } }; /** SkStreamRewindable is a SkStream for which rewind and duplicate are required. */ @@ -373,7 +373,7 @@ public: /** Returns true if the current path could be opened. */ - bool isValid() const { return fFILE != NULL; } + bool isValid() const { return fFILE != nullptr; } bool write(const void* buffer, size_t size) override; void flush() override; diff --git a/include/core/SkString.h b/include/core/SkString.h index 4a2d91f2df..621c661142 100644 --- a/include/core/SkString.h +++ b/include/core/SkString.h @@ -35,13 +35,13 @@ int SkStrStartsWithOneOf(const char string[], const char prefixes[]); static int SkStrFind(const char string[], const char substring[]) { const char *first = strstr(string, substring); - if (NULL == first) return -1; + if (nullptr == first) return -1; return SkToInt(first - &string[0]); } static int SkStrFindLastOf(const char string[], const char subchar) { const char* last = strrchr(string, subchar); - if (NULL == last) return -1; + if (nullptr == last) return -1; return SkToInt(last - &string[0]); } @@ -180,7 +180,7 @@ public: void reset(); /** Destructive resize, does not preserve contents. */ - void resize(size_t len) { this->set(NULL, len); } + void resize(size_t len) { this->set(nullptr, len); } void set(const SkString& src) { *this = src; } void set(const char text[]); void set(const char text[], size_t len); diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h index f3cde25482..e15bf918a8 100644 --- a/include/core/SkTextBlob.h +++ b/include/core/SkTextBlob.h @@ -185,9 +185,9 @@ public: SkScalar y, int textByteCount, SkString lang, - const SkRect* bounds = NULL); + const SkRect* bounds = nullptr); const RunBuffer& allocRun(const SkPaint& font, int count, SkScalar x, SkScalar y, - const SkRect* bounds = NULL) { + const SkRect* bounds = nullptr) { return this->allocRunText(font, count, x, y, 0, SkString(), bounds); } @@ -210,9 +210,9 @@ public: */ const RunBuffer& allocRunTextPosH(const SkPaint& font, int count, SkScalar y, int textByteCount, SkString lang, - const SkRect* bounds = NULL); + const SkRect* bounds = nullptr); const RunBuffer& allocRunPosH(const SkPaint& font, int count, SkScalar y, - const SkRect* bounds = NULL) { + const SkRect* bounds = nullptr) { return this->allocRunTextPosH(font, count, y, 0, SkString(), bounds); } @@ -235,9 +235,9 @@ public: */ const RunBuffer& allocRunTextPos(const SkPaint& font, int count, int textByteCount, SkString lang, - const SkRect* bounds = NULL); + const SkRect* bounds = nullptr); const RunBuffer& allocRunPos(const SkPaint& font, int count, - const SkRect* bounds = NULL) { + const SkRect* bounds = nullptr) { return this->allocRunTextPos(font, count, 0, SkString(), bounds); } diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index b453249ea1..9887c91695 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -216,7 +216,7 @@ template <typename D, typename S> D SkTo(S s) { /** Returns 0 or 1 based on the condition */ -#define SkToBool(cond) ((cond) != 0) +#define SkToBool(cond) (bool(cond)) #define SK_MaxS16 32767 #define SK_MinS16 -32767 diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h index 36c74c140f..6cbd4eaf54 100644 --- a/include/core/SkWriteBuffer.h +++ b/include/core/SkWriteBuffer.h @@ -91,7 +91,7 @@ public: fWriter.write(buffer, bytes); } - void reset(void* storage = NULL, size_t storageSize = 0) { + void reset(void* storage = nullptr, size_t storageSize = 0) { fWriter.reset(storage, storageSize); } diff --git a/include/core/SkWriter32.h b/include/core/SkWriter32.h index 478d24ba95..beaaee1c7c 100644 --- a/include/core/SkWriter32.h +++ b/include/core/SkWriter32.h @@ -32,7 +32,7 @@ public: * first time an allocation doesn't fit. From then it will use dynamically allocated storage. * This used to be optional behavior, but pipe now relies on it. */ - SkWriter32(void* external = NULL, size_t externalBytes = 0) { + SkWriter32(void* external = nullptr, size_t externalBytes = 0) { this->reset(external, externalBytes); } @@ -42,7 +42,7 @@ public: SK_ATTR_DEPRECATED("use bytesWritten") size_t size() const { return this->bytesWritten(); } - void reset(void* external = NULL, size_t externalBytes = 0) { + void reset(void* external = nullptr, size_t externalBytes = 0) { SkASSERT(SkIsAlign4((uintptr_t)external)); SkASSERT(SkIsAlign4(externalBytes)); @@ -136,19 +136,19 @@ public: } void writePath(const SkPath& path) { - size_t size = path.writeToMemory(NULL); + size_t size = path.writeToMemory(nullptr); SkASSERT(SkAlign4(size) == size); path.writeToMemory(this->reserve(size)); } void writeMatrix(const SkMatrix& matrix) { - size_t size = matrix.writeToMemory(NULL); + size_t size = matrix.writeToMemory(nullptr); SkASSERT(SkAlign4(size) == size); matrix.writeToMemory(this->reserve(size)); } void writeRegion(const SkRegion& rgn) { - size_t size = rgn.writeToMemory(NULL); + size_t size = rgn.writeToMemory(nullptr); SkASSERT(SkAlign4(size) == size); rgn.writeToMemory(this->reserve(size)); } diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h index e9af51c4d9..7812a91524 100644 --- a/include/effects/SkColorFilterImageFilter.h +++ b/include/effects/SkColorFilterImageFilter.h @@ -16,7 +16,7 @@ class SK_API SkColorFilterImageFilter : public SkImageFilter { public: static sk_sp<SkImageFilter> Make(sk_sp<SkColorFilter> cf, sk_sp<SkImageFilter> input, - const CropRect* cropRect = NULL); + const CropRect* cropRect = nullptr); SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter) diff --git a/include/effects/SkGradientShader.h b/include/effects/SkGradientShader.h index a4408ad9c3..9821c4be82 100644 --- a/include/effects/SkGradientShader.h +++ b/include/effects/SkGradientShader.h @@ -45,7 +45,7 @@ public: static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkShader::TileMode mode) { - return MakeLinear(pts, colors, pos, count, mode, 0, NULL); + return MakeLinear(pts, colors, pos, count, mode, 0, nullptr); } /** Returns a shader that generates a linear gradient between the two specified points. @@ -67,7 +67,7 @@ public: static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const SkColor4f colors[], sk_sp<SkColorSpace> colorSpace, const SkScalar pos[], int count, SkShader::TileMode mode) { - return MakeLinear(pts, colors, std::move(colorSpace), pos, count, mode, 0, NULL); + return MakeLinear(pts, colors, std::move(colorSpace), pos, count, mode, 0, nullptr); } /** Returns a shader that generates a radial gradient given the center and radius. @@ -90,7 +90,7 @@ public: static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkShader::TileMode mode) { - return MakeRadial(center, radius, colors, pos, count, mode, 0, NULL); + return MakeRadial(center, radius, colors, pos, count, mode, 0, nullptr); } /** Returns a shader that generates a radial gradient given the center and radius. @@ -113,7 +113,8 @@ public: static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius, const SkColor4f colors[], sk_sp<SkColorSpace> colorSpace, const SkScalar pos[], int count, SkShader::TileMode mode) { - return MakeRadial(center, radius, colors, std::move(colorSpace), pos, count, mode, 0, NULL); + return MakeRadial(center, radius, colors, std::move(colorSpace), pos, count, mode, + 0, nullptr); } /** @@ -132,7 +133,7 @@ public: const SkColor colors[], const SkScalar pos[], int count, SkShader::TileMode mode) { return MakeTwoPointConical(start, startRadius, end, endRadius, colors, pos, count, mode, - 0, NULL); + 0, nullptr); } /** @@ -153,7 +154,7 @@ public: sk_sp<SkColorSpace> colorSpace, const SkScalar pos[], int count, SkShader::TileMode mode) { return MakeTwoPointConical(start, startRadius, end, endRadius, colors, - std::move(colorSpace), pos, count, mode, 0, NULL); + std::move(colorSpace), pos, count, mode, 0, nullptr); } /** Returns a shader that generates a sweep gradient given a center. diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h index 677460ee40..6d28c1231d 100644 --- a/include/gpu/GrGpuResource.h +++ b/include/gpu/GrGpuResource.h @@ -154,7 +154,7 @@ public: * @return true if the object has been released or abandoned, * false otherwise. */ - bool wasDestroyed() const { return NULL == fGpu; } + bool wasDestroyed() const { return nullptr == fGpu; } /** * Retrieves the context that owns the object. Note that it is possible for diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h index 5e4265ed33..94b1875e2e 100644 --- a/include/gpu/GrRenderTarget.h +++ b/include/gpu/GrRenderTarget.h @@ -63,7 +63,7 @@ public: * @param rect a rect bounding the area needing resolve. NULL indicates * the whole RT needs resolving. */ - void flagAsNeedingResolve(const SkIRect* rect = NULL); + void flagAsNeedingResolve(const SkIRect* rect = nullptr); /** * Call to override the region that needs to be resolved. diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h index 2e7edab577..c0a08f8add 100644 --- a/include/gpu/GrResourceKey.h +++ b/include/gpu/GrResourceKey.h @@ -95,14 +95,14 @@ protected: ~Builder() { this->finish(); } void finish() { - if (NULL == fKey) { + if (nullptr == fKey) { return; } GR_STATIC_ASSERT(0 == kHash_MetaDataIdx); uint32_t* hash = &fKey->fKey[kHash_MetaDataIdx]; *hash = GrResourceKeyHash(hash + 1, fKey->internalSize() - sizeof(uint32_t)); fKey->validate(); - fKey = NULL; + fKey = nullptr; } uint32_t& operator[](int dataIdx) { diff --git a/include/ports/SkFontConfigInterface.h b/include/ports/SkFontConfigInterface.h index 3e279d45b8..c6b7b78628 100644 --- a/include/ports/SkFontConfigInterface.h +++ b/include/ports/SkFontConfigInterface.h @@ -62,7 +62,7 @@ public: // If buffer is NULL, just return the number of bytes that would have // been written. Will pad contents to a multiple of 4. - size_t writeToMemory(void* buffer = NULL) const; + size_t writeToMemory(void* buffer = nullptr) const; // Recreate from a flattened buffer, returning the number of bytes read. size_t readFromMemory(const void* buffer, size_t length); diff --git a/include/ports/SkFontMgr_indirect.h b/include/ports/SkFontMgr_indirect.h index b9ab3ba913..251d74a83a 100644 --- a/include/ports/SkFontMgr_indirect.h +++ b/include/ports/SkFontMgr_indirect.h @@ -76,7 +76,7 @@ private: { SkDEBUGCODE(that.fDataId = SkFontIdentity::kInvalidDataId;) SkDEBUGCODE(that.fTtcIndex = 0xbbadbeef;) - that.fTypeface = NULL; + that.fTypeface = nullptr; } ~DataEntry() { diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h index f75b999f60..6d353089b0 100644 --- a/include/private/SkPathRef.h +++ b/include/private/SkPathRef.h @@ -83,7 +83,7 @@ public: */ SkPoint* growForRepeatedVerb(int /*SkPath::Verb*/ verb, int numVbs, - SkScalar** weights = NULL) { + SkScalar** weights = nullptr) { return fPathRef->growForRepeatedVerb(verb, numVbs, weights); } @@ -328,8 +328,8 @@ private: fBoundsIsDirty = true; // this also invalidates fIsFinite fPointCnt = 0; fVerbCnt = 0; - fVerbs = NULL; - fPoints = NULL; + fVerbs = nullptr; + fPoints = nullptr; fFreeSpace = 0; fGenerationID = kEmptyGenID; fSegmentMask = 0; @@ -395,8 +395,8 @@ private: if (sizeDelta < 0 || static_cast<size_t>(sizeDelta) >= 3 * minSize) { sk_free(fPoints); - fPoints = NULL; - fVerbs = NULL; + fPoints = nullptr; + fVerbs = nullptr; fFreeSpace = 0; fVerbCnt = 0; fPointCnt = 0; diff --git a/include/private/SkTArray.h b/include/private/SkTArray.h index a6e4dedf9f..9e0b954fbf 100644 --- a/include/private/SkTArray.h +++ b/include/private/SkTArray.h @@ -320,10 +320,10 @@ public: return fItemArray; } T* end() { - return fItemArray ? fItemArray + fCount : NULL; + return fItemArray ? fItemArray + fCount : nullptr; } const T* end() const { - return fItemArray ? fItemArray + fCount : NULL; + return fItemArray ? fItemArray + fCount : nullptr; } /** diff --git a/include/private/SkTDArray.h b/include/private/SkTDArray.h index 4c58d478fe..b0664aaa5b 100644 --- a/include/private/SkTDArray.h +++ b/include/private/SkTDArray.h @@ -20,7 +20,7 @@ public: SkASSERT(src || count == 0); fReserve = fCount = 0; - fArray = NULL; + fArray = nullptr; if (count) { fArray = (T*)sk_malloc_throw(count * sizeof(T)); memcpy(fArray, src, sizeof(T) * count); @@ -84,7 +84,7 @@ public: */ T* release() { T* array = fArray; - fArray = NULL; + fArray = nullptr; fReserve = fCount = 0; return array; } @@ -110,8 +110,8 @@ public: T* begin() { return fArray; } const T* begin() const { return fArray; } - T* end() { return fArray ? fArray + fCount : NULL; } - const T* end() const { return fArray ? fArray + fCount : NULL; } + T* end() { return fArray ? fArray + fCount : nullptr; } + const T* end() const { return fArray ? fArray + fCount : nullptr; } T& operator[](int index) { SkASSERT(index < fCount); @@ -132,7 +132,7 @@ public: void reset() { if (fArray) { sk_free(fArray); - fArray = NULL; + fArray = nullptr; fReserve = fCount = 0; } else { SkASSERT(fReserve == 0 && fCount == 0); @@ -171,12 +171,12 @@ public: } T* append() { - return this->append(1, NULL); + return this->append(1, nullptr); } - T* append(int count, const T* src = NULL) { + T* append(int count, const T* src = nullptr) { int oldCount = fCount; if (count) { - SkASSERT(src == NULL || fArray == NULL || + SkASSERT(src == nullptr || fArray == nullptr || src + count <= fArray || fArray + oldCount <= src); this->adjustCount(count); @@ -194,9 +194,9 @@ public: } T* insert(int index) { - return this->insert(index, 1, NULL); + return this->insert(index, 1, nullptr); } - T* insert(int index, int count, const T* src = NULL) { + T* insert(int index, int count, const T* src = nullptr) { SkASSERT(count); SkASSERT(index <= fCount); size_t oldCount = fCount; @@ -345,8 +345,8 @@ public: #ifdef SK_DEBUG void validate() const { - SkASSERT((fReserve == 0 && fArray == NULL) || - (fReserve > 0 && fArray != NULL)); + SkASSERT((fReserve == 0 && fArray == nullptr) || + (fReserve > 0 && fArray != nullptr)); SkASSERT(fCount <= fReserve); } #endif diff --git a/include/private/SkTSearch.h b/include/private/SkTSearch.h index 549bcfd7c8..16ef0d695e 100644 --- a/include/private/SkTSearch.h +++ b/include/private/SkTSearch.h @@ -43,7 +43,7 @@ int SkTSearch(const T base[], int count, const K& key, size_t elemSize, LESS& le return ~0; } - SkASSERT(base != NULL); // base may be NULL if count is zero + SkASSERT(base != nullptr); // base may be nullptr if count is zero int lo = 0; int hi = count - 1; diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h index 919d160d0d..5ebf13ac36 100644 --- a/include/private/SkTemplates.h +++ b/include/private/SkTemplates.h @@ -87,14 +87,14 @@ public: template <typename T> class SkAutoTArray : SkNoncopyable { public: SkAutoTArray() { - fArray = NULL; + fArray = nullptr; SkDEBUGCODE(fCount = 0;) } /** Allocate count number of T elements */ explicit SkAutoTArray(int count) { SkASSERT(count >= 0); - fArray = NULL; + fArray = nullptr; if (count) { fArray = new T[count]; } @@ -106,7 +106,7 @@ public: void reset(int count) { delete[] fArray; SkASSERT(count >= 0); - fArray = NULL; + fArray = nullptr; if (count) { fArray = new T[count]; } @@ -142,14 +142,14 @@ template <int kCountRequested, typename T> class SkAutoSTArray : SkNoncopyable { public: /** Initialize with no objects */ SkAutoSTArray() { - fArray = NULL; + fArray = nullptr; fCount = 0; } /** Allocate count number of T elements */ SkAutoSTArray(int count) { - fArray = NULL; + fArray = nullptr; fCount = 0; this->reset(count); } @@ -184,7 +184,7 @@ public: } else if (count > 0) { fArray = (T*) fStorage; } else { - fArray = NULL; + fArray = nullptr; } fCount = count; @@ -244,7 +244,7 @@ private: template <typename T> class SkAutoTMalloc : SkNoncopyable { public: /** Takes ownership of the ptr. The ptr must be a value which can be passed to sk_free. */ - explicit SkAutoTMalloc(T* ptr = NULL) { + explicit SkAutoTMalloc(T* ptr = nullptr) { fPtr = ptr; } @@ -308,7 +308,7 @@ public: */ T* release() { T* ptr = fPtr; - fPtr = NULL; + fPtr = nullptr; return ptr; } diff --git a/include/utils/SkCamera.h b/include/utils/SkCamera.h index 3cb13fc19b..911ff15031 100644 --- a/include/utils/SkCamera.h +++ b/include/utils/SkCamera.h @@ -75,7 +75,7 @@ public: SkPatch3D(); void reset(); - void transform(const SkMatrix3D&, SkPatch3D* dst = NULL) const; + void transform(const SkMatrix3D&, SkPatch3D* dst = nullptr) const; // dot a unit vector with the patch's normal SkScalar dotWith(SkScalar dx, SkScalar dy, SkScalar dz) const; diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h index 727c5797d7..e7f941c21d 100644 --- a/include/utils/SkDumpCanvas.h +++ b/include/utils/SkDumpCanvas.h @@ -21,7 +21,7 @@ class SkDumpCanvas : public SkCanvas { public: class Dumper; - explicit SkDumpCanvas(Dumper* = 0); + explicit SkDumpCanvas(Dumper* = nullptr); ~SkDumpCanvas() override; enum Verb { diff --git a/include/utils/SkInterpolator.h b/include/utils/SkInterpolator.h index e062b38f65..61e652519a 100644 --- a/include/utils/SkInterpolator.h +++ b/include/utils/SkInterpolator.h @@ -67,8 +67,8 @@ protected: kReset = 2, kHasBlend = 4 }; - static SkScalar ComputeRelativeT(SkMSec time, SkMSec prevTime, - SkMSec nextTime, const SkScalar blend[4] = NULL); + static SkScalar ComputeRelativeT(SkMSec time, SkMSec prevTime, SkMSec nextTime, + const SkScalar blend[4] = nullptr); int16_t fFrameCount; uint8_t fElemCount; uint8_t fFlags; @@ -102,7 +102,7 @@ public: 1 is a linear blend (default) */ bool setKeyFrame(int index, SkMSec time, const SkScalar values[], - const SkScalar blend[4] = NULL); + const SkScalar blend[4] = nullptr); /** Return the computed values given the specified time. Return whether those values are the result of pinning to either the first @@ -111,7 +111,7 @@ public: @param time The time to sample (in milliseconds) @param (may be null) where to write the computed values. */ - Result timeToValues(SkMSec time, SkScalar values[] = NULL) const; + Result timeToValues(SkMSec time, SkScalar values[] = nullptr) const; private: SkScalar* fValues; // pointer into fStorage diff --git a/include/utils/SkLua.h b/include/utils/SkLua.h index ea3e166b04..651c4a71d5 100644 --- a/include/utils/SkLua.h +++ b/include/utils/SkLua.h @@ -30,7 +30,7 @@ class SkLua { public: static void Load(lua_State*); - SkLua(const char termCode[] = NULL); // creates a new L, will close it + SkLua(const char termCode[] = nullptr); // creates a new L, will close it SkLua(lua_State*); // uses L, will not close it ~SkLua(); @@ -41,24 +41,24 @@ public: bool runCode(const char code[]); bool runCode(const void* code, size_t size); - void pushBool(bool, const char tableKey[] = NULL); - void pushString(const char[], const char tableKey[] = NULL); - void pushString(const char[], size_t len, const char tableKey[] = NULL); - void pushString(const SkString&, const char tableKey[] = NULL); - void pushArrayU16(const uint16_t[], int count, const char tableKey[] = NULL); - void pushArrayPoint(const SkPoint[], int count, const char key[] = NULL); - void pushArrayScalar(const SkScalar[], int count, const char key[] = NULL); - void pushColor(SkColor, const char tableKey[] = NULL); - void pushU32(uint32_t, const char tableKey[] = NULL); - void pushScalar(SkScalar, const char tableKey[] = NULL); - void pushRect(const SkRect&, const char tableKey[] = NULL); - void pushRRect(const SkRRect&, const char tableKey[] = NULL); - void pushDash(const SkPathEffect::DashInfo&, const char tableKey[] = NULL); - void pushMatrix(const SkMatrix&, const char tableKey[] = NULL); - void pushPaint(const SkPaint&, const char tableKey[] = NULL); - void pushPath(const SkPath&, const char tableKey[] = NULL); - void pushCanvas(SkCanvas*, const char tableKey[] = NULL); - void pushTextBlob(const SkTextBlob*, const char tableKey[] = NULL); + void pushBool(bool, const char tableKey[] = nullptr); + void pushString(const char[], const char tableKey[] = nullptr); + void pushString(const char[], size_t len, const char tableKey[] = nullptr); + void pushString(const SkString&, const char tableKey[] = nullptr); + void pushArrayU16(const uint16_t[], int count, const char tableKey[] = nullptr); + void pushArrayPoint(const SkPoint[], int count, const char key[] = nullptr); + void pushArrayScalar(const SkScalar[], int count, const char key[] = nullptr); + void pushColor(SkColor, const char tableKey[] = nullptr); + void pushU32(uint32_t, const char tableKey[] = nullptr); + void pushScalar(SkScalar, const char tableKey[] = nullptr); + void pushRect(const SkRect&, const char tableKey[] = nullptr); + void pushRRect(const SkRRect&, const char tableKey[] = nullptr); + void pushDash(const SkPathEffect::DashInfo&, const char tableKey[] = nullptr); + void pushMatrix(const SkMatrix&, const char tableKey[] = nullptr); + void pushPaint(const SkPaint&, const char tableKey[] = nullptr); + void pushPath(const SkPath&, const char tableKey[] = nullptr); + void pushCanvas(SkCanvas*, const char tableKey[] = nullptr); + void pushTextBlob(const SkTextBlob*, const char tableKey[] = nullptr); private: lua_State* fL; diff --git a/include/views/SkEvent.h b/include/views/SkEvent.h index b78fd6fc1d..091b7080a2 100644 --- a/include/views/SkEvent.h +++ b/include/views/SkEvent.h @@ -80,7 +80,7 @@ public: * called (if not NULL). */ SkEvent* setTargetID(SkEventSinkID targetID) { - fTargetProc = NULL; + fTargetProc = nullptr; fTargetID = targetID; return this; } @@ -122,17 +122,23 @@ public: in value (if value is non-null). If there is no matching named field, return false and ignore the value parameter. */ - bool findS32(const char name[], int32_t* value = NULL) const { return fMeta.findS32(name, value); } + bool findS32(const char name[], int32_t* value = nullptr) const { + return fMeta.findS32(name, value); + } /** Return true if the event contains the named SkScalar field, and return the field in value (if value is non-null). If there is no matching named field, return false and ignore the value parameter. */ - bool findScalar(const char name[], SkScalar* value = NULL) const { return fMeta.findScalar(name, value); } + bool findScalar(const char name[], SkScalar* value = nullptr) const { + return fMeta.findScalar(name, value); + } /** Return true if the event contains the named SkScalar field, and return the fields in value[] (if value is non-null), and return the number of SkScalars in count (if count is non-null). If there is no matching named field, return false and ignore the value and count parameters. */ - const SkScalar* findScalars(const char name[], int* count, SkScalar values[] = NULL) const { return fMeta.findScalars(name, count, values); } + const SkScalar* findScalars(const char name[], int* count, SkScalar values[] = nullptr) const { + return fMeta.findScalars(name, count, values); + } /** Return the value of the named string field, or if no matching named field exists, return null. */ const char* findString(const char name[]) const { return fMeta.findString(name); } @@ -142,7 +148,7 @@ public: */ bool findPtr(const char name[], void** value) const { return fMeta.findPtr(name, value); } bool findBool(const char name[], bool* value) const { return fMeta.findBool(name, value); } - const void* findData(const char name[], size_t* byteCount = NULL) const { + const void* findData(const char name[], size_t* byteCount = nullptr) const { return fMeta.findData(name, byteCount); } @@ -164,7 +170,9 @@ public: /** Add/replace the named SkScalar field to the event. In XML use the subelement <data name=... scalar=... /> */ void setScalar(const char name[], SkScalar value) { fMeta.setScalar(name, value); } /** Add/replace the named SkScalar[] field to the event. */ - SkScalar* setScalars(const char name[], int count, const SkScalar values[] = NULL) { return fMeta.setScalars(name, count, values); } + SkScalar* setScalars(const char name[], int count, const SkScalar values[] = nullptr) { + return fMeta.setScalars(name, count, values); + } /** Add/replace the named string field to the event. In XML use the subelement <data name=... string=... */ void setString(const char name[], const SkString& value) { fMeta.setString(name, value.c_str()); } /** Add/replace the named string field to the event. In XML use the subelement <data name=... string=... */ @@ -184,7 +192,7 @@ public: /** Call this to initialize the event from the specified XML node */ void inflate(const SkDOM&, const SkDOMNode*); - SkDEBUGCODE(void dump(const char title[] = NULL);) + SkDEBUGCODE(void dump(const char title[] = nullptr);) /////////////////////////////////////////////////////////////////////////// diff --git a/samplecode/PerlinPatch.cpp b/samplecode/PerlinPatch.cpp index 59337c5e1d..acc1a4a719 100644 --- a/samplecode/PerlinPatch.cpp +++ b/samplecode/PerlinPatch.cpp @@ -102,11 +102,11 @@ public: SkPoint::Make(100.0f, 100.0f) }; fShader0 = SkGradientShader::MakeLinear(points, colors, - NULL, + nullptr, 3, SkShader::kMirror_TileMode, 0, - NULL); + nullptr); } protected: diff --git a/samplecode/SampleAAGeometry.cpp b/samplecode/SampleAAGeometry.cpp index 08a518ca17..5b07665129 100644 --- a/samplecode/SampleAAGeometry.cpp +++ b/samplecode/SampleAAGeometry.cpp @@ -758,7 +758,7 @@ struct Active { SkScalar fEnd; void reset() { - fNext = NULL; + fNext = nullptr; fStart = 0; fEnd = 1; } @@ -836,7 +836,7 @@ public: , fBisectButton('b') , fJoinButton('j') , fInOutButton('|') - , fUndo(NULL) + , fUndo(nullptr) , fActivePt(-1) , fActiveVerb(-1) , fHandlePathMove(true) @@ -882,7 +882,7 @@ public: bool constructPath() { construct_path(fPath); - this->inval(NULL); + this->inval(nullptr); return true; } @@ -908,7 +908,7 @@ public: PathUndo* next = fUndo->fNext; delete fUndo; fUndo = next; - this->inval(NULL); + this->inval(nullptr); return true; } @@ -931,7 +931,7 @@ public: bool hideAll() { fHideAll ^= true; - this->inval(NULL); + this->inval(nullptr); return true; } @@ -990,7 +990,7 @@ public: matrix.setScale(1.f / 1.5f, 1.f / 1.5f, bounds.centerX(), bounds.centerY()); fPath.transform(matrix); validatePath(); - this->inval(NULL); + this->inval(nullptr); return true; } @@ -1006,7 +1006,7 @@ public: SkScalar offsetY = (this->height() - bounds.height()) / 2 - bounds.fTop; fPath.offset(offsetX, offsetY); validatePath(); - this->inval(NULL); + this->inval(nullptr); return true; } @@ -1016,7 +1016,7 @@ public: matrix.setScale(1.5f, 1.5f, bounds.centerX(), bounds.centerY()); fPath.transform(matrix); validatePath(); - this->inval(NULL); + this->inval(nullptr); return true; } @@ -1037,7 +1037,7 @@ public: bool showLegend() { fShowLegend ^= true; - this->inval(NULL); + this->inval(nullptr); return true; } @@ -1161,7 +1161,7 @@ public: } SkPoint maxPt; SkVector tangent; - SkEvalCubicAt(pts, tMax[tIndex], &maxPt, &tangent, NULL); + SkEvalCubicAt(pts, tMax[tIndex], &maxPt, &tangent, nullptr); tangent.setLength(fWidthControl.fValLo * 2); canvas->drawLine(maxPt, {maxPt.fX + tangent.fY, maxPt.fY - tangent.fX}, fSkeletonPaint); @@ -1669,7 +1669,7 @@ public: SkIntToScalar(click->fICurr.fY - click->fIPrev.fY)); set_path_pt(fActivePt, pt, &fPath); validatePath(); - this->inval(NULL); + this->inval(nullptr); return true; } case MyClick::kPathType: @@ -1677,7 +1677,7 @@ public: fPath.offset(SkIntToScalar(click->fICurr.fX - click->fIPrev.fX), SkIntToScalar(click->fICurr.fY - click->fIPrev.fY)); validatePath(); - this->inval(NULL); + this->inval(nullptr); return true; case MyClick::kVerbType: { fActiveVerb = myClick->verbHit(); @@ -1789,7 +1789,7 @@ public: break; } setControlButtonsPos(); - this->inval(NULL); + this->inval(nullptr); return true; } diff --git a/src/c/sk_effects.cpp b/src/c/sk_effects.cpp index f3a31a54bb..d3bb62cb5e 100644 --- a/src/c/sk_effects.cpp +++ b/src/c/sk_effects.cpp @@ -54,7 +54,7 @@ sk_shader_t* sk_shader_new_linear_gradient(const sk_point_t pts[2], const sk_matrix_t* cmatrix) { SkShader::TileMode mode; if (!from_c_tilemode(cmode, &mode)) { - return NULL; + return nullptr; } SkMatrix matrix; if (cmatrix) { @@ -81,7 +81,7 @@ sk_shader_t* sk_shader_new_radial_gradient(const sk_point_t* ccenter, const sk_matrix_t* cmatrix) { SkShader::TileMode mode; if (!from_c_tilemode(cmode, &mode)) { - return NULL; + return nullptr; } SkMatrix matrix; if (cmatrix) { @@ -125,7 +125,7 @@ sk_shader_t* sk_shader_new_two_point_conical_gradient(const sk_point_t* start, const sk_matrix_t* cmatrix) { SkShader::TileMode mode; if (!from_c_tilemode(cmode, &mode)) { - return NULL; + return nullptr; } SkMatrix matrix; if (cmatrix) { @@ -180,7 +180,7 @@ void sk_maskfilter_unref(sk_maskfilter_t* cfilter) { sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t cstyle, float sigma) { SkBlurStyle style; if (!find_blurstyle(cstyle, &style)) { - return NULL; + return nullptr; } return ToMaskFilter(SkBlurMaskFilter::Make(style, sigma).release()); } diff --git a/src/core/SkBuffer.cpp b/src/core/SkBuffer.cpp index 7fd4170c8f..b7cf8b2b87 100644 --- a/src/core/SkBuffer.cpp +++ b/src/core/SkBuffer.cpp @@ -45,7 +45,7 @@ void* SkWBuffer::skip(size_t size) { } void SkWBuffer::writeNoSizeCheck(const void* buffer, size_t size) { - SkASSERT(fData == 0 || fStop == 0 || fPos + size <= fStop); + SkASSERT(fData == nullptr || fStop == nullptr || fPos + size <= fStop); if (fData && buffer) memcpy(fPos, buffer, size); fPos += size; diff --git a/src/core/SkBuffer.h b/src/core/SkBuffer.h index c9c1a8e686..dd7f95aa3c 100644 --- a/src/core/SkBuffer.h +++ b/src/core/SkBuffer.h @@ -21,12 +21,12 @@ */ class SkRBuffer : SkNoncopyable { public: - SkRBuffer() : fData(0), fPos(0), fStop(0) {} + SkRBuffer() : fData(nullptr), fPos(nullptr), fStop(nullptr) {} /** Initialize RBuffer with a data point and length. */ SkRBuffer(const void* data, size_t size) { - SkASSERT(data != 0 || size == 0); + SkASSERT(data != nullptr || size == 0); fData = (const char*)data; fPos = (const char*)data; fStop = (const char*)data + size; @@ -77,18 +77,18 @@ private: */ class SkWBuffer : SkNoncopyable { public: - SkWBuffer() : fData(0), fPos(0), fStop(0) {} + SkWBuffer() : fData(nullptr), fPos(nullptr), fStop(nullptr) {} SkWBuffer(void* data) { reset(data); } SkWBuffer(void* data, size_t size) { reset(data, size); } void reset(void* data) { fData = (char*)data; fPos = (char*)data; - fStop = 0; // no bounds checking + fStop = nullptr; // no bounds checking } void reset(void* data, size_t size) { - SkASSERT(data != 0 || size == 0); + SkASSERT(data != nullptr || size == 0); fData = (char*)data; fPos = (char*)data; fStop = (char*)data + size; diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 6edaff9bc2..f1b42e6975 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1058,7 +1058,7 @@ void SkCanvas::internalSaveLayer(const SaveLayerRec& rec, SaveLayerStrategy stra SaveLayerFlags saveLayerFlags = rec.fSaveLayerFlags; SkLazyPaint lazyP; - SkImageFilter* imageFilter = paint ? paint->getImageFilter() : NULL; + SkImageFilter* imageFilter = paint ? paint->getImageFilter() : nullptr; SkMatrix stashedMatrix = fMCRec->fMatrix; SkMatrix remainder; SkSize scale; diff --git a/src/core/SkClipStack.h b/src/core/SkClipStack.h index 466df6cab9..84acb3c51c 100644 --- a/src/core/SkClipStack.h +++ b/src/core/SkClipStack.h @@ -298,7 +298,7 @@ public: */ void getBounds(SkRect* canvFiniteBound, BoundsType* boundType, - bool* isIntersectionOfRects = NULL) const; + bool* isIntersectionOfRects = nullptr) const; SkRect bounds(const SkIRect& deviceBounds) const; bool isEmpty(const SkIRect& deviceBounds) const; @@ -464,7 +464,7 @@ public: int maxWidth, int maxHeight, SkRect* devBounds, - bool* isIntersectionOfRects = NULL) const; + bool* isIntersectionOfRects = nullptr) const; private: friend class Iter; diff --git a/src/core/SkColorTable.h b/src/core/SkColorTable.h index ef8712d1d8..c56e6fe917 100644 --- a/src/core/SkColorTable.h +++ b/src/core/SkColorTable.h @@ -37,7 +37,7 @@ public: * the index is in range (0 <= index < count). */ SkPMColor operator[](int index) const { - SkASSERT(fColors != NULL && (unsigned)index < (unsigned)fCount); + SkASSERT(fColors != nullptr && (unsigned)index < (unsigned)fCount); return fColors[index]; } diff --git a/src/core/SkDevice.h b/src/core/SkDevice.h index c531b1e18b..3bd12ab36a 100644 --- a/src/core/SkDevice.h +++ b/src/core/SkDevice.h @@ -198,7 +198,7 @@ protected: */ virtual void drawPath(const SkPath& path, const SkPaint& paint, - const SkMatrix* prePathMatrix = NULL, + const SkMatrix* prePathMatrix = nullptr, bool pathIsMutable = false) = 0; virtual void drawBitmap(const SkBitmap& bitmap, SkScalar x, @@ -340,7 +340,7 @@ protected: * it could not call drawDevice with it (but it could call drawSprite or drawBitmap). */ virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { - return NULL; + return nullptr; } // A helper function used by derived classes to log the scale factor of a bitmap or image draw. @@ -377,7 +377,7 @@ private: */ virtual void flush() {} - virtual SkImageFilterCache* getImageFilterCache() { return NULL; } + virtual SkImageFilterCache* getImageFilterCache() { return nullptr; } friend class SkNoPixelsDevice; friend class SkBitmapDevice; diff --git a/src/core/SkDraw.h b/src/core/SkDraw.h index f2941948b7..ab1fda75c7 100644 --- a/src/core/SkDraw.h +++ b/src/core/SkDraw.h @@ -39,7 +39,7 @@ public: void drawRect(const SkRect& prePaintRect, const SkPaint&, const SkMatrix* paintMatrix, const SkRect* postPaintRect) const; void drawRect(const SkRect& rect, const SkPaint& paint) const { - this->drawRect(rect, paint, NULL, NULL); + this->drawRect(rect, paint, nullptr, nullptr); } void drawRRect(const SkRRect&, const SkPaint&) const; /** @@ -57,8 +57,8 @@ public: } void drawPath(const SkPath& path, const SkPaint& paint, - SkBlitter* customBlitter = NULL) const { - this->drawPath(path, paint, NULL, false, false, customBlitter); + SkBlitter* customBlitter = nullptr) const { + this->drawPath(path, paint, nullptr, false, false, customBlitter); } /* If dstOrNull is null, computes a dst by mapping the bitmap's bounds through the matrix. */ @@ -83,10 +83,10 @@ public: * Only device A8 is supported right now. */ void drawPathCoverage(const SkPath& src, const SkPaint& paint, - SkBlitter* customBlitter = NULL) const { + SkBlitter* customBlitter = nullptr) const { bool isHairline = paint.getStyle() == SkPaint::kStroke_Style && paint.getStrokeWidth() > 0; - this->drawPath(src, paint, NULL, false, !isHairline, customBlitter); + this->drawPath(src, paint, nullptr, false, !isHairline, customBlitter); } /** Helper function that creates a mask from a path and an optional maskfilter. @@ -131,7 +131,7 @@ private: void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, bool pathIsMutable, bool drawCoverage, - SkBlitter* customBlitter = NULL) const; + SkBlitter* customBlitter = nullptr) const; void drawLine(const SkPoint[2], const SkPaint&) const; void drawDevPath(const SkPath& devPath, const SkPaint& paint, bool drawCoverage, diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp index b3766e5cc2..0d4aba72fb 100644 --- a/src/core/SkMipMap.cpp +++ b/src/core/SkMipMap.cpp @@ -791,7 +791,7 @@ int SkMipMap::countLevels() const { } bool SkMipMap::getLevel(int index, Level* levelPtr) const { - if (NULL == fLevels) { + if (nullptr == fLevels) { return false; } if (index < 0) { diff --git a/src/core/SkOSFile.h b/src/core/SkOSFile.h index 88ad958b1c..ddbcc2b264 100644 --- a/src/core/SkOSFile.h +++ b/src/core/SkOSFile.h @@ -80,10 +80,10 @@ public: class Iter { public: Iter(); - Iter(const char path[], const char suffix[] = NULL); + Iter(const char path[], const char suffix[] = nullptr); ~Iter(); - void reset(const char path[], const char suffix[] = NULL); + void reset(const char path[], const char suffix[] = nullptr); /** If getDir is true, only returns directories. Results are undefined if true and false calls are interleaved on a single iterator. diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 8aecf1b624..32ec2c560b 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -1877,8 +1877,8 @@ const SkPoint& SkPath::Iter::cons_moveTo() { void SkPath::Iter::consumeDegenerateSegments(bool exact) { // We need to step over anything that will not move the current draw point // forward before the next move is seen - const uint8_t* lastMoveVerb = 0; - const SkPoint* lastMovePt = 0; + const uint8_t* lastMoveVerb = nullptr; + const SkPoint* lastMovePt = nullptr; const SkScalar* lastMoveWeight = nullptr; SkPoint lastPt = fLastPt; while (fVerbs != fVerbStop) { diff --git a/src/core/SkTInternalLList.h b/src/core/SkTInternalLList.h index 00a8743976..ef4b74f633 100644 --- a/src/core/SkTInternalLList.h +++ b/src/core/SkTInternalLList.h @@ -15,7 +15,7 @@ */ template <typename T> class SkPtrWrapper { public: - SkPtrWrapper() : fPtr(NULL) {} + SkPtrWrapper() : fPtr(nullptr) {} SkPtrWrapper& operator =(T* ptr) { fPtr = ptr; return *this; } operator T*() const { return fPtr; } T* operator->() { return fPtr; } @@ -41,8 +41,8 @@ template <typename T> class SkPtrWrapper { template <class T> class SkTInternalLList : SkNoncopyable { public: SkTInternalLList() - : fHead(NULL) - , fTail(NULL) { + : fHead(nullptr) + , fTail(nullptr) { } void remove(T* entry) { @@ -63,25 +63,25 @@ public: fTail = prev; } - entry->fPrev = NULL; - entry->fNext = NULL; + entry->fPrev = nullptr; + entry->fNext = nullptr; #ifdef SK_DEBUG - entry->fList = NULL; + entry->fList = nullptr; #endif } void addToHead(T* entry) { - SkASSERT(NULL == entry->fPrev && NULL == entry->fNext); - SkASSERT(NULL == entry->fList); + SkASSERT(nullptr == entry->fPrev && nullptr == entry->fNext); + SkASSERT(nullptr == entry->fList); - entry->fPrev = NULL; + entry->fPrev = nullptr; entry->fNext = fHead; if (fHead) { fHead->fPrev = entry; } fHead = entry; - if (NULL == fTail) { + if (nullptr == fTail) { fTail = entry; } @@ -91,16 +91,16 @@ public: } void addToTail(T* entry) { - SkASSERT(NULL == entry->fPrev && NULL == entry->fNext); - SkASSERT(NULL == entry->fList); + SkASSERT(nullptr == entry->fPrev && nullptr == entry->fNext); + SkASSERT(nullptr == entry->fList); entry->fPrev = fTail; - entry->fNext = NULL; + entry->fNext = nullptr; if (fTail) { fTail->fNext = entry; } fTail = entry; - if (NULL == fHead) { + if (nullptr == fHead) { fHead = entry; } @@ -117,7 +117,7 @@ public: void addBefore(T* newEntry, T* existingEntry) { SkASSERT(newEntry); - if (NULL == existingEntry) { + if (nullptr == existingEntry) { this->addToTail(newEntry); return; } @@ -127,7 +127,7 @@ public: T* prev = existingEntry->fPrev; existingEntry->fPrev = newEntry; newEntry->fPrev = prev; - if (NULL == prev) { + if (nullptr == prev) { SkASSERT(fHead == existingEntry); fHead = newEntry; } else { @@ -146,7 +146,7 @@ public: void addAfter(T* newEntry, T* existingEntry) { SkASSERT(newEntry); - if (NULL == existingEntry) { + if (nullptr == existingEntry) { this->addToHead(newEntry); return; } @@ -156,7 +156,7 @@ public: T* next = existingEntry->fNext; existingEntry->fNext = newEntry; newEntry->fNext = next; - if (NULL == next) { + if (nullptr == next) { SkASSERT(fTail == existingEntry); fTail = newEntry; } else { @@ -207,7 +207,7 @@ public: kTail_IterStart }; - Iter() : fCurr(NULL) {} + Iter() : fCurr(nullptr) {} Iter(const Iter& iter) : fCurr(iter.fCurr) {} Iter& operator= (const Iter& iter) { fCurr = iter.fCurr; return *this; } @@ -228,8 +228,8 @@ public: * Return the next/previous element in the list or NULL if at the end. */ T* next() { - if (NULL == fCurr) { - return NULL; + if (nullptr == fCurr) { + return nullptr; } fCurr = fCurr->fNext; @@ -237,8 +237,8 @@ public: } T* prev() { - if (NULL == fCurr) { - return NULL; + if (nullptr == fCurr) { + return nullptr; } fCurr = fCurr->fPrev; @@ -255,12 +255,12 @@ public: Iter iter; for (T* item = iter.init(*this, Iter::kHead_IterStart); item; item = iter.next()) { SkASSERT(this->isInList(item)); - if (NULL == item->fPrev) { + if (nullptr == item->fPrev) { SkASSERT(fHead == item); } else { SkASSERT(item->fPrev->fNext == item); } - if (NULL == item->fNext) { + if (nullptr == item->fNext) { SkASSERT(fTail == item); } else { SkASSERT(item->fNext->fPrev == item); diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp index 77ec429325..c72399bed1 100644 --- a/src/core/SkTextBlob.cpp +++ b/src/core/SkTextBlob.cpp @@ -423,7 +423,7 @@ SkRect SkTextBlobBuilder::TightRunBounds(const SkTextBlob::RunRecord& run) { SkAutoSTArray<16, SkRect> glyphBounds(run.glyphCount()); paint.getTextWidths(run.glyphBuffer(), run.glyphCount() * sizeof(uint16_t), - NULL, + nullptr, glyphBounds.get()); SkASSERT(SkTextBlob::kFull_Positioning == run.positioning() || diff --git a/src/core/SkUtils.h b/src/core/SkUtils.h index 832bdbd8fd..d894467ce6 100644 --- a/src/core/SkUtils.h +++ b/src/core/SkUtils.h @@ -75,7 +75,7 @@ SkUnichar SkUTF8_PrevUnichar(const char**); into a utf8 sequence. Will be 1..kMaxBytesInUTF8Sequence, or 0 if uni is illegal. */ -size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = NULL); +size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = nullptr); /////////////////////////////////////////////////////////////////////////////// @@ -88,10 +88,10 @@ int SkUTF16_CountUnichars(const uint16_t utf16[], int numberOf16BitValues); SkUnichar SkUTF16_NextUnichar(const uint16_t**); // this guy backs up to the previus unichar value, and returns it (*--p) SkUnichar SkUTF16_PrevUnichar(const uint16_t**); -size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t utf16[] = NULL); +size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t utf16[] = nullptr); size_t SkUTF16_ToUTF8(const uint16_t utf16[], int numberOf16BitValues, - char utf8[] = NULL); + char utf8[] = nullptr); inline bool SkUnichar_IsVariationSelector(SkUnichar uni) { /* The 'true' ranges are: diff --git a/src/gpu/GrAutoLocaleSetter.h b/src/gpu/GrAutoLocaleSetter.h index 9cfa6374d4..c373b78e97 100644 --- a/src/gpu/GrAutoLocaleSetter.h +++ b/src/gpu/GrAutoLocaleSetter.h @@ -54,11 +54,11 @@ public: name = nullptr; } #endif - fLocale = newlocale(LC_ALL_MASK, name, 0); + fLocale = newlocale(LC_ALL_MASK, name, nullptr); if (fLocale) { fOldLocale = uselocale(fLocale); } else { - fOldLocale = static_cast<locale_t>(0); + fOldLocale = static_cast<locale_t>(nullptr); } #else (void) name; // suppress unused param warning. diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h index 6a1ad19d93..0143783708 100644 --- a/src/gpu/GrDrawingManager.h +++ b/src/gpu/GrDrawingManager.h @@ -60,7 +60,7 @@ public: GrPathRenderer* getPathRenderer(const GrPathRenderer::CanDrawPathArgs& args, bool allowSW, GrPathRendererChain::DrawType drawType, - GrPathRenderer::StencilSupport* stencilSupport = NULL); + GrPathRenderer::StencilSupport* stencilSupport = nullptr); void flushIfNecessary() { if (fContext->getResourceCache()->requestsFlush()) { diff --git a/src/gpu/GrGpuResourceRef.h b/src/gpu/GrGpuResourceRef.h index a56674b494..866521a912 100644 --- a/src/gpu/GrGpuResourceRef.h +++ b/src/gpu/GrGpuResourceRef.h @@ -173,7 +173,7 @@ private: */ template <typename T, GrIOType IO_TYPE> class GrPendingIOResource : SkNoncopyable { public: - GrPendingIOResource(T* resource = NULL) : fResource(NULL) { + GrPendingIOResource(T* resource = nullptr) : fResource(nullptr) { this->reset(resource); } diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index 1979570fe0..a02280854e 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -287,7 +287,7 @@ GrTexture* GrResourceProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& k SkASSERT(texture); return texture; } - return NULL; + return nullptr; } void GrResourceProvider::assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) { diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 594312071f..36c26dceb3 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -1543,7 +1543,7 @@ int GrGLGpu::getCompatibleStencilIndex(GrPixelConfig config) { 0, externalFormat, externalType, - NULL)); + nullptr)); if (GR_GL_NO_ERROR != CHECK_ALLOC_ERROR(this->glInterface())) { GL_CALL(DeleteTextures(1, &colorID)); return -1; diff --git a/src/gpu/vk/GrVkBuffer.cpp b/src/gpu/vk/GrVkBuffer.cpp index b2af229de3..a93a16e3cc 100644 --- a/src/gpu/vk/GrVkBuffer.cpp +++ b/src/gpu/vk/GrVkBuffer.cpp @@ -88,7 +88,7 @@ void GrVkBuffer::addMemoryBarrier(const GrVkGpu* gpu, bool byRegion) const { VkBufferMemoryBarrier bufferMemoryBarrier = { VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, // sType - NULL, // pNext + nullptr, // pNext srcAccessMask, // srcAccessMask dstAccesMask, // dstAccessMask VK_QUEUE_FAMILY_IGNORED, // srcQueueFamilyIndex diff --git a/src/gpu/vk/GrVkCommandBuffer.cpp b/src/gpu/vk/GrVkCommandBuffer.cpp index c44d12128e..8a17a4f033 100644 --- a/src/gpu/vk/GrVkCommandBuffer.cpp +++ b/src/gpu/vk/GrVkCommandBuffer.cpp @@ -344,7 +344,7 @@ GrVkPrimaryCommandBuffer* GrVkPrimaryCommandBuffer::Create(const GrVkGpu* gpu, VkCommandPool cmdPool) { const VkCommandBufferAllocateInfo cmdInfo = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, // sType - NULL, // pNext + nullptr, // pNext cmdPool, // commandPool VK_COMMAND_BUFFER_LEVEL_PRIMARY, // level 1 // bufferCount @@ -751,7 +751,7 @@ GrVkSecondaryCommandBuffer* GrVkSecondaryCommandBuffer::Create(const GrVkGpu* gp VkCommandPool cmdPool) { const VkCommandBufferAllocateInfo cmdInfo = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, // sType - NULL, // pNext + nullptr, // pNext cmdPool, // commandPool VK_COMMAND_BUFFER_LEVEL_SECONDARY, // level 1 // bufferCount diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index 83d28decb6..f32a83a610 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -1070,7 +1070,7 @@ void GrVkGpu::generateMipmap(GrVkTexture* tex) { VkImageAspectFlags aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT; VkImageMemoryBarrier imageMemoryBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // sType - NULL, // pNext + nullptr, // pNext VK_ACCESS_TRANSFER_WRITE_BIT, // srcAccessMask VK_ACCESS_TRANSFER_READ_BIT, // dstAccessMask VK_IMAGE_LAYOUT_GENERAL, // oldLayout @@ -1213,7 +1213,7 @@ GrBackendObject GrVkGpu::createTestingOnlyBackendTexture(void* srcData, int w, i const VkImageCreateInfo imageCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType - NULL, // pNext + nullptr, // pNext 0, // VkImageCreateFlags VK_IMAGE_TYPE_2D, // VkImageType pixelFormat, // VkFormat @@ -1295,7 +1295,7 @@ GrBackendObject GrVkGpu::createTestingOnlyBackendTexture(void* srcData, int w, i const VkCommandBufferAllocateInfo cmdInfo = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, // sType - NULL, // pNext + nullptr, // pNext fCmdPool, // commandPool VK_COMMAND_BUFFER_LEVEL_PRIMARY, // level 1 // bufferCount diff --git a/src/gpu/vk/GrVkImage.cpp b/src/gpu/vk/GrVkImage.cpp index 5a9f69d455..c3a47dcfdc 100644 --- a/src/gpu/vk/GrVkImage.cpp +++ b/src/gpu/vk/GrVkImage.cpp @@ -90,7 +90,7 @@ bool GrVkImage::InitImageInfo(const GrVkGpu* gpu, const ImageDesc& imageDesc, Gr const VkImageCreateInfo imageCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType - NULL, // pNext + nullptr, // pNext createFlags, // VkImageCreateFlags imageDesc.fImageType, // VkImageType imageDesc.fFormat, // VkFormat diff --git a/src/gpu/vk/GrVkInterface.cpp b/src/gpu/vk/GrVkInterface.cpp index 4188943b17..dedc264136 100644 --- a/src/gpu/vk/GrVkInterface.cpp +++ b/src/gpu/vk/GrVkInterface.cpp @@ -200,148 +200,148 @@ GrVkInterface::GrVkInterface(GetProc getProc, bool GrVkInterface::validate(uint32_t extensionFlags) const { // functions that are always required - if (NULL == fFunctions.fCreateInstance || - NULL == fFunctions.fDestroyInstance || - NULL == fFunctions.fEnumeratePhysicalDevices || - NULL == fFunctions.fGetPhysicalDeviceFeatures || - NULL == fFunctions.fGetPhysicalDeviceFormatProperties || - NULL == fFunctions.fGetPhysicalDeviceImageFormatProperties || - NULL == fFunctions.fGetPhysicalDeviceProperties || - NULL == fFunctions.fGetPhysicalDeviceQueueFamilyProperties || - NULL == fFunctions.fGetPhysicalDeviceMemoryProperties || - NULL == fFunctions.fCreateDevice || - NULL == fFunctions.fDestroyDevice || - NULL == fFunctions.fEnumerateInstanceExtensionProperties || - NULL == fFunctions.fEnumerateDeviceExtensionProperties || - NULL == fFunctions.fEnumerateInstanceLayerProperties || - NULL == fFunctions.fEnumerateDeviceLayerProperties || - NULL == fFunctions.fGetDeviceQueue || - NULL == fFunctions.fQueueSubmit || - NULL == fFunctions.fQueueWaitIdle || - NULL == fFunctions.fDeviceWaitIdle || - NULL == fFunctions.fAllocateMemory || - NULL == fFunctions.fFreeMemory || - NULL == fFunctions.fMapMemory || - NULL == fFunctions.fUnmapMemory || - NULL == fFunctions.fFlushMappedMemoryRanges || - NULL == fFunctions.fInvalidateMappedMemoryRanges || - NULL == fFunctions.fGetDeviceMemoryCommitment || - NULL == fFunctions.fBindBufferMemory || - NULL == fFunctions.fBindImageMemory || - NULL == fFunctions.fGetBufferMemoryRequirements || - NULL == fFunctions.fGetImageMemoryRequirements || - NULL == fFunctions.fGetImageSparseMemoryRequirements || - NULL == fFunctions.fGetPhysicalDeviceSparseImageFormatProperties || - NULL == fFunctions.fQueueBindSparse || - NULL == fFunctions.fCreateFence || - NULL == fFunctions.fDestroyFence || - NULL == fFunctions.fResetFences || - NULL == fFunctions.fGetFenceStatus || - NULL == fFunctions.fWaitForFences || - NULL == fFunctions.fCreateSemaphore || - NULL == fFunctions.fDestroySemaphore || - NULL == fFunctions.fCreateEvent || - NULL == fFunctions.fDestroyEvent || - NULL == fFunctions.fGetEventStatus || - NULL == fFunctions.fSetEvent || - NULL == fFunctions.fResetEvent || - NULL == fFunctions.fCreateQueryPool || - NULL == fFunctions.fDestroyQueryPool || - NULL == fFunctions.fGetQueryPoolResults || - NULL == fFunctions.fCreateBuffer || - NULL == fFunctions.fDestroyBuffer || - NULL == fFunctions.fCreateBufferView || - NULL == fFunctions.fDestroyBufferView || - NULL == fFunctions.fCreateImage || - NULL == fFunctions.fDestroyImage || - NULL == fFunctions.fGetImageSubresourceLayout || - NULL == fFunctions.fCreateImageView || - NULL == fFunctions.fDestroyImageView || - NULL == fFunctions.fCreateShaderModule || - NULL == fFunctions.fDestroyShaderModule || - NULL == fFunctions.fCreatePipelineCache || - NULL == fFunctions.fDestroyPipelineCache || - NULL == fFunctions.fGetPipelineCacheData || - NULL == fFunctions.fMergePipelineCaches || - NULL == fFunctions.fCreateGraphicsPipelines || - NULL == fFunctions.fCreateComputePipelines || - NULL == fFunctions.fDestroyPipeline || - NULL == fFunctions.fCreatePipelineLayout || - NULL == fFunctions.fDestroyPipelineLayout || - NULL == fFunctions.fCreateSampler || - NULL == fFunctions.fDestroySampler || - NULL == fFunctions.fCreateDescriptorSetLayout || - NULL == fFunctions.fDestroyDescriptorSetLayout || - NULL == fFunctions.fCreateDescriptorPool || - NULL == fFunctions.fDestroyDescriptorPool || - NULL == fFunctions.fResetDescriptorPool || - NULL == fFunctions.fAllocateDescriptorSets || - NULL == fFunctions.fFreeDescriptorSets || - NULL == fFunctions.fUpdateDescriptorSets || - NULL == fFunctions.fCreateFramebuffer || - NULL == fFunctions.fDestroyFramebuffer || - NULL == fFunctions.fCreateRenderPass || - NULL == fFunctions.fDestroyRenderPass || - NULL == fFunctions.fGetRenderAreaGranularity || - NULL == fFunctions.fCreateCommandPool || - NULL == fFunctions.fDestroyCommandPool || - NULL == fFunctions.fResetCommandPool || - NULL == fFunctions.fAllocateCommandBuffers || - NULL == fFunctions.fFreeCommandBuffers || - NULL == fFunctions.fBeginCommandBuffer || - NULL == fFunctions.fEndCommandBuffer || - NULL == fFunctions.fResetCommandBuffer || - NULL == fFunctions.fCmdBindPipeline || - NULL == fFunctions.fCmdSetViewport || - NULL == fFunctions.fCmdSetScissor || - NULL == fFunctions.fCmdSetLineWidth || - NULL == fFunctions.fCmdSetDepthBias || - NULL == fFunctions.fCmdSetBlendConstants || - NULL == fFunctions.fCmdSetDepthBounds || - NULL == fFunctions.fCmdSetStencilCompareMask || - NULL == fFunctions.fCmdSetStencilWriteMask || - NULL == fFunctions.fCmdSetStencilReference || - NULL == fFunctions.fCmdBindDescriptorSets || - NULL == fFunctions.fCmdBindIndexBuffer || - NULL == fFunctions.fCmdBindVertexBuffers || - NULL == fFunctions.fCmdDraw || - NULL == fFunctions.fCmdDrawIndexed || - NULL == fFunctions.fCmdDrawIndirect || - NULL == fFunctions.fCmdDrawIndexedIndirect || - NULL == fFunctions.fCmdDispatch || - NULL == fFunctions.fCmdDispatchIndirect || - NULL == fFunctions.fCmdCopyBuffer || - NULL == fFunctions.fCmdCopyImage || - NULL == fFunctions.fCmdBlitImage || - NULL == fFunctions.fCmdCopyBufferToImage || - NULL == fFunctions.fCmdCopyImageToBuffer || - NULL == fFunctions.fCmdUpdateBuffer || - NULL == fFunctions.fCmdFillBuffer || - NULL == fFunctions.fCmdClearColorImage || - NULL == fFunctions.fCmdClearDepthStencilImage || - NULL == fFunctions.fCmdClearAttachments || - NULL == fFunctions.fCmdResolveImage || - NULL == fFunctions.fCmdSetEvent || - NULL == fFunctions.fCmdResetEvent || - NULL == fFunctions.fCmdWaitEvents || - NULL == fFunctions.fCmdPipelineBarrier || - NULL == fFunctions.fCmdBeginQuery || - NULL == fFunctions.fCmdEndQuery || - NULL == fFunctions.fCmdResetQueryPool || - NULL == fFunctions.fCmdWriteTimestamp || - NULL == fFunctions.fCmdCopyQueryPoolResults || - NULL == fFunctions.fCmdPushConstants || - NULL == fFunctions.fCmdBeginRenderPass || - NULL == fFunctions.fCmdNextSubpass || - NULL == fFunctions.fCmdEndRenderPass || - NULL == fFunctions.fCmdExecuteCommands) { + if (nullptr == fFunctions.fCreateInstance || + nullptr == fFunctions.fDestroyInstance || + nullptr == fFunctions.fEnumeratePhysicalDevices || + nullptr == fFunctions.fGetPhysicalDeviceFeatures || + nullptr == fFunctions.fGetPhysicalDeviceFormatProperties || + nullptr == fFunctions.fGetPhysicalDeviceImageFormatProperties || + nullptr == fFunctions.fGetPhysicalDeviceProperties || + nullptr == fFunctions.fGetPhysicalDeviceQueueFamilyProperties || + nullptr == fFunctions.fGetPhysicalDeviceMemoryProperties || + nullptr == fFunctions.fCreateDevice || + nullptr == fFunctions.fDestroyDevice || + nullptr == fFunctions.fEnumerateInstanceExtensionProperties || + nullptr == fFunctions.fEnumerateDeviceExtensionProperties || + nullptr == fFunctions.fEnumerateInstanceLayerProperties || + nullptr == fFunctions.fEnumerateDeviceLayerProperties || + nullptr == fFunctions.fGetDeviceQueue || + nullptr == fFunctions.fQueueSubmit || + nullptr == fFunctions.fQueueWaitIdle || + nullptr == fFunctions.fDeviceWaitIdle || + nullptr == fFunctions.fAllocateMemory || + nullptr == fFunctions.fFreeMemory || + nullptr == fFunctions.fMapMemory || + nullptr == fFunctions.fUnmapMemory || + nullptr == fFunctions.fFlushMappedMemoryRanges || + nullptr == fFunctions.fInvalidateMappedMemoryRanges || + nullptr == fFunctions.fGetDeviceMemoryCommitment || + nullptr == fFunctions.fBindBufferMemory || + nullptr == fFunctions.fBindImageMemory || + nullptr == fFunctions.fGetBufferMemoryRequirements || + nullptr == fFunctions.fGetImageMemoryRequirements || + nullptr == fFunctions.fGetImageSparseMemoryRequirements || + nullptr == fFunctions.fGetPhysicalDeviceSparseImageFormatProperties || + nullptr == fFunctions.fQueueBindSparse || + nullptr == fFunctions.fCreateFence || + nullptr == fFunctions.fDestroyFence || + nullptr == fFunctions.fResetFences || + nullptr == fFunctions.fGetFenceStatus || + nullptr == fFunctions.fWaitForFences || + nullptr == fFunctions.fCreateSemaphore || + nullptr == fFunctions.fDestroySemaphore || + nullptr == fFunctions.fCreateEvent || + nullptr == fFunctions.fDestroyEvent || + nullptr == fFunctions.fGetEventStatus || + nullptr == fFunctions.fSetEvent || + nullptr == fFunctions.fResetEvent || + nullptr == fFunctions.fCreateQueryPool || + nullptr == fFunctions.fDestroyQueryPool || + nullptr == fFunctions.fGetQueryPoolResults || + nullptr == fFunctions.fCreateBuffer || + nullptr == fFunctions.fDestroyBuffer || + nullptr == fFunctions.fCreateBufferView || + nullptr == fFunctions.fDestroyBufferView || + nullptr == fFunctions.fCreateImage || + nullptr == fFunctions.fDestroyImage || + nullptr == fFunctions.fGetImageSubresourceLayout || + nullptr == fFunctions.fCreateImageView || + nullptr == fFunctions.fDestroyImageView || + nullptr == fFunctions.fCreateShaderModule || + nullptr == fFunctions.fDestroyShaderModule || + nullptr == fFunctions.fCreatePipelineCache || + nullptr == fFunctions.fDestroyPipelineCache || + nullptr == fFunctions.fGetPipelineCacheData || + nullptr == fFunctions.fMergePipelineCaches || + nullptr == fFunctions.fCreateGraphicsPipelines || + nullptr == fFunctions.fCreateComputePipelines || + nullptr == fFunctions.fDestroyPipeline || + nullptr == fFunctions.fCreatePipelineLayout || + nullptr == fFunctions.fDestroyPipelineLayout || + nullptr == fFunctions.fCreateSampler || + nullptr == fFunctions.fDestroySampler || + nullptr == fFunctions.fCreateDescriptorSetLayout || + nullptr == fFunctions.fDestroyDescriptorSetLayout || + nullptr == fFunctions.fCreateDescriptorPool || + nullptr == fFunctions.fDestroyDescriptorPool || + nullptr == fFunctions.fResetDescriptorPool || + nullptr == fFunctions.fAllocateDescriptorSets || + nullptr == fFunctions.fFreeDescriptorSets || + nullptr == fFunctions.fUpdateDescriptorSets || + nullptr == fFunctions.fCreateFramebuffer || + nullptr == fFunctions.fDestroyFramebuffer || + nullptr == fFunctions.fCreateRenderPass || + nullptr == fFunctions.fDestroyRenderPass || + nullptr == fFunctions.fGetRenderAreaGranularity || + nullptr == fFunctions.fCreateCommandPool || + nullptr == fFunctions.fDestroyCommandPool || + nullptr == fFunctions.fResetCommandPool || + nullptr == fFunctions.fAllocateCommandBuffers || + nullptr == fFunctions.fFreeCommandBuffers || + nullptr == fFunctions.fBeginCommandBuffer || + nullptr == fFunctions.fEndCommandBuffer || + nullptr == fFunctions.fResetCommandBuffer || + nullptr == fFunctions.fCmdBindPipeline || + nullptr == fFunctions.fCmdSetViewport || + nullptr == fFunctions.fCmdSetScissor || + nullptr == fFunctions.fCmdSetLineWidth || + nullptr == fFunctions.fCmdSetDepthBias || + nullptr == fFunctions.fCmdSetBlendConstants || + nullptr == fFunctions.fCmdSetDepthBounds || + nullptr == fFunctions.fCmdSetStencilCompareMask || + nullptr == fFunctions.fCmdSetStencilWriteMask || + nullptr == fFunctions.fCmdSetStencilReference || + nullptr == fFunctions.fCmdBindDescriptorSets || + nullptr == fFunctions.fCmdBindIndexBuffer || + nullptr == fFunctions.fCmdBindVertexBuffers || + nullptr == fFunctions.fCmdDraw || + nullptr == fFunctions.fCmdDrawIndexed || + nullptr == fFunctions.fCmdDrawIndirect || + nullptr == fFunctions.fCmdDrawIndexedIndirect || + nullptr == fFunctions.fCmdDispatch || + nullptr == fFunctions.fCmdDispatchIndirect || + nullptr == fFunctions.fCmdCopyBuffer || + nullptr == fFunctions.fCmdCopyImage || + nullptr == fFunctions.fCmdBlitImage || + nullptr == fFunctions.fCmdCopyBufferToImage || + nullptr == fFunctions.fCmdCopyImageToBuffer || + nullptr == fFunctions.fCmdUpdateBuffer || + nullptr == fFunctions.fCmdFillBuffer || + nullptr == fFunctions.fCmdClearColorImage || + nullptr == fFunctions.fCmdClearDepthStencilImage || + nullptr == fFunctions.fCmdClearAttachments || + nullptr == fFunctions.fCmdResolveImage || + nullptr == fFunctions.fCmdSetEvent || + nullptr == fFunctions.fCmdResetEvent || + nullptr == fFunctions.fCmdWaitEvents || + nullptr == fFunctions.fCmdPipelineBarrier || + nullptr == fFunctions.fCmdBeginQuery || + nullptr == fFunctions.fCmdEndQuery || + nullptr == fFunctions.fCmdResetQueryPool || + nullptr == fFunctions.fCmdWriteTimestamp || + nullptr == fFunctions.fCmdCopyQueryPoolResults || + nullptr == fFunctions.fCmdPushConstants || + nullptr == fFunctions.fCmdBeginRenderPass || + nullptr == fFunctions.fCmdNextSubpass || + nullptr == fFunctions.fCmdEndRenderPass || + nullptr == fFunctions.fCmdExecuteCommands) { RETURN_FALSE_INTERFACE } if (extensionFlags & kEXT_debug_report_GrVkExtensionFlag) { - if (NULL == fFunctions.fCreateDebugReportCallbackEXT || - NULL == fFunctions.fDebugReportMessageEXT || - NULL == fFunctions.fDestroyDebugReportCallbackEXT) { + if (nullptr == fFunctions.fCreateDebugReportCallbackEXT || + nullptr == fFunctions.fDebugReportMessageEXT || + nullptr == fFunctions.fDestroyDebugReportCallbackEXT) { RETURN_FALSE_INTERFACE } } diff --git a/src/gpu/vk/GrVkMemory.cpp b/src/gpu/vk/GrVkMemory.cpp index 31dea10ac4..0496a5463c 100644 --- a/src/gpu/vk/GrVkMemory.cpp +++ b/src/gpu/vk/GrVkMemory.cpp @@ -472,7 +472,7 @@ GrVkSubHeap::GrVkSubHeap(const GrVkGpu* gpu, uint32_t memoryTypeIndex, uint32_t VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, // sType - NULL, // pNext + nullptr, // pNext size, // allocationSize memoryTypeIndex, // memoryTypeIndex }; @@ -518,7 +518,7 @@ bool GrVkHeap::subAlloc(VkDeviceSize size, VkDeviceSize alignment, if (alignedSize > fSubHeapSize) { VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, // sType - NULL, // pNext + nullptr, // pNext size, // allocationSize memoryTypeIndex, // memoryTypeIndex }; diff --git a/src/ports/SkOSFile_posix.cpp b/src/ports/SkOSFile_posix.cpp index 48b5b95ad3..448a5c8c9f 100644 --- a/src/ports/SkOSFile_posix.cpp +++ b/src/ports/SkOSFile_posix.cpp @@ -110,7 +110,7 @@ size_t sk_qread(FILE* file, void* buffer, size_t count, size_t offset) { //////////////////////////////////////////////////////////////////////////// struct SkOSFileIterData { - SkOSFileIterData() : fDIR(0) { } + SkOSFileIterData() : fDIR(nullptr) { } DIR* fDIR; SkString fPath, fSuffix; }; @@ -135,7 +135,7 @@ void SkOSFile::Iter::reset(const char path[], const char suffix[]) { SkOSFileIterData& self = *static_cast<SkOSFileIterData*>(fSelf.get()); if (self.fDIR) { ::closedir(self.fDIR); - self.fDIR = 0; + self.fDIR = nullptr; } self.fPath.set(path); diff --git a/src/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp index 68c2d3d4d7..77f502a96e 100644 --- a/src/ports/SkOSFile_stdio.cpp +++ b/src/ports/SkOSFile_stdio.cpp @@ -29,8 +29,8 @@ static FILE* ios_open_from_bundle(const char path[], const char* perm) { CFBundleRef mainBundle = CFBundleGetMainBundle(); // Get a reference to the file's URL - CFStringRef pathRef = CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8); - CFURLRef imageURL = CFBundleCopyResourceURL(mainBundle, pathRef, NULL, NULL); + CFStringRef pathRef = CFStringCreateWithCString(nullptr, path, kCFStringEncodingUTF8); + CFURLRef imageURL = CFBundleCopyResourceURL(mainBundle, pathRef, nullptr, nullptr); CFRelease(pathRef); if (!imageURL) { return nullptr; @@ -81,7 +81,7 @@ FILE* sk_fopen(const char path[], SkFILE_Flags flags) { } #endif if (nullptr == file && (flags & kWrite_SkFILE_Flag)) { - SkDEBUGF(("sk_fopen: fopen(\"%s\", \"%s\") returned NULL (errno:%d): %s\n", + SkDEBUGF(("sk_fopen: fopen(\"%s\", \"%s\") returned nullptr (errno:%d): %s\n", path, perm, errno, strerror(errno))); } return file; diff --git a/src/views/SkEventSink.cpp b/src/views/SkEventSink.cpp index 5732feb395..cd83111f50 100644 --- a/src/views/SkEventSink.cpp +++ b/src/views/SkEventSink.cpp @@ -233,7 +233,7 @@ SkEventSink::EventResult SkEventSink::DoEvent(const SkEvent& evt) { SkEventSink* SkEventSink::FindSink(SkEventSinkID sinkID) { if (sinkID == 0) - return 0; + return nullptr; SkEventSink_Globals& globals = getGlobals(); SkAutoMutexAcquire ac(globals.fSinkMutex); diff --git a/src/xml/SkDOM.h b/src/xml/SkDOM.h index e72bcadea8..c3862a3ada 100644 --- a/src/xml/SkDOM.h +++ b/src/xml/SkDOM.h @@ -45,8 +45,8 @@ public: Type getType(const Node*) const; const char* getName(const Node*) const; - const Node* getFirstChild(const Node*, const char elem[] = NULL) const; - const Node* getNextSibling(const Node*, const char elem[] = NULL) const; + const Node* getFirstChild(const Node*, const char elem[] = nullptr) const; + const Node* getNextSibling(const Node*, const char elem[] = nullptr) const; const char* findAttr(const Node*, const char attrName[]) const; const Attr* getFirstAttr(const Node*) const; @@ -55,7 +55,7 @@ public: const char* getAttrValue(const Node*, const Attr*) const; // helpers for walking children - int countChildren(const Node* node, const char elem[] = NULL) const; + int countChildren(const Node* node, const char elem[] = nullptr) const; // helpers for calling SkParse bool findS32(const Node*, const char name[], int32_t* value) const; diff --git a/src/xml/SkXMLParser.h b/src/xml/SkXMLParser.h index 3f69013ce6..a20c7631e1 100644 --- a/src/xml/SkXMLParser.h +++ b/src/xml/SkXMLParser.h @@ -53,7 +53,7 @@ private: class SkXMLParser { public: - SkXMLParser(SkXMLParserError* parserError = NULL); + SkXMLParser(SkXMLParserError* parserError = nullptr); virtual ~SkXMLParser(); /** Returns true for success diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index 766bbefec2..ed74850437 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -426,7 +426,7 @@ DEF_TEST(SkPDF_FontCanEmbedTypeface, reporter) { !SkPDFFont::CanEmbedTypeface(noEmbedTypeface.get(), &canon)); } sk_sp<SkTypeface> portableTypeface( - sk_tool_utils::create_portable_typeface(NULL, SkFontStyle())); + sk_tool_utils::create_portable_typeface(nullptr, SkFontStyle())); REPORTER_ASSERT(reporter, SkPDFFont::CanEmbedTypeface(portableTypeface.get(), &canon)); } diff --git a/tests/PathOpsBattles.cpp b/tests/PathOpsBattles.cpp index 32ba96c2b8..9927cde9e4 100644 --- a/tests/PathOpsBattles.cpp +++ b/tests/PathOpsBattles.cpp @@ -10682,7 +10682,7 @@ path.close(); } static void (*firstTest)(skiatest::Reporter* , const char* filename) = battleOp183; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; static struct TestDesc tests[] = { TEST(battleOp1), diff --git a/tests/PathOpsBuildUseTest.cpp b/tests/PathOpsBuildUseTest.cpp index 67e42520aa..0d7200886e 100644 --- a/tests/PathOpsBuildUseTest.cpp +++ b/tests/PathOpsBuildUseTest.cpp @@ -2415,8 +2415,8 @@ path.close(); builder.resolve(&path); } -static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*firstTest)(skiatest::Reporter* , const char* filename) = nullptr; +static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; static struct TestDesc tests[] = { TEST(build1_1), diff --git a/tests/PathOpsChalkboardTest.cpp b/tests/PathOpsChalkboardTest.cpp index 8c74e7f98d..88fe8190c0 100644 --- a/tests/PathOpsChalkboardTest.cpp +++ b/tests/PathOpsChalkboardTest.cpp @@ -165,9 +165,9 @@ static void chalkboard_1(skiatest::Reporter* reporter, const char* filename) { chalkboard(reporter, testlines); } -static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*skipTest)(skiatest::Reporter* , const char* filename) = nullptr; +static void (*firstTest)(skiatest::Reporter* , const char* filename) = nullptr; +static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; static TestDesc tests[] = { TEST(chalkboard_1), diff --git a/tests/PathOpsFuzz763Test.cpp b/tests/PathOpsFuzz763Test.cpp index 90d5723774..c9d13fc0b3 100644 --- a/tests/PathOpsFuzz763Test.cpp +++ b/tests/PathOpsFuzz763Test.cpp @@ -2395,9 +2395,9 @@ path.close(); testPathOp(reporter, path1, path2, (SkPathOp) 2, filename); } -static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*skipTest)(skiatest::Reporter* , const char* filename) = nullptr; static void (*firstTest)(skiatest::Reporter* , const char* filename) = fuzz763_1026368; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; static struct TestDesc tests[] = { TEST(fuzz763_10022998), diff --git a/tests/PathOpsIssue3651.cpp b/tests/PathOpsIssue3651.cpp index bd4ed2d9ab..7b0392c2bb 100644 --- a/tests/PathOpsIssue3651.cpp +++ b/tests/PathOpsIssue3651.cpp @@ -1659,9 +1659,9 @@ path.close(); } -static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*skipTest)(skiatest::Reporter* , const char* filename) = nullptr; static void (*firstTest)(skiatest::Reporter* , const char* filename) = issue3651_1; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; static struct TestDesc tests[] = { TEST(issue3651_6), diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp index 6cc9dc7c9e..e18774ae94 100644 --- a/tests/PathOpsOpTest.cpp +++ b/tests/PathOpsOpTest.cpp @@ -1,5416 +1,5416 @@ -/* - * Copyright 2012 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#include "PathOpsExtendedTest.h" -#include "PathOpsTestCommon.h" - -class PathTest_Private { -public: - PathTest_Private(SkPath* path) - : fPath(path) {} - - void setPt(int index, SkScalar x, SkScalar y) { - fPath->setPt(index, x, y); - } - - SkPath* fPath; -}; - -static void path_edit(const SkPoint& from, const SkPoint& to, SkPath* path) { - PathTest_Private testPath(path); - for (int index = 0; index < path->countPoints(); ++index) { - if (SkDPoint::ApproximatelyEqual(path->getPoint(index), from)) { - testPath.setPt(index, to.fX, to.fY); - return; - } - } -} - -static void cubicOp1d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,2, 1,0, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,1, 1,0, 2,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp2d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,1, 1,0, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,1, 2,0, 1,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp3d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,3, 1,0, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,1, 1,0, 3,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp5d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,2, 1,0, 2,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,2, 1,0, 2,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp6d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,6, 1,0, 3,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,3, 1,0, 6,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp7d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,4, 1,0, 3,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,3, 1,0, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp8d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,5, 1,0, 4,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,4, 1,0, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp9d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,6, 1,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(1,2, 1,0, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void quadOp9d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.quadTo(1,6, 1.5f,1); - path.quadTo(1.5f,0.5f, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.quadTo(1,2, 1.4f,1); - pathB.quadTo(3,0.4f, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void lineOp9d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.lineTo(1,6); - path.lineTo(1.5f,1); - path.lineTo(1.8f,0.8f); - path.lineTo(2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.lineTo(1,2); - pathB.lineTo(1.4f,1); - pathB.lineTo(3,0.4f); - pathB.lineTo(6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp1i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,2, 1,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(1,2, 1,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp10d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,3, 1,0, 4,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(1,4, 1,0, 3,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp11d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,4, 1,0, 5,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(1,5, 1,0, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp12d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,6, 1,0, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,1, 1,0, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp13d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(4,5, 1,0, 5,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(3,5, 1,0, 5,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp14d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,2, 2,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(1,2, 1,0, 2,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp15d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,6, 2,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(1,2, 1,0, 6,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp16d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,1, 3,0, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,3); - pathB.cubicTo(0,1, 2,0, 1,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp17d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,2, 4,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(1,2, 2,0, 2,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp18d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,5, 2,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(1,2, 1,0, 5,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp19i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,1, 2,1, 6,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(2,6, 2,0, 1,0); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp20d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,1, 6,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(1,2, 1,0, 1,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp21d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,1, 2,1, 6,5); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(5,6, 1,0, 1,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp22d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,3, 3,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,3); - pathB.cubicTo(1,2, 1,0, 3,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp23d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,2, 4,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(1,2, 1,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp24d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,2, 2,0, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(2,3, 1,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testIntersect1(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kIntersect_SkPathOp, filename); -} - -static void testUnion1(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kUnion_SkPathOp, filename); -} - -static void testDiff1(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kDifference_SkPathOp, filename); -} - -static void testXor1(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kXOR_SkPathOp, filename); -} - -static void testIntersect2(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kIntersect_SkPathOp, filename); -} - -static void testUnion2(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kUnion_SkPathOp, filename); -} - -static void testDiff2(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kDifference_SkPathOp, filename); -} - -static void testXor2(skiatest::Reporter* reporter, const char* filename) { - SkPath one, two; - one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); - testPathOp(reporter, one, two, kXOR_SkPathOp, filename); -} - -static void testOp1d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testOp2d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testOp3d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(1, 1, 2, 2, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testOp1u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void testOp4d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testOp5d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testOp6d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testOp7d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testOp2u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); - pathB.addRect(1, 1, 2, 2, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void testOp8d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.addRect(0, 0, 640, 480); - pathB.moveTo(577330, 1971.72f); - pathB.cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} -static void cubicOp25i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,4, 5,0, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(2,3, 1,0, 4,2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp26d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,4, 4,0, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(2,3, 1,0, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp27d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,6, 1,0, 5,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(2,5, 1,0, 6,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp28u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,4, 6,0, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(2,3, 1,0, 4,1); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp29d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,5, 6,0, 4,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(2,4, 1,0, 5,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp30d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,5, 6,0, 5,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(3,5, 1,0, 5,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp31d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,3, 2,1, 4,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(0,4, 2,0, 3,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp31u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,3, 2,1, 4,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(0,4, 2,0, 3,0); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp31x(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,3, 2,1, 4,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(0,4, 2,0, 3,0); - pathB.close(); - testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); -} - -static void cubicOp32d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,2, 6,0, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(1,3, 1,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp33i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,2, 6,0, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(1,3, 1,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp34d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,5, 2,1, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(1,3, 1,0, 5,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp35d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,5, 2,1, 4,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(0,4, 1,0, 5,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp36u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,6, 2,0, 5,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(1,5, 1,0, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp37d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,6, 6,1, 4,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,6); - pathB.cubicTo(3,4, 1,0, 6,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp38d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,6, 3,2, 4,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(1,4, 1,0, 6,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp39d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,3, 5,1, 4,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,5); - pathB.cubicTo(3,4, 1,0, 3,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp40d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,5, 3,2, 4,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(2,4, 1,0, 5,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp41i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,6, 4,3, 6,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3,4); - pathB.cubicTo(4,6, 1,0, 6,2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp42d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,2, 6,5, 5,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(5,6); - pathB.cubicTo(4,5, 1,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp43d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(1,2, 4,0, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(1,3, 2,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp44d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(3,6, 4,0, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(2,3, 2,0, 6,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp45d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(2,4, 4,0, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(2,3, 2,0, 4,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp46d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(3,5, 5,0, 4,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(2,4, 2,0, 5,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp47d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,6, 6,2, 5,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,6); - pathB.cubicTo(4,5, 1,0, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp48d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(2,3, 5,1, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,5); - pathB.cubicTo(2,3, 2,0, 3,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp49d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(1,5, 3,2, 4,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(1,4, 2,0, 5,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp50d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,3); - path.cubicTo(1,6, 5,0, 5,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(1,5, 3,0, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp51d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,3); - path.cubicTo(1,2, 4,1, 6,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,4); - pathB.cubicTo(0,6, 3,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp52d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(1,2, 5,4, 4,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(4,5); - pathB.cubicTo(3,4, 2,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp53d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,3); - path.cubicTo(1,2, 5,3, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3,5); - pathB.cubicTo(1,2, 3,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp54d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,4); - path.cubicTo(1,3, 5,4, 4,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(4,5); - pathB.cubicTo(2,4, 4,0, 3,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp55d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,5); - path.cubicTo(1,3, 3,2, 5,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(0,5, 5,0, 3,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp56d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,6, 5,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(1,2, 1,0, 6,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp57d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,5); - path.cubicTo(0,5, 5,4, 6,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(4,5); - pathB.cubicTo(4,6, 5,0, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp58d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,5); - path.cubicTo(3,4, 6,5, 5,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(5,6); - pathB.cubicTo(3,5, 5,0, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp59d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(5,6, 4,0, 4,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(1,4, 1,0, 6,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp60d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(4,6, 6,0, 5,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(2,5, 2,0, 6,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp61d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1,2); - path.cubicTo(0,5, 3,2, 6,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(1,6, 2,1, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp62d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1,3); - path.cubicTo(5,6, 5,3, 5,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3,5); - pathB.cubicTo(4,5, 3,1, 6,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp63d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2,3); - path.cubicTo(0,4, 3,2, 5,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(3,5, 3,2, 4,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp64d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(0,1, 1,0, 3,0); - path.lineTo(0,1); - path.close(); - pathB.moveTo(0,1); - pathB.cubicTo(0,3, 1,0, 1,0); - pathB.lineTo(0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp65d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(1,5, 1,0, 1,0); - path.lineTo(0,1); - path.close(); - pathB.moveTo(0,1); - pathB.cubicTo(0,1, 1,0, 5,1); - pathB.lineTo(0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void rectOp1d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(0,1, 1,0, 3,0); - path.lineTo(0,1); - path.close(); - pathB.moveTo(0,1); - pathB.cubicTo(0,3, 1,0, 1,0); - pathB.lineTo(0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp66u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,6, 4,2, 5,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,4); - pathB.cubicTo(3,5, 1,0, 6,2); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp67u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(3,5); - path.cubicTo(1,6, 5,0, 3,1); - path.lineTo(3,5); - path.close(); - pathB.moveTo(0,5); - pathB.cubicTo(1,3, 5,3, 6,1); - pathB.lineTo(0,5); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp68u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,5); - path.cubicTo(4,5, 4,1, 5,0); - path.close(); - pathB.moveTo(1,4); - pathB.cubicTo(0,5, 5,0, 5,4); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp69d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(1,3); - path.cubicTo(0,1, 3,1, 2,0); - path.close(); - pathB.moveTo(1,3); - pathB.cubicTo(0,2, 3,1, 1,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -SkPathOp ops[] = { - kUnion_SkPathOp, - kXOR_SkPathOp, - kReverseDifference_SkPathOp, - kXOR_SkPathOp, - kReverseDifference_SkPathOp, -}; - -static void rRect1(skiatest::Reporter* reporter, const char* filename) { - SkScalar xA = 0.65f; - SkScalar xB = 10.65f; - SkScalar xC = 20.65f; - SkScalar xD = 30.65f; - SkScalar xE = 40.65f; - SkScalar xF = 50.65f; - - SkScalar yA = 0.65f; - SkScalar yB = 10.65f; - SkScalar yC = 20.65f; - SkScalar yD = 30.65f; - SkScalar yE = 40.65f; - SkScalar yF = 50.65f; - SkPath paths[5]; - SkRect rects[5]; - rects[0].set(xB, yB, xE, yE); - paths[0].addRoundRect(rects[0], SkIntToScalar(5), SkIntToScalar(5)); // red - rects[1].set(xA, yA, xD, yD); - paths[1].addRoundRect(rects[1], SkIntToScalar(5), SkIntToScalar(5)); // green - rects[2].set(xC, yA, xF, yD); - paths[2].addRoundRect(rects[2], SkIntToScalar(5), SkIntToScalar(5)); // blue - rects[3].set(xA, yC, xD, yF); - paths[3].addRoundRect(rects[3], SkIntToScalar(5), SkIntToScalar(5)); // yellow - rects[4].set(xC, yC, xF, yF); - paths[4].addRoundRect(rects[4], SkIntToScalar(5), SkIntToScalar(5)); // cyan - SkPath path; - path.setFillType(SkPath::kInverseEvenOdd_FillType); - for (int index = 0; index < 5; ++index) { - testPathOp(reporter, path, paths[index], ops[index], filename); - REPORTER_ASSERT(reporter, Op(path, paths[index], ops[index], &path)); - } -} - -static void skp1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(189,7); - path.cubicTo(189,5.34314585f, 190.34314f,4, 192,4); - path.lineTo(243,4); - path.cubicTo(244.65686f,4, 246,5.34314585f, 246,7); - path.lineTo(246,21); - path.cubicTo(246,22.6568546f, 244.65686f,24, 243,24); - path.lineTo(192,24); - path.cubicTo(190.34314f,24, 189,22.6568546f, 189,21); - path.lineTo(189,7); - path.close(); - path.moveTo(191,8); - path.cubicTo(191,6.89543009f, 191.895432f,6, 193,6); - path.lineTo(242,6); - path.cubicTo(243.104568f,6, 244,6.89543009f, 244,8); - path.lineTo(244,20); - path.cubicTo(244,21.1045704f, 243.104568f,22, 242,22); - path.lineTo(193,22); - path.cubicTo(191.895432f,22, 191,21.1045704f, 191,20); - path.lineTo(191,8); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(189,4); - pathB.lineTo(199,14); - pathB.lineTo(236,14); - pathB.lineTo(246,4); - pathB.lineTo(189,4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skp2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(253.000000f, 11757.0000f); - path.lineTo(253.000000f, 222.000000f); - path.lineTo(823.000000f, 222.000000f); - path.lineTo(823.000000f, 11757.0000f); - path.lineTo(253.000000f, 11757.0000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(258.000000f, 1028.00000f); - pathB.lineTo(258.000000f, 1027.00000f); - pathB.lineTo(823.000000f, 1027.00000f); - pathB.lineTo(823.000000f, 1028.00000f); - pathB.lineTo(258.000000f, 1028.00000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skp3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(717.000000f, 507.000000f); - path.lineTo(717.000000f, 425.000000f); - path.lineTo(973.000000f, 425.000000f); - path.lineTo(973.000000f, 507.000000f); - path.quadTo(973.000000f, 508.242645f, 972.121582f, 509.121613f); - path.quadTo(971.242615f, 510.000000f, 970.000000f, 510.000000f); - path.lineTo(720.000000f, 510.000000f); - path.quadTo(718.757385f, 510.000000f, 717.878418f, 509.121613f); - path.quadTo(717.000000f, 508.242645f, 717.000000f, 507.000000f); - path.close(); - path.moveTo(719.000000f, 426.000000f); - path.lineTo(971.000000f, 426.000000f); - path.lineTo(971.000000f, 506.000000f); - path.cubicTo(971.000000f, 507.104584f, 970.104553f, 508.000000f, 969.000000f, 508.000000f); - path.lineTo(721.000000f, 508.000000f); - path.cubicTo(719.895447f, 508.000000f, 719.000000f, 507.104584f, 719.000000f, 506.000000f); - path.lineTo(719.000000f, 426.000000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(717.000000f, 510.000000f); - pathB.lineTo(760.000000f, 467.000000f); - pathB.lineTo(930.000000f, 467.000000f); - pathB.lineTo(973.000000f, 510.000000f); - pathB.lineTo(717.000000f, 510.000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skp4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(230.756805f, 591.756775f); - path.quadTo(232.514725f, 590.000000f, 235.000000f, 590.000000f); - path.lineTo(300.000000f, 590.000000f); - path.quadTo(302.485291f, 590.000000f, 304.243195f, 591.756775f); - path.quadTo(306.000000f, 593.514709f, 306.000000f, 596.000000f); - path.lineTo(306.000000f, 617.000000f); - path.lineTo(229.000000f, 617.000000f); - path.lineTo(229.000000f, 596.000000f); - path.quadTo(229.000000f, 593.514709f, 230.756805f, 591.756775f); - path.close(); - path.moveTo(231.000000f, 597.000000f); - path.cubicTo(231.000000f, 594.238586f, 233.238571f, 592.000000f, 236.000000f, 592.000000f); - path.lineTo(299.000000f, 592.000000f); - path.cubicTo(301.761414f, 592.000000f, 304.000000f, 594.238586f, 304.000000f, 597.000000f); - path.lineTo(304.000000f, 616.000000f); - path.lineTo(231.000000f, 616.000000f); - path.lineTo(231.000000f, 597.000000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(306.000000f, 590.000000f); - pathB.lineTo(292.000000f, 604.000000f); - pathB.lineTo(305.000000f, 617.000000f); - pathB.lineTo(306.000000f, 617.000000f); - pathB.lineTo(306.000000f, 590.000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skp5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(18.0000000f, 226.000000f); - path.quadTo(14.6862917f, 226.000000f, 12.3423996f, 228.342407f); - path.quadTo(10.0000000f, 230.686295f, 10.0000000f, 234.000000f); - path.lineTo(10.0000000f, 253.000000f); - path.lineTo(1247.00000f, 253.000000f); - path.lineTo(1247.00000f, 234.000000f); - path.quadTo(1247.00000f, 230.686295f, 1244.65759f, 228.342407f); - path.quadTo(1242.31372f, 226.000000f, 1239.00000f, 226.000000f); - path.lineTo(18.0000000f, 226.000000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kInverseWinding_FillType); - pathB.moveTo(18.0000000f, 226.000000f); - pathB.lineTo(1239.00000f, 226.000000f); - pathB.cubicTo(1243.41833f, 226.000000f, 1247.00000f, 229.581726f, 1247.00000f, 234.000000f); - pathB.lineTo(1247.00000f, 252.000000f); - pathB.lineTo(10.0000000f, 252.000000f); - pathB.lineTo(10.0000000f, 234.000000f); - pathB.cubicTo(10.0000000f, 229.581726f, 13.5817204f, 226.000000f, 18.0000000f, 226.000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp70d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,5, 4,0, 5,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(0,5, 1,0, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp71d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,5, 4,1, 6,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,4); - pathB.cubicTo(4,6, 1,0, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp72i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,5, 5,2, 5,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,5); - pathB.cubicTo(4,5, 1,0, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp73d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,4, 4,0, 6,4); - path.lineTo(0,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(4,6, 1,0, 4,3); - pathB.lineTo(0,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp74d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,5, 5,1, 5,1); - path.lineTo(0,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,5); - pathB.cubicTo(1,5, 1,0, 5,1); - pathB.lineTo(1,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp75d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,4, 5,1, 6,4); - path.lineTo(0,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,5); - pathB.cubicTo(4,6, 1,0, 4,0); - pathB.lineTo(1,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp76u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,2, 2,0, 5,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(3,5, 1,0, 2,0); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp77i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,1); - path.cubicTo(1,3, 2,0, 3,2); - path.lineTo(0,1); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(2,3, 1,0, 3,1); - pathB.lineTo(0,2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp78u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1,6); - path.cubicTo(1,6, 5,0, 6,1); - path.lineTo(1,6); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(1,6, 6,1, 6,1); - pathB.lineTo(0,5); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp79u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,3, 1,0, 6,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(4,6, 1,0, 3,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp80i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,3, 2,1, 4,3); - path.lineTo(0,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(3,4, 1,0, 3,2); - pathB.lineTo(1,2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp81d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(4,6, 4,3, 5,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3,4); - pathB.cubicTo(4,5, 1,0, 6,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp82i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,1); - path.cubicTo(2,3, 5,2, 3,0); - path.lineTo(0,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,5); - pathB.cubicTo(0,3, 1,0, 3,2); - pathB.lineTo(2,5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp83i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,3, 2,1, 4,1); - path.lineTo(0,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(1,4, 1,0, 3,0); - pathB.lineTo(1,2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp84d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,4); - path.cubicTo(2,3, 6,3, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3,6); - pathB.cubicTo(2,3, 4,0, 3,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void skpClip1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1126.17114f, 877.171204f); - path.quadTo(1127.34314f, 876.000000f, 1129.00000f, 876.000000f); - path.lineTo(1243.00000f, 876.000000f); - path.quadTo(1244.65686f, 876.000000f, 1245.82886f, 877.171204f); - path.quadTo(1247.00000f, 878.343140f, 1247.00000f, 880.000000f); - path.lineTo(1247.00000f, 907.000000f); - path.lineTo(1246.00000f, 907.000000f); - path.lineTo(1246.00000f, 880.000000f); - path.cubicTo(1246.00000f, 878.343140f, 1244.65686f, 877.000000f, 1243.00000f, 877.000000f); - path.lineTo(1129.00000f, 877.000000f); - path.cubicTo(1127.34314f, 877.000000f, 1126.00000f, 878.343140f, 1126.00000f, 880.000000f); - path.lineTo(1126.00000f, 907.000000f); - path.lineTo(1125.00000f, 907.000000f); - path.lineTo(1125.00000f, 880.000000f); - path.quadTo(1125.00000f, 878.343140f, 1126.17114f, 877.171204f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1247.00000f, 876.000000f); - pathB.lineTo(1231.00000f, 892.000000f); - pathB.lineTo(1246.00000f, 907.000000f); - pathB.lineTo(1247.00000f, 907.000000f); - pathB.lineTo(1247.00000f, 876.000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpClip2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(134.000000f, 11414.0000f); - path.cubicTo(131.990234f, 11414.0000f, 130.326660f, 11415.4824f, 130.042755f, 11417.4131f); - path.cubicTo(130.233124f, 11418.3193f, 131.037079f, 11419.0000f, 132.000000f, 11419.0000f); - path.lineTo(806.000000f, 11419.0000f); - path.cubicTo(806.962891f, 11419.0000f, 807.766907f, 11418.3193f, 807.957275f, 11417.4131f); - path.cubicTo(807.673401f, 11415.4824f, 806.009766f, 11414.0000f, 804.000000f, 11414.0000f); - path.lineTo(134.000000f, 11414.0000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kInverseWinding_FillType); - pathB.moveTo(132.000000f, 11415.0000f); - pathB.lineTo(806.000000f, 11415.0000f); - pathB.cubicTo(807.104553f, 11415.0000f, 808.000000f, 11415.4473f, 808.000000f, 11416.0000f); - pathB.lineTo(808.000000f, 11417.0000f); - pathB.cubicTo(808.000000f, 11418.1045f, 807.104553f, 11419.0000f, 806.000000f, 11419.0000f); - pathB.lineTo(132.000000f, 11419.0000f); - pathB.cubicTo(130.895432f, 11419.0000f, 130.000000f, 11418.1045f, 130.000000f, 11417.0000f); - pathB.lineTo(130.000000f, 11416.0000f); - pathB.cubicTo(130.000000f, 11415.4473f, 130.895432f, 11415.0000f, 132.000000f, 11415.0000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skp96prezzi1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(157.464005f, 670.463989f); - path.quadTo(158.928925f, 669.000000f, 161.000000f, 669.000000f); - path.lineTo(248.000000f, 669.000000f); - path.quadTo(250.071075f, 669.000000f, 251.535995f, 670.463989f); - path.quadTo(253.000000f, 671.928955f, 253.000000f, 674.000000f); - path.lineTo(253.000000f, 706.000000f); - path.lineTo(251.000000f, 706.000000f); - path.lineTo(251.000000f, 675.000000f); - path.cubicTo(251.000000f, 672.790833f, 249.209137f, 671.000000f, 247.000000f, 671.000000f); - path.lineTo(162.000000f, 671.000000f); - path.cubicTo(159.790863f, 671.000000f, 158.000000f, 672.790833f, 158.000000f, 675.000000f); - path.lineTo(158.000000f, 706.000000f); - path.lineTo(156.000000f, 706.000000f); - path.lineTo(156.000000f, 674.000000f); - path.quadTo(156.000000f, 671.928955f, 157.464005f, 670.463989f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(156.000000f, 669.000000f); - pathB.lineTo(178.500000f, 691.500000f); - pathB.lineTo(230.500000f, 691.500000f); - pathB.lineTo(253.000000f, 669.000000f); - pathB.lineTo(156.000000f, 669.000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpancestry_com1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(161.000000f, 925.000000f); - path.cubicTo(159.874390f, 925.000000f, 158.835663f, 925.371948f, 158.000000f, 925.999634f); - path.lineTo(158.000000f, 926.000000f); - path.lineTo(1108.00000f, 926.000000f); - path.lineTo(1108.00000f, 925.999634f); - path.cubicTo(1107.16443f, 925.371948f, 1106.12561f, 925.000000f, 1105.00000f, 925.000000f); - path.lineTo(161.000000f, 925.000000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(161.000000f, 926.000000f); - pathB.lineTo(1105.00000f, 926.000000f); - pathB.cubicTo(1107.20911f, 926.000000f, 1109.00000f, 927.790833f, 1109.00000f, 930.000000f); - pathB.lineTo(1109.00000f, 956.000000f); - pathB.cubicTo(1109.00000f, 958.209167f, 1107.20911f, 960.000000f, 1105.00000f, 960.000000f); - pathB.lineTo(161.000000f, 960.000000f); - pathB.cubicTo(158.790863f, 960.000000f, 157.000000f, 958.209167f, 157.000000f, 956.000000f); - pathB.lineTo(157.000000f, 930.000000f); - pathB.cubicTo(157.000000f, 927.790833f, 158.790863f, 926.000000f, 161.000000f, 926.000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpeldorado_com_ua1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(286.695129f, 291.000000f); - path.lineTo(229.304855f, 561.000000f); - path.lineTo(979.304871f, 561.000000f); - path.lineTo(1036.69507f, 291.000000f); - path.lineTo(286.695129f, 291.000000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1006.69513f, 291.000000f); - pathB.cubicTo(1023.26367f, 291.000000f, 1033.84021f, 304.431458f, 1030.31836f, 321.000000f); - pathB.lineTo(985.681519f, 531.000000f); - pathB.cubicTo(982.159790f, 547.568542f, 965.873413f, 561.000000f, 949.304871f, 561.000000f); - pathB.lineTo(259.304871f, 561.000000f); - pathB.cubicTo(242.736313f, 561.000000f, 232.159805f, 547.568542f, 235.681549f, 531.000000f); - pathB.lineTo(280.318420f, 321.000000f); - pathB.cubicTo(283.840179f, 304.431458f, 300.126587f, 291.000000f, 316.695129f, 291.000000f); - pathB.lineTo(1006.69513f, 291.000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpbyte_com1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(968.000000f, 14.0000000f); - path.cubicTo(965.238586f, 14.0000000f, 963.000000f, 16.2385769f, 963.000000f, 19.0000000f); - path.lineTo(963.000000f, 32.0000000f); - path.cubicTo(963.000000f, 34.7614250f, 965.238586f, 37.0000000f, 968.000000f, 37.0000000f); - path.lineTo(1034.00000f, 37.0000000f); - path.cubicTo(1036.76147f, 37.0000000f, 1039.00000f, 34.7614250f, 1039.00000f, 32.0000000f); - path.lineTo(1039.00000f, 19.0000000f); - path.cubicTo(1039.00000f, 16.2385769f, 1036.76147f, 14.0000000f, 1034.00000f, 14.0000000f); - path.lineTo(968.000000f, 14.0000000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kInverseWinding_FillType); - pathB.moveTo(968.000000f, 14.0000000f); - pathB.lineTo(1034.00000f, 14.0000000f); - pathB.cubicTo(1036.76147f, 14.0000000f, 1039.00000f, 16.2385750f, 1039.00000f, 19.0000000f); - pathB.lineTo(1039.00000f, 32.0000000f); - pathB.cubicTo(1039.00000f, 34.2091408f, 1036.76147f, 36.0000000f, 1034.00000f, 36.0000000f); - pathB.lineTo(968.000000f, 36.0000000f); - pathB.cubicTo(965.238586f, 36.0000000f, 963.000000f, 34.2091408f, 963.000000f, 32.0000000f); - pathB.lineTo(963.000000f, 19.0000000f); - pathB.cubicTo(963.000000f, 16.2385750f, 965.238586f, 14.0000000f, 968.000000f, 14.0000000f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skphealth_com76(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(708.099182f, 7.09919119f); - path.lineTo(708.099182f, 7.09920025f); - path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); - path.lineTo(704.000000f, 33.0000000f); - path.lineTo(705.000000f, 33.0000000f); - path.lineTo(705.000000f, 17.0000000f); - path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f); - path.lineTo(708.099182f, 7.09919119f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(704.000000f, 3.00000000f); - pathB.lineTo(704.000000f, 33.0000000f); - pathB.lineTo(705.000000f, 33.0000000f); - pathB.lineTo(719.500000f, 3.00000000f); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpahrefs_com88(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1099.82886f, 7.17117119f); - path.lineTo(1099.12134f, 7.87867832f); - path.cubicTo(1099.66418f, 8.42157173f, 1100.00000f, 9.17157173f, 1100.00000f, 10.0000000f); - path.lineTo(1100.00000f, 28.0000000f); - path.cubicTo(1100.00000f, 29.6568546f, 1098.65686f, 31.0000000f, 1097.00000f, 31.0000000f); - path.lineTo(1088.00000f, 31.0000000f); - path.lineTo(1088.00000f, 32.0000000f); - path.lineTo(1097.00000f, 32.0000000f); - path.quadTo(1098.65686f, 32.0000000f, 1099.82886f, 30.8288002f); - path.quadTo(1101.00000f, 29.6568546f, 1101.00000f, 28.0000000f); - path.lineTo(1101.00000f, 10.0000000f); - path.quadTo(1101.00000f, 8.34314537f, 1099.82886f, 7.17119980f); - path.lineTo(1099.82886f, 7.17117119f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1101.00000f, 6.00000000f); - pathB.lineTo(1088.00000f, 6.00000000f); - pathB.lineTo(1088.00000f, 19.0000000f); - pathB.lineTo(1101.00000f, 32.0000000f); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpahrefs_com29(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1037.17114f, 7.17119980f); - path.quadTo(1038.34314f, 6.00000000f, 1040.00000f, 6.00000000f); - path.lineTo(1074.00000f, 6.00000000f); - path.lineTo(1074.00000f, 32.0000000f); - path.lineTo(1040.00000f, 32.0000000f); - path.quadTo(1038.34314f, 32.0000000f, 1037.17114f, 30.8288002f); - path.quadTo(1036.00000f, 29.6568546f, 1036.00000f, 28.0000000f); - path.lineTo(1036.00000f, 10.0000000f); - path.quadTo(1036.00000f, 8.34314537f, 1037.17114f, 7.17119980f); - path.close(); - path.moveTo(1037.00000f, 10.0000000f); - path.cubicTo(1037.00000f, 8.34314537f, 1038.34314f, 7.00000000f, 1040.00000f, 7.00000000f); - path.lineTo(1073.00000f, 7.00000000f); - path.lineTo(1073.00000f, 31.0000000f); - path.lineTo(1040.00000f, 31.0000000f); - path.cubicTo(1038.34314f, 31.0000000f, 1037.00000f, 29.6568546f, 1037.00000f, 28.0000000f); - path.lineTo(1037.00000f, 10.0000000f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1036.00000f, 32.0000000f); - pathB.lineTo(1049.00000f, 19.0000000f); - pathB.lineTo(1073.00000f, 31.0000000f); - pathB.lineTo(1074.00000f, 32.0000000f); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp85d(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,6, 1,0, 6,2); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(2,6, 1,0, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void skpkkiste_to98(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(96, 122); - path.cubicTo(94.6192932f, 122, 93.3692932f, 122.559647f, 92.4644699f, 123.46447f); - path.lineTo(94.1715698f, 125.17157f); - path.cubicTo(94.8954315f, 124.447708f, 95.8954315f, 124, 97, 124); - path.lineTo(257, 124); - path.cubicTo(258.104553f, 124, 259.104584f, 124.447708f, 259.82843f, 125.17157f); - path.lineTo(261.535522f, 123.46447f); - path.cubicTo(260.630707f, 122.559647f, 259.380707f, 122, 258, 122); - path.lineTo(96, 122); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(258, 122); - pathB.cubicTo(260.761414f, 122, 263, 124.238579f, 263, 127); - pathB.lineTo(263, 284); - pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289); - pathB.lineTo(96, 289); - pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284); - pathB.lineTo(91, 127); - pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122); - pathB.lineTo(258, 122); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void issue1417(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(122.58908843994140625f, 82.2836456298828125f); - path1.quadTo(129.8215789794921875f, 80, 138, 80); - path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f); - path1.lineTo(161.1764678955078125f, 100); - path1.lineTo(161.1764678955078125f, 100); - path1.lineTo(115.29412078857421875f, 100); - path1.lineTo(115.29412078857421875f, 100); - path1.lineTo(122.58908843994140625f, 82.2836456298828125f); - path1.lineTo(122.58908843994140625f, 82.2836456298828125f); - path1.close(); - path1.moveTo(98.68194580078125f, 140.343841552734375f); - path1.lineTo(115.29412078857421875f, 100); - path1.lineTo(115.29412078857421875f, 100); - path1.lineTo(97.9337615966796875f, 100); - path1.lineTo(97.9337615966796875f, 100); - path1.quadTo(88, 112.94264984130859375f, 88, 130); - path1.quadTo(88, 131.544830322265625f, 88.08148956298828125f, 133.0560302734375f); - path1.lineTo(98.68194580078125f, 140.343841552734375f); - path1.lineTo(98.68194580078125f, 140.343841552734375f); - path1.close(); - path1.moveTo(136.969696044921875f, 166.6666717529296875f); - path1.lineTo(98.68194580078125f, 140.343841552734375f); - path1.lineTo(98.68194580078125f, 140.343841552734375f); - path1.lineTo(93.45894622802734375f, 153.02825927734375f); - path1.lineTo(93.45894622802734375f, 153.02825927734375f); - path1.quadTo(96.94116973876953125f, 159.65185546875f, 102.64466094970703125f, 165.3553466796875f); - path1.quadTo(110.7924652099609375f, 173.503143310546875f, 120.8179779052734375f, 177.1177825927734375f); - path1.lineTo(136.969696044921875f, 166.6666717529296875f); - path1.lineTo(136.969696044921875f, 166.6666717529296875f); - path1.close(); - path1.moveTo(175.8309783935546875f, 141.5211334228515625f); - path1.lineTo(136.969696044921875f, 166.6666717529296875f); - path1.lineTo(136.969696044921875f, 166.6666717529296875f); - path1.lineTo(153.15728759765625f, 177.7956390380859375f); - path1.lineTo(153.15728759765625f, 177.7956390380859375f); - path1.quadTo(164.392425537109375f, 174.318267822265625f, 173.3553466796875f, 165.3553466796875f); - path1.quadTo(177.805816650390625f, 160.9048614501953125f, 180.90380859375f, 155.8941650390625f); - path1.lineTo(175.8309783935546875f, 141.5211334228515625f); - path1.lineTo(175.8309783935546875f, 141.5211334228515625f); - path1.close(); - path1.moveTo(175.8309783935546875f, 141.5211334228515625f); - path1.lineTo(187.8782806396484375f, 133.7258148193359375f); - path1.lineTo(187.8782806396484375f, 133.7258148193359375f); - path1.quadTo(188, 131.8880615234375f, 188, 130); - path1.quadTo(188, 112.942657470703125f, 178.0662384033203125f, 100); - path1.lineTo(161.1764678955078125f, 100); - path1.lineTo(161.1764678955078125f, 100); - path1.lineTo(175.8309783935546875f, 141.5211334228515625f); - path1.lineTo(175.8309783935546875f, 141.5211334228515625f); - path1.close(); - - SkPath path2; - path2.moveTo(174.117645263671875f, 100); - path2.lineTo(161.1764678955078125f, 100); - path2.lineTo(161.1764678955078125f, 100); - path2.lineTo(155.1280364990234375f, 82.86279296875f); - path2.lineTo(155.1280364990234375f, 82.86279296875f); - path2.quadTo(153.14971923828125f, 82.15229034423828125f, 151.098419189453125f, 81.618133544921875f); - path2.lineTo(143.5294189453125f, 100); - path2.lineTo(143.5294189453125f, 100); - path2.lineTo(161.1764678955078125f, 100); - path2.lineTo(161.1764678955078125f, 100); - path2.lineTo(168.23529052734375f, 120); - path2.lineTo(168.23529052734375f, 120); - path2.lineTo(181.1764678955078125f, 120); - path2.lineTo(181.1764678955078125f, 120); - path2.lineTo(186.3661956787109375f, 134.7042236328125f); - path2.lineTo(186.3661956787109375f, 134.7042236328125f); - path2.lineTo(187.8782806396484375f, 133.7258148193359375f); - path2.lineTo(187.8782806396484375f, 133.7258148193359375f); - path2.quadTo(188, 131.8880615234375f, 188, 130); - path2.quadTo(188, 124.80947113037109375f, 187.080169677734375f, 120); - path2.lineTo(181.1764678955078125f, 120); - path2.lineTo(181.1764678955078125f, 120); - path2.lineTo(174.117645263671875f, 100); - path2.lineTo(174.117645263671875f, 100); - path2.close(); - path2.moveTo(88.91983795166015625f, 120); - path2.lineTo(107.0588226318359375f, 120); - path2.lineTo(107.0588226318359375f, 120); - path2.lineTo(98.68194580078125f, 140.343841552734375f); - path2.lineTo(98.68194580078125f, 140.343841552734375f); - path2.lineTo(88.08148956298828125f, 133.0560302734375f); - path2.lineTo(88.08148956298828125f, 133.0560302734375f); - path2.quadTo(88, 131.544830322265625f, 88, 130); - path2.quadTo(88, 124.80951690673828125f, 88.91983795166015625f, 120); - path2.close(); - path2.moveTo(96.67621612548828125f, 145.21490478515625f); - path2.lineTo(98.68194580078125f, 140.343841552734375f); - path2.lineTo(98.68194580078125f, 140.343841552734375f); - path2.lineTo(120.68767547607421875f, 155.4727783203125f); - path2.lineTo(120.68767547607421875f, 155.4727783203125f); - path2.lineTo(118.68194580078125f, 160.343841552734375f); - path2.lineTo(118.68194580078125f, 160.343841552734375f); - path2.lineTo(96.67621612548828125f, 145.21490478515625f); - path2.lineTo(96.67621612548828125f, 145.21490478515625f); - path2.close(); - path2.moveTo(113.232177734375f, 173.5789947509765625f); - path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.8179779052734375f, 177.1177825927734375f); - path2.lineTo(132.2864990234375f, 169.6969757080078125f); - path2.lineTo(132.2864990234375f, 169.6969757080078125f); - path2.lineTo(118.68194580078125f, 160.343841552734375f); - path2.lineTo(118.68194580078125f, 160.343841552734375f); - path2.lineTo(113.232177734375f, 173.5789947509765625f); - path2.lineTo(113.232177734375f, 173.5789947509765625f); - path2.close(); - // FIXME : difficult data, circle back later - testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void issue1418(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(0, 0); - path1.lineTo(1, 0); - path1.lineTo(1, 0); - path1.lineTo(1, 1); - path1.lineTo(1, 1); - path1.lineTo(0, 1); - path1.lineTo(0, 1); - path1.lineTo(0, 0); - path1.lineTo(0, 0); - path1.close(); - - SkPath path2; - path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f); - path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192092895508f, -0.50000005960464477539f); - path2.quadTo(1.2071068286895751953f, -0.50000005960464477539f, 1.3535535335540771484f, -0.35355341434478759766f); - path2.quadTo(1.5000001192092895508f, -0.20710679888725280762f, 1.5000001192092895508f, 0); - path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.3535535335540771484f, 0.35355341434478759766f); - path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.0000001192092895508f, 0.50000005960464477539f); - path2.quadTo(0.79289329051971435547f, 0.50000005960464477539f, 0.64644664525985717773f, 0.35355341434478759766f); - path2.quadTo(0.50000005960464477539f, 0.20710679888725280762f, 0.50000005960464477539f, 0); - path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.64644664525985717773f, -0.35355341434478759766f); - testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); -} - -static void cubicOp85i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(1, 5, 4, 3, 6, 4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 4); - pathB.cubicTo(4, 6, 4, 3, 5, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void issue1418b(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(0, 0); - path1.lineTo(1, 0); - path1.lineTo(1, 1); - path1.lineTo(0, 1); - path1.lineTo(0, 0); - path1.close(); - path1.setFillType(SkPath::kWinding_FillType); - SkPath path2; - path2.moveTo(0.646446645f, -0.353553414f); - path2.quadTo(0.792893291f, -0.50000006f, 1.00000012f, -0.50000006f); - path2.quadTo(1.20710683f, -0.50000006f, 1.35355353f, -0.353553414f); - path2.quadTo(1.50000012f, -0.207106799f, 1.50000012f, 0); - path2.quadTo(1.50000012f, 0.207106799f, 1.35355353f, 0.353553414f); - path2.quadTo(1.20710683f, 0.50000006f, 1.00000012f, 0.50000006f); - path2.quadTo(0.792893291f, 0.50000006f, 0.646446645f, 0.353553414f); - path2.quadTo(0.50000006f, 0.207106799f, 0.50000006f, 0); - path2.quadTo(0.50000006f, -0.207106799f, 0.646446645f, -0.353553414f); - path2.close(); - path2.moveTo(1.00000012f, 0.50000006f); - path2.lineTo(1.00000012f, 1.00000012f); - path2.lineTo(0.50000006f, 1.00000012f); - path2.quadTo(0.50000006f, 0.792893291f, 0.646446645f, 0.646446645f); - path2.quadTo(0.792893291f, 0.50000006f, 1.00000012f, 0.50000006f); - path2.close(); - path2.setFillType(SkPath::kEvenOdd_FillType); - testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); -} - -static void rectOp1i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void rectOp2i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void rectOp3x(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(3, 0); - path.lineTo(3, 3); - path.lineTo(0, 3); - path.close(); - path.moveTo(2, 2); - path.lineTo(3, 2); - path.lineTo(3, 3); - path.lineTo(2, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 1); - pathB.lineTo(3, 1); - pathB.lineTo(3, 3); - pathB.lineTo(1, 3); - pathB.close(); - pathB.moveTo(2, 2); - pathB.lineTo(3, 2); - pathB.lineTo(3, 3); - pathB.lineTo(2, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); -} - -static void issue1435(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(160, 60); - path1.lineTo(220, 230); - path1.lineTo(60, 120); - path1.lineTo(260, 120); - path1.lineTo(90, 230); - path1.lineTo(160, 60); - path1.close(); - path1.setFillType(SkPath::kEvenOdd_FillType); - - SkPath path2; - path2.moveTo(142.589081f, 102.283646f); - path2.quadTo(149.821579f, 100, 158, 100); - path2.quadTo(167.156921f, 100, 175.128036f, 102.862793f); - path2.lineTo(181.176468f, 120); - path2.lineTo(135.294128f, 120); - path2.lineTo(142.589081f, 102.283646f); - path2.close(); - path2.moveTo(118.681946f, 160.343842f); - path2.lineTo(135.294128f, 120); - path2.lineTo(117.933762f, 120); - path2.quadTo(108, 132.942657f, 108, 150); - path2.quadTo(108, 151.54483f, 108.08149f, 153.05603f); - path2.lineTo(118.681946f, 160.343842f); - path2.close(); - path2.moveTo(156.969696f, 186.666672f); - path2.lineTo(118.681946f, 160.343842f); - path2.lineTo(113.458946f, 173.028259f); - path2.quadTo(116.94117f, 179.651855f, 122.644661f, 185.355347f); - path2.quadTo(130.792465f, 193.503143f, 140.817978f, 197.117783f); - path2.lineTo(156.969696f, 186.666672f); - path2.close(); - path2.moveTo(195.830978f, 161.521133f); - path2.lineTo(156.969696f, 186.666672f); - path2.lineTo(173.157288f, 197.795639f); - path2.quadTo(184.392426f, 194.318268f, 193.355347f, 185.355347f); - path2.quadTo(197.805817f, 180.904861f, 200.903809f, 175.894165f); - path2.lineTo(195.830978f, 161.521133f); - path2.close(); - path2.moveTo(195.830978f, 161.521133f); - path2.lineTo(207.878281f, 153.725815f); - path2.quadTo(208, 151.888062f, 208, 150); - path2.quadTo(208, 132.942657f, 198.066238f, 120); - path2.lineTo(181.176468f, 120); - path2.lineTo(195.830978f, 161.521133f); - path2.close(); - path2.setFillType(SkPath::kEvenOdd_FillType); - testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); -} - -static void skpkkiste_to716(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1173, 284); - path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f); - path.lineTo(1174, 123.999496f); - path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127); - path.lineTo(1173, 284); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1340, 122); - pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127); - pathB.lineTo(1345, 284); - pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289); - pathB.lineTo(1178, 289); - pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284); - pathB.lineTo(1173, 127); - pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122); - pathB.lineTo(1340, 122); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loopEdge1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,0); - path.lineTo(3,0); - path.lineTo(3,2); - path.lineTo(1,2); - path.lineTo(1,1); - path.lineTo(2,1); - path.lineTo(2,3); - path.lineTo(0,3); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(1,2); - pathB.lineTo(2,2); - pathB.lineTo(2,4); - pathB.lineTo(1,4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loopEdge2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,0); - path.lineTo(3,0); - path.lineTo(3,2); - path.lineTo(1,2); - path.lineTo(1,1); - path.lineTo(2,1); - path.lineTo(2,3); - path.lineTo(0,3); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(1 - 1e-6f,2); - pathB.lineTo(2 - 1e-6f,2); - pathB.lineTo(2 - 1e-6f,4); - pathB.lineTo(1 - 1e-6f,4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp86i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 4); - path.cubicTo(3, 4, 6, 2, 5, 2); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(2, 6); - pathB.cubicTo(2, 5, 4, 0, 4, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp87u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,2, 2,0, 6,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(4,6, 1,0, 2,0); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp88u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,5, 5,0, 6,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(4,6, 1,0, 5,2); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp89u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 3); - path.cubicTo(1, 6, 5, 0, 6, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(3, 6, 3, 0, 6, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp90u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 5); - path.cubicTo(1, 2, 5, 2, 4, 1); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(2, 5); - pathB.cubicTo(1, 4, 5, 0, 2, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp91u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 6); - path.cubicTo(0, 3, 6, 3, 5, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 6); - pathB.cubicTo(0, 5, 6, 1, 3, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void skpaaalgarve_org53(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(-1.24344979e-014f, 348); - path.lineTo(258, 348); - path.lineTo(258, 322); - path.quadTo(258, 317.857849f, 255.072006f, 314.928009f); - path.quadTo(252.142136f, 312, 248, 312); - path.lineTo(1.77635684e-015f, 312); - path.lineTo(-1.24344979e-014f, 348); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 312); - pathB.lineTo(258, 312); - pathB.lineTo(258, 348); - pathB.lineTo(0, 348); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpabcspark_ca103(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1.99840144e-015f, 494); - path.lineTo(97, 494); - path.quadTo(100.313705f, 494, 102.6576f, 491.657593f); - path.quadTo(105, 489.313721f, 105, 486); - path.lineTo(105, 425); - path.quadTo(105, 421.686279f, 102.6576f, 419.342407f); - path.quadTo(100.313705f, 417, 97, 417); - path.lineTo(2.22044605e-016f, 417); - path.lineTo(1.99840144e-015f, 494); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 417); - pathB.lineTo(105, 417); - pathB.lineTo(105, 494); - pathB.lineTo(0, 494); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpacesoftech_com47(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(670.537415f, 285); - path.lineTo(670.387451f, 285); - path.lineTo(596.315186f, 314.850708f); - path.lineTo(626.19696f, 389); - path.lineTo(626.346863f, 389); - path.lineTo(700.419189f, 359.149261f); - path.lineTo(670.537415f, 285); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(663.318542f, 374.100616f); - pathB.quadTo(647.950989f, 380.293671f, 632.705322f, 373.806305f); - pathB.quadTo(617.459595f, 367.318909f, 611.266541f, 351.951355f); - pathB.quadTo(605.073486f, 336.58374f, 611.560913f, 321.338074f); - pathB.quadTo(618.048279f, 306.092407f, 633.415833f, 299.899353f); - pathB.quadTo(648.783447f, 293.706299f, 664.029114f, 300.193665f); - pathB.quadTo(679.27478f, 306.68103f, 685.467834f, 322.048645f); - pathB.quadTo(691.660889f, 337.416199f, 685.173523f, 352.661896f); - pathB.quadTo(678.686157f, 367.907562f, 663.318542f, 374.100616f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpact_com43(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1.45716772e-016f, 924.336121f); - path.lineTo(-1.11022302e-016f, 920); - path.lineTo(6, 920); - path.lineTo(6, 926); - path.lineTo(1.66389287f, 926); - path.quadTo(1.18842196f, 925.674561f, 0.756800175f, 925.243225f); - path.quadTo(0.325406998f, 924.811523f, 1.45716772e-016f, 924.336121f); - path.close(); - path.moveTo(1, 921); - path.lineTo(5, 921); - path.lineTo(5, 925); - path.cubicTo(2.79086018f, 925, 1, 923.209167f, 1, 921); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(-1, 920); - pathB.lineTo(0, 920); - pathB.lineTo(3, 927); - pathB.lineTo(-1, 927); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpadbox_lt8(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(320.097229f, 628.573669f); - path.lineTo(610.227173f, 85.7786865f); - path.lineTo(946.652588f, 265.601807f); - path.lineTo(656.522644f, 808.39679f); - path.lineTo(320.097229f, 628.573669f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kInverseWinding_FillType); - pathB.moveTo(333.866608f, 623.496155f); - pathB.lineTo(613.368042f, 100.585754f); - pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395f, 100.085449f); - pathB.lineTo(932.633057f, 269.854553f); - pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301f, 271.503906f); - pathB.lineTo(653.631897f, 794.414307f); - pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544f, 794.914612f); - pathB.lineTo(334.366943f, 625.145508f); - pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608f, 623.496155f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpadindex_de4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 926); - path.lineTo(0, 0); - path.lineTo(1280, 0); - path.lineTo(1280, 926); - path.lineTo(0, 926); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 312); - pathB.lineTo(8.20486257e-015f, 178); - pathB.lineTo(49, 178); - pathB.lineTo(49, 312); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpadithya_putr4_blogspot_com551(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(205.605804f, 142.334625f); - path.lineTo(254.665359f, 85.6058044f); - path.lineTo(311.394196f, 134.665359f); - path.lineTo(262.334625f, 191.39418f); - path.lineTo(205.605804f, 142.334625f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(283.407959f, 110.462646f); - pathB.cubicTo(298.864319f, 123.829437f, 300.558258f, 147.195221f, 287.191467f, 162.651581f); - pathB.lineTo(286.537354f, 163.407959f); - pathB.cubicTo(273.170563f, 178.864334f, 249.804779f, 180.558258f, 234.348419f, 167.191467f); - pathB.lineTo(233.592026f, 166.537338f); - pathB.cubicTo(218.135666f, 153.170547f, 216.441727f, 129.804779f, 229.808517f, 114.348412f); - pathB.lineTo(230.462646f, 113.592026f); - pathB.cubicTo(243.829437f, 98.1356659f, 267.195221f, 96.4417267f, 282.651581f, 109.808517f); - pathB.lineTo(283.407959f, 110.462646f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpadspert_de11(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(-4.4408921e-016f, 682.5f); - path.lineTo(30.5f, 682.5f); - path.cubicTo(32.709137f, 682.5f, 34.5f, 680.709167f, 34.5f, 678.5f); - path.lineTo(34.5f, 486.5f); - path.cubicTo(34.5f, 484.290863f, 32.709137f, 482.5f, 30.5f, 482.5f); - path.lineTo(0, 482.5f); - path.lineTo(-4.4408921e-016f, 682.5f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 482); - pathB.lineTo(35, 482); - pathB.lineTo(35, 683); - pathB.lineTo(0, 683); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpaiaigames_com870(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(324.071075f, 845.071045f); - path.cubicTo(324.405151f, 844.737f, 324.715668f, 844.379395f, 325, 844.000977f); - path.lineTo(325, 842.127197f); - path.cubicTo(324.571411f, 842.956238f, 324.017761f, 843.710144f, 323.363953f, 844.363953f); - path.lineTo(324.071075f, 845.071045f); - path.close(); - path.moveTo(323.363953f, 714.636047f); - path.lineTo(324.071075f, 713.928955f); - path.cubicTo(324.405151f, 714.263f, 324.715668f, 714.620605f, 325, 714.999023f); - path.lineTo(325, 716.872803f); - path.cubicTo(324.571411f, 716.043762f, 324.017761f, 715.289856f, 323.363953f, 714.636047f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(317, 711); - pathB.cubicTo(322.522858f, 711, 327, 715.477173f, 327, 721); - pathB.lineTo(327, 838); - pathB.cubicTo(327, 843.522827f, 322.522858f, 848, 317, 848); - pathB.lineTo(155, 848); - pathB.cubicTo(149.477158f, 848, 145, 843.522827f, 145, 838); - pathB.lineTo(145, 721); - pathB.cubicTo(145, 715.477173f, 149.477158f, 711, 155, 711); - pathB.lineTo(317, 711); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp92i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(2, 6, 4, 1, 5, 4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(4, 5, 1, 0, 6, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp93d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(1, 6, 4, 1, 4, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(3, 4, 1, 0, 6, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp94u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 3); - path.cubicTo(2, 3, 5, 0, 5, 3); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(3, 5, 3, 0, 3, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void skpadbox_lt15(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(333.292084f, 624.570984f); - path.lineTo(614.229797f, 98.9735107f); - path.lineTo(933.457764f, 269.604431f); - path.lineTo(652.52002f, 795.201904f); - path.lineTo(333.292084f, 624.570984f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(613.368042f, 100.585754f); - pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395f, 100.085449f); - pathB.lineTo(932.633057f, 269.854553f); - pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301f, 271.503906f); - pathB.lineTo(653.631897f, 794.414307f); - pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544f, 794.914612f); - pathB.lineTo(334.366943f, 625.145508f); - pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608f, 623.496155f); - pathB.lineTo(613.368042f, 100.585754f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpadoption_org196(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(802, 367); - path.lineTo(802, 324); - path.lineTo(956, 324); - path.lineTo(956, 371); - path.quadTo(956, 373.071075f, 954.536011f, 374.536011f); - path.quadTo(953.071045f, 376, 951, 376); - path.lineTo(811, 376); - path.cubicTo(806.029419f, 376, 802, 371.970551f, 802, 367); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kInverseWinding_FillType); - pathB.moveTo(803, 326); - pathB.lineTo(955, 326); - pathB.lineTo(955, 370); - pathB.cubicTo(955, 372.761414f, 952.761414f, 375, 950, 375); - pathB.lineTo(808, 375); - pathB.cubicTo(805.238586f, 375, 803, 372.761414f, 803, 370); - pathB.lineTo(803, 326); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpadspert_net23(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(-2.220446e-018f, 483.5f); - path.lineTo(0, 482.5f); - path.lineTo(30.5f, 482.5f); - path.cubicTo(32.709137f, 482.5f, 34.5f, 484.290863f, 34.5f, 486.5f); - path.lineTo(34.5f, 678.5f); - path.cubicTo(34.5f, 680.709167f, 32.709137f, 682.5f, 30.5f, 682.5f); - path.lineTo(-4.4408921e-016f, 682.5f); - path.lineTo(-4.41868766e-016f, 681.5f); - path.lineTo(30.5f, 681.5f); - path.cubicTo(32.1568565f, 681.5f, 33.5f, 680.15686f, 33.5f, 678.5f); - path.lineTo(33.5f, 486.5f); - path.cubicTo(33.5f, 484.84314f, 32.1568565f, 483.5f, 30.5f, 483.5f); - path.lineTo(-2.220446e-018f, 483.5f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 482); - pathB.lineTo(35, 482); - pathB.lineTo(35, 683); - pathB.lineTo(0, 683); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpadventistmission_org572(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1182.00037f, 926); - path.cubicTo(1181.08813f, 924.785583f, 1179.63586f, 924, 1178, 924); - path.lineTo(938, 924); - path.cubicTo(936.364197f, 924, 934.911865f, 924.785583f, 933.999634f, 926); - path.lineTo(1182.00037f, 926); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(934, 924); - pathB.lineTo(1182, 924); - pathB.lineTo(1182, 926); - pathB.lineTo(934, 926); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpagentxsites_com55(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(925, 27); - path.cubicTo(924.447693f, 27, 924, 27.4477158f, 924, 28); - path.lineTo(924, 55); - path.cubicTo(924, 55.5522842f, 924.447693f, 56, 925, 56); - path.lineTo(1103, 56); - path.cubicTo(1103.55225f, 56, 1104, 55.5522842f, 1104, 55); - path.lineTo(1104, 28); - path.cubicTo(1104, 27.4477158f, 1103.55225f, 27, 1103, 27); - path.lineTo(925, 27); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1103, 27); - pathB.cubicTo(1104.10461f, 27, 1105, 27.8954315f, 1105, 29); - pathB.lineTo(1105, 54); - pathB.cubicTo(1105, 55.1045685f, 1104.10461f, 56, 1103, 56); - pathB.lineTo(926, 56); - pathB.cubicTo(924.895447f, 56, 924, 55.1045685f, 924, 54); - pathB.lineTo(924, 29); - pathB.cubicTo(924, 27.8954315f, 924.895447f, 27, 926, 27); - pathB.lineTo(1103, 27); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpbakosoft_com10(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(190, 170); - path.cubicTo(178.9543f, 170, 170, 178.9543f, 170, 190); - path.cubicTo(170, 201.0457f, 178.9543f, 210, 190, 210); - path.lineTo(370, 210); - path.cubicTo(381.045685f, 210, 390, 201.0457f, 390, 190); - path.cubicTo(390, 178.9543f, 381.045685f, 170, 370, 170); - path.lineTo(190, 170); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(210, 190); - pathB.quadTo(210, 198.284271f, 204.142136f, 204.142136f); - pathB.quadTo(198.284271f, 210, 190, 210); - pathB.quadTo(181.715729f, 210, 175.857864f, 204.142136f); - pathB.quadTo(170, 198.284271f, 170, 190); - pathB.quadTo(170, 181.715729f, 175.857864f, 175.857864f); - pathB.quadTo(181.715729f, 170, 190, 170); - pathB.quadTo(198.284271f, 170, 204.142136f, 175.857864f); - pathB.quadTo(210, 181.715729f, 210, 190); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpbambootheme_com12(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(47.8780937f, 58); - path.lineTo(0, 58); - path.lineTo(-8.65973959e-015f, 96.9914017f); - path.quadTo(20.0654926f, 96.6451874f, 34.3553391f, 82.3553391f); - path.quadTo(44.9466133f, 71.764061f, 47.8780937f, 58); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(-1, -3); - pathB.lineTo(-1, -3); - pathB.cubicTo(26.6142502f, -3, 49, 19.3857498f, 49, 47); - pathB.lineTo(49, 47); - pathB.cubicTo(49, 74.6142502f, 26.6142502f, 97, -1, 97); - pathB.lineTo(-1, 97); - pathB.cubicTo(-28.6142502f, 97, -51, 74.6142502f, -51, 47); - pathB.lineTo(-51, 47); - pathB.cubicTo(-51, 19.3857498f, -28.6142502f, -3, -1, -3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpakmmos_ru100(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(693.000488f, 926); - path.cubicTo(692.164734f, 925.37207f, 691.125793f, 925, 690, 925); - path.lineTo(578, 925); - path.cubicTo(576.874207f, 925, 575.835266f, 925.37207f, 574.999512f, 926); - path.lineTo(693.000488f, 926); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(575, 925); - pathB.lineTo(693, 925); - pathB.lineTo(693, 926); - pathB.lineTo(575, 926); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpcarpetplanet_ru22(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(195, 785); - path.cubicTo(124.307556f, 785, 67, 841.859863f, 67, 912); - path.lineTo(67, 913); - path.cubicTo(67, 917.388916f, 67.2243805f, 921.725769f, 67.662384f, 926); - path.lineTo(322, 926); - path.lineTo(322, 896.048035f); - path.cubicTo(314.09201f, 833.437622f, 260.247131f, 785, 195, 785); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(195, 785); - pathB.cubicTo(265.140167f, 785, 322, 842.307556f, 322, 913); - pathB.cubicTo(322, 983.692444f, 265.140167f, 1041, 195, 1041); - pathB.lineTo(194, 1041); - pathB.cubicTo(123.85984f, 1041, 67, 983.692444f, 67, 913); - pathB.cubicTo(67, 842.307556f, 123.85984f, 785, 194, 785); - pathB.lineTo(195, 785); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpcarrot_is24(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(945, 597); - path.quadTo(913.93396f, 597, 891.96698f, 618.96698f); - path.quadTo(870, 640.93396f, 870, 672); - path.quadTo(870, 703.06604f, 891.96698f, 725.03302f); - path.quadTo(913.93396f, 747, 945, 747); - path.quadTo(976.06604f, 747, 998.03302f, 725.03302f); - path.quadTo(1020, 703.06604f, 1020, 672); - path.quadTo(1020, 640.93396f, 998.03302f, 618.96698f); - path.quadTo(976.06604f, 597, 945, 597); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(945.080994f, 597.161987f); - pathB.cubicTo(903.659973f, 597.161987f, 870.080994f, 630.73999f, 870.080994f, 672.161987f); - pathB.cubicTo(870.080994f, 676.096008f, 870.387024f, 679.957031f, 870.971008f, 683.726013f); - pathB.cubicTo(876.53302f, 719.656006f, 907.593994f, 747.161987f, 945.080994f, 747.161987f); - pathB.cubicTo(982.567993f, 747.161987f, 1013.62903f, 719.656006f, 1019.19104f, 683.726013f); - pathB.cubicTo(1019.77502f, 679.955017f, 1020.08099f, 676.094971f, 1020.08099f, 672.161987f); - pathB.cubicTo(1020.08002f, 630.73999f, 986.502014f, 597.161987f, 945.080994f, 597.161987f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpbangalorenest_com4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 926); - path.lineTo(0, 0); - path.lineTo(1265, 0); - path.lineTo(1265, 926); - path.lineTo(0, 926); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 290); - pathB.lineTo(-2.64514972e-014f, 146); - pathB.lineTo(30, 146); - pathB.lineTo(30, 290); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpbenzoteh_ru152(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(883, 23); - path.lineTo(883, 0); - path.lineTo(1122.5f, 0); - path.lineTo(1122.5f, 25.2136822f); - path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); - path.quadTo(1120.07104f, 28, 1118, 28); - path.lineTo(888, 28); - path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - path.quadTo(883, 25.0710678f, 883, 23); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(883, 0); - pathB.lineTo(1123, 0); - pathB.lineTo(1123, 23); - pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); - pathB.quadTo(1120.07104f, 28, 1118, 28); - pathB.lineTo(888, 28); - pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - pathB.quadTo(883, 25.0710678f, 883, 23); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpbestred_ru37(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(883, 23); - path.lineTo(883, 0); - path.lineTo(1122.5f, 0); - path.lineTo(1122.5f, 25.2136822f); - path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); - path.quadTo(1120.07104f, 28, 1118, 28); - path.lineTo(888, 28); - path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - path.quadTo(883, 25.0710678f, 883, 23); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(883, 0); - pathB.lineTo(1123, 0); - pathB.lineTo(1123, 23); - pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); - pathB.quadTo(1120.07104f, 28, 1118, 28); - pathB.lineTo(888, 28); - pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - pathB.quadTo(883, 25.0710678f, 883, 23); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpbingoentertainment_net189(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(896, 745.38678f); - path.lineTo(896, 873.38678f); - path.lineTo(922.567993f, 876.683716f); - path.lineTo(922.567993f, 748.683716f); - path.lineTo(896, 745.38678f); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(899.200928f, 745.783997f); - pathB.cubicTo(897.119385f, 745.525696f, 895.432007f, 752.031982f, 895.432007f, 760.316284f); - pathB.lineTo(895.432007f, 858.316284f); - pathB.cubicTo(895.432007f, 866.600586f, 897.119385f, 873.525696f, 899.200928f, 873.783997f); - pathB.lineTo(918.799133f, 876.216003f); - pathB.cubicTo(920.880615f, 876.474304f, 922.567993f, 869.968018f, 922.567993f, 861.683716f); - pathB.lineTo(922.567993f, 763.683716f); - pathB.cubicTo(922.567993f, 755.399414f, 920.880615f, 748.474304f, 918.799133f, 748.216003f); - pathB.lineTo(899.200928f, 745.783997f); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpcarrefour_ro62(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1104, 453); - path.lineTo(399, 453); - path.lineTo(399, 657); - path.cubicTo(399, 661.970581f, 403.029449f, 666, 408, 666); - path.lineTo(1095, 666); - path.cubicTo(1099.97058f, 666, 1104, 661.970581f, 1104, 657); - path.lineTo(1104, 453); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kInverseWinding_FillType); - pathB.moveTo(400, 453); - pathB.lineTo(1103, 453); - pathB.lineTo(1103, 666); - pathB.lineTo(406, 666); - pathB.cubicTo(402.686279f, 666, 400, 663.313721f, 400, 660); - pathB.lineTo(400, 453); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpcaffelavazzait_com_ua21(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(883, 23); - path.lineTo(883, 0); - path.lineTo(1122.5f, 0); - path.lineTo(1122.5f, 25.2136822f); - path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); - path.quadTo(1120.07104f, 28, 1118, 28); - path.lineTo(888, 28); - path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - path.quadTo(883, 25.0710678f, 883, 23); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(883, 0); - pathB.lineTo(1123, 0); - pathB.lineTo(1123, 23); - pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); - pathB.quadTo(1120.07104f, 28, 1118, 28); - pathB.lineTo(888, 28); - pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - pathB.quadTo(883, 25.0710678f, 883, 23); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpcamcorder_kz21(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(883, 23); - path.lineTo(883, 0); - path.lineTo(1122.5f, 0); - path.lineTo(1122.5f, 25.2136822f); - path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); - path.quadTo(1120.07104f, 28, 1118, 28); - path.lineTo(888, 28); - path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - path.quadTo(883, 25.0710678f, 883, 23); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(883, 0); - pathB.lineTo(1123, 0); - pathB.lineTo(1123, 23); - pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); - pathB.quadTo(1120.07104f, 28, 1118, 28); - pathB.lineTo(888, 28); - pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); - pathB.quadTo(883, 25.0710678f, 883, 23); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpcavablar_net563(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(160.000488f, 918); - path.cubicTo(159.164749f, 917.37207f, 158.125824f, 917, 157, 917); - path.lineTo(94, 917); - path.cubicTo(92.874176f, 917, 91.8352661f, 917.37207f, 90.9995193f, 918); - path.lineTo(160.000488f, 918); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(91, 917); - pathB.lineTo(160, 917); - pathB.lineTo(160, 918); - pathB.lineTo(91, 918); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void skpinsomnia_gr72(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1138, 231); - path.lineTo(1137, 243.625748f); - path.lineTo(1137, 926); - path.lineTo(1139, 926); - path.lineTo(1139, 231); - path.lineTo(1138, 231); - path.close(); - SkPath pathB; - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1139, 231); - pathB.lineTo(1138, 231); - pathB.lineTo(633, 6101); - pathB.lineTo(1139, 6607); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp95u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 2); - path.cubicTo(2, 3, 5, 1, 3, 2); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(2, 3, 2, 0, 3, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp96d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 6); - path.cubicTo(0, 3, 6, 3, 5, 0); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(3, 6); - pathB.cubicTo(0, 5, 6, 1, 3, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp97x(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 2); - path.cubicTo(0, 6, 2, 1, 2, 1); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(1, 2, 2, 0, 6, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); -} - -static void cubicOp98x(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 3); - path.cubicTo(3, 6, 4, 1, 6, 3); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(3, 6, 3, 0, 6, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); -} - -static void cubicOp99(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3,6); - path.cubicTo(0,3, 6,5, 5,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(5,6); - pathB.cubicTo(4,5, 6,3, 3,0); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp100(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,2, 2,1, 4,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(2,4, 1,0, 2,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp101(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(2, 3, 2, 1, 5, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(3, 5, 1, 0, 3, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp102(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,2, 1,0, 3,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,1); - pathB.cubicTo(0,3, 1,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp103(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,5, 2,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(1,2, 1,0, 5,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp104(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,6, 4,0, 6,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,4); - pathB.cubicTo(1,6, 1,0, 6,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp105(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,4, 6,5, 2,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(5,6); - pathB.cubicTo(0,2, 1,0, 4,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp106(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(4, 6, 2, 1, 2, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(0, 2, 1, 0, 6, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp107(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(4, 6, 2, 1, 2, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(0, 2, 1, 0, 6, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp108(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(4, 6, 2, 1, 2, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(0, 2, 1, 0, 6, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp109(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(4,5, 6,3, 5,4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3,6); - pathB.cubicTo(4,5, 1,0, 5,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp110(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 4, 4, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp111(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1,4); - path.cubicTo(0,5, 4,1, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,4); - pathB.cubicTo(1,3, 4,1, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void xOp1u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 4); - path.cubicTo(4, 5, 3, 2, 6, 3); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(2, 3); - pathB.cubicTo(3, 6, 4, 1, 5, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void xOp1i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 4); - path.cubicTo(1, 5, 6, 0, 5, 1); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(0, 6); - pathB.cubicTo(1, 5, 4, 1, 5, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void xOp2i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 5); - path.cubicTo(0, 4, 3, 2, 6, 1); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(2, 3); - pathB.cubicTo(1, 6, 5, 1, 4, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void xOp3i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1,4); - path.cubicTo(0,5, 4,1, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,4); - pathB.cubicTo(1,3, 4,1, 5,0); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void findFirst1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,6, 5,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(1,2, 1,0, 6,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp112(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2,4); - path.cubicTo(2,3, 6,4, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(4,6); - pathB.cubicTo(0,1, 4,2, 3,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp113(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(2,4); - path.cubicTo(3,5, 2.33333325f,4.33333349f, 3.83333325f,3.83333349f); - path.close(); - pathB.moveTo(3,5); - pathB.cubicTo(2.33333325f,4.33333349f, 3.83333325f,3.83333349f, 2,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp114(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 3); - pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp114asQuad(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 3); - pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1); - pathB.close(); - SkPath qPath, qPathB; - CubicPathToQuads(path, &qPath); - CubicPathToQuads(pathB, &qPathB); - testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename); -} - -static void quadOp10i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0, 0); - path.quadTo(1, 8, 3, 5); - path.lineTo(8, 1); - path.close(); - pathB.moveTo(0, 0); - pathB.quadTo(8, 1, 4, 8); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void kari1(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(39.9375, -5.8359375); - path1.lineTo(40.625, -5.7890625); - path1.lineTo(37.7109375, 1.3515625); - path1.lineTo(37.203125, 0.9609375); - path1.close(); - - SkPath path2; - path2.moveTo(37.52734375f, -1.44140625f); - path2.cubicTo(37.8736991882324f, -1.69921875f, 38.1640625f, -2.140625f, 38.3984375f, -2.765625f); - path2.lineTo(38.640625f, -2.609375f); - path2.cubicTo(38.53125f, -1.89583337306976f, 38.0664443969727f, -0.154893040657043f, 38.0664443969727f, -0.154893040657043f); - path2.cubicTo(38.0664443969727f, -0.154893040657043f, 37.1809883117676f, -1.18359375f, 37.52734375, -1.44140625f); - path2.close(); - - testPathOp(reporter, path1, path2, kDifference_SkPathOp, filename); -} - -static void issue2504(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(34.2421875, -5.976562976837158203125); - path1.lineTo(35.453121185302734375, 0); - path1.lineTo(31.9375, 0); - path1.close(); - - SkPath path2; - path2.moveTo(36.71843719482421875, 0.8886508941650390625); - path2.cubicTo(36.71843719482421875, 0.8886508941650390625, - 35.123386383056640625, 0.554015457630157470703125, - 34.511409759521484375, -0.1152553558349609375); - path2.cubicTo(33.899425506591796875, -0.7845261096954345703125, - 34.53484344482421875, -5.6777553558349609375, - 34.53484344482421875, -5.6777553558349609375); - path2.close(); - testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void issue2540(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(26.5054988861083984375, 85.73960113525390625); - path1.cubicTo(84.19739532470703125, 17.77140045166015625, 16.93920135498046875, 101.86199951171875, 12.631000518798828125, 105.24700164794921875); - path1.cubicTo(11.0819997787475585937500000, 106.46399688720703125, 11.5260000228881835937500000, 104.464996337890625, 11.5260000228881835937500000, 104.464996337890625); - path1.lineTo(23.1654987335205078125, 89.72879791259765625); - path1.cubicTo(23.1654987335205078125, 89.72879791259765625, -10.1713008880615234375, 119.9160003662109375, -17.1620006561279296875, 120.8249969482421875); - path1.cubicTo(-19.1149997711181640625, 121.07900238037109375, -18.0380001068115234375, 119.79299163818359375, -18.0380001068115234375, 119.79299163818359375); - path1.cubicTo(-18.0380001068115234375, 119.79299163818359375, 14.22100067138671875, 90.60700225830078125, 26.5054988861083984375, 85.73960113525390625); - path1.close(); - - SkPath path2; - path2.moveTo(-25.077999114990234375, 124.9120025634765625); - path2.cubicTo(-25.077999114990234375, 124.9120025634765625, -25.9509983062744140625, 125.95400238037109375, -24.368999481201171875, 125.7480010986328125); - path2.cubicTo(-16.06999969482421875, 124.66899871826171875, 1.2680000066757202148437500, 91.23999786376953125, 37.264003753662109375, 95.35400390625); - path2.cubicTo(37.264003753662109375, 95.35400390625, 11.3710002899169921875, 83.7339935302734375, -25.077999114990234375, 124.9120025634765625); - path2.close(); - testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void rects1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(6, 0); - path.lineTo(6, 6); - path.lineTo(0, 6); - path.close(); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.moveTo(0, 0); - pathB.lineTo(1, 0); - pathB.lineTo(1, 1); - pathB.lineTo(0, 1); - pathB.close(); - pathB.moveTo(0, 0); - pathB.lineTo(2, 0); - pathB.lineTo(2, 2); - pathB.lineTo(0, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void rects2(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(4, 0); - path.lineTo(4, 4); - path.lineTo(0, 4); - path.close(); - path.moveTo(3, 3); - path.lineTo(4, 3); - path.lineTo(4, 4); - path.lineTo(3, 4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 3); - pathB.lineTo(6, 3); - pathB.lineTo(6, 6); - pathB.lineTo(3, 6); - pathB.close(); - pathB.moveTo(3, 3); - pathB.lineTo(4, 3); - pathB.lineTo(4, 4); - pathB.lineTo(3, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void rects3(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 4, 4, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void rects4(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void issue2753(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - path1.moveTo(142.701f, 110.568f); - path1.lineTo(142.957f, 100); - path1.lineTo(153.835f, 100); - path1.lineTo(154.592f, 108.188f); - path1.cubicTo(154.592f, 108.188f, 153.173f, 108.483f, 152.83f, 109.412f); - path1.cubicTo(152.83f, 109.412f, 142.701f, 110.568f, 142.701f, 110.568f); - path1.close(); - - SkPath path2; - path2.moveTo(39, 124.001f); - path2.cubicTo(39, 124.001f, 50.6f, 117.001f, 50.6f, 117.001f); - path2.cubicTo(50.6f, 117.001f, 164.601f, 85.2f, 188.201f, 117.601f); - path2.cubicTo(188.201f, 117.601f, 174.801f, 93, 39, 124.001f); - path2.close(); - - testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void issue2808(skiatest::Reporter* reporter, const char* filename) { - SkPath path1, path2; - - path1.moveTo(509.20300293f, 385.601989746f); - path1.quadTo(509.20300293f, 415.68838501f, 487.928710938f, 436.96270752f); - path1.quadTo(466.654388428f, 458.236999512f, 436.567993164f, 458.236999512f); - path1.quadTo(406.4815979f, 458.236999512f, 385.207275391f, 436.96270752f); - path1.quadTo(363.932983398f, 415.68838501f, 363.932983398f, 385.601989746f); - path1.quadTo(363.932983398f, 355.515594482f, 385.207275391f, 334.241271973f); - path1.quadTo(406.4815979f, 312.96697998f, 436.567993164f, 312.96697998f); - path1.quadTo(466.654388428f, 312.96697998f, 487.928710938f, 334.241271973f); - path1.quadTo(509.20300293f, 355.515594482f, 509.20300293f, 385.601989746f); - path1.close(); - - path2.moveTo(449.033996582f, 290.87298584f); - path2.quadTo(449.033996582f, 301.028259277f, 441.853149414f, 308.209106445f); - path2.quadTo(434.672271729f, 315.389984131f, 424.516998291f, 315.389984131f); - path2.quadTo(414.361724854f, 315.389984131f, 407.180847168f, 308.209106445f); - path2.quadTo(400, 301.028259277f, 400, 290.87298584f); - path2.quadTo(400, 280.717712402f, 407.180847168f, 273.536865234f); - path2.quadTo(414.361724854f, 266.355987549f, 424.516998291f, 266.355987549f); - path2.quadTo(434.672271729f, 266.355987549f, 441.853149414f, 273.536865234f); - path2.quadTo(449.033996582f, 280.717712402f, 449.033996582f, 290.87298584f); - path2.close(); - - testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void cubicOp115(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,4, 2,1, 5,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(3,5, 1,0, 4,3); - pathB.close(); - SkPath path2(path); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void testRect1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, path2; - path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); - path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); -// path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); - testPathOp(reporter, path, path2, kUnion_SkPathOp, filename); -} - -static void testRect2(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(4, 4, 5, 5, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); - pathB.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp116(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(4,6, 2,0, 2,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(0,2, 1,0, 6,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp117(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(4,5, 6,0, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(0,1, 1,0, 5,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp118(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(4,6, 5,1, 6,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,5); - pathB.cubicTo(2,6, 1,0, 6,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loop1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(1,5, -5.66666651f,3.33333349f, 8.83333302f,2.33333349f); - path.close(); - pathB.moveTo(1,5); - pathB.cubicTo(-5.66666651f,3.33333349f, 8.83333302f,2.33333349f, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -#include "SkPathOpsCubic.h" - -static void loop1asQuad(skiatest::Reporter* reporter, const char* filename) { - CubicPts cubic1 = {{{0,1}, {1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.33333349f}}}; - CubicPts cubic2 = {{{1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.33333349f}, {0,1}}}; - SkDCubic c1, c2; - c1.debugSet(cubic1.fPts); - c2.debugSet(cubic2.fPts); - double c1InflectionTs[2], c2InflectionTs[2]; - SkDEBUGCODE(int c1InfTCount =) c1.findInflections(c1InflectionTs); - SkASSERT(c1InfTCount == 2); - SkDEBUGCODE(int c2InfTCount =) c2.findInflections(c2InflectionTs); - SkASSERT(c2InfTCount == 1); - SkASSERT(c1InflectionTs[0] > c1InflectionTs[1]); - SkDCubicPair c1pair = c1.chopAt(c1InflectionTs[0]); - SkDCubicPair c1apair = c1pair.first().chopAt(c1InflectionTs[1]); - SkDCubicPair c2pair = c2.chopAt(c2InflectionTs[0]); - SkDQuad q1[2] = { c1pair.first().toQuad(), c1pair.second().toQuad() }; - SkDQuad q1a[2] = { c1apair.first().toQuad(), c1apair.second().toQuad() }; - SkDQuad q2[2] = { c2pair.first().toQuad(), c2pair.second().toQuad() }; - SkPath path, pathB; - path.moveTo(q1a[0].fPts[0].asSkPoint()); - path.quadTo(q1a[0].fPts[1].asSkPoint(), q1a[0].fPts[2].asSkPoint()); - path.quadTo(q1a[1].fPts[1].asSkPoint(), q1a[1].fPts[2].asSkPoint()); - path.quadTo(q1[1].fPts[1].asSkPoint(), q1[1].fPts[2].asSkPoint()); - path.close(); - pathB.moveTo(q2[0].fPts[0].asSkPoint()); - pathB.quadTo(q2[0].fPts[1].asSkPoint(), q2[0].fPts[2].asSkPoint()); - pathB.quadTo(q2[1].fPts[1].asSkPoint(), q2[1].fPts[2].asSkPoint()); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loop2(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(3,4, 3.f,4.f, 4.5f,1.5f); - path.close(); - pathB.moveTo(3,4); - pathB.cubicTo(3.f,4.f, 4.5f,1.5f, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loop3(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(3,5, -3.66666651f,0, 10.5f,-1.66666651f); - path.close(); - pathB.moveTo(3,5); - pathB.cubicTo(-3.66666651f,0, 10.5f,-1.66666651f, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loop4(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,5); - path.cubicTo(1,5, 1,4, 0.833333313f,3); - path.close(); - pathB.moveTo(1,5); - pathB.cubicTo(1,4, 0.833333313f,3, 0,5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -#include "SkParsePath.h" - -static void issue3517(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - - const char str[] = "M31.35 57.75L31.35 57.75C31.9 57.7486 32.45 57.7948 33 57.7413C33.55 57.6878 34.1 57.5014 34.65 57.4291C35.2 57.3569 35.75 57.3223 36.3 57.3079C36.85 57.2935 37.4 57.3143 37.95 57.3428C38.5 57.3712 39.05 57.4112 39.6 57.4786C40.15 57.546 40.7 57.7029 41.25 57.7472C41.8 57.7916 42.35 57.7962 42.9 57.7445C43.45 57.6928 44 57.5345 44.55 57.4373C45.1 57.34 45.65 57.2115 46.2 57.1611C46.75 57.1107 47.3 57.1371 47.85 57.1349C48.4 57.1327 48.95 57.144 49.5 57.1478C50.05 57.1516 50.6 57.1553 51.15 57.1579C51.7 57.1605 52.25 57.1601 52.8 57.1634C53.35 57.1667 53.9 57.1731 54.45 57.1776C55 57.182 55.55 57.1916 56.1 57.19C56.65 57.1884 57.2 57.178 57.75 57.168C58.3 57.158 58.85 57.1355 59.4 57.1299C59.95 57.1243 60.5 57.1338 61.05 57.1345C61.6 57.1352 62.15 57.124 62.7 57.134C63.25 57.1441 63.8 57.1731 64.35 57.195C64.9 57.2169 65.45 57.2532 66 57.2655C66.55 57.2778 67.1 57.2647 67.65 57.2687C68.2 57.2728 68.75 57.267 69.3 57.2896C69.85 57.3122 70.4 57.371 70.95 57.4044C71.5 57.4377 72.05 57.4668 72.6 57.4896C73.15 57.5123 73.7 57.545 74.25 57.5408C74.8 57.5365 75.35 57.5068 75.9 57.4641C76.45 57.4213 77 57.3244 77.55 57.2842C78.1 57.244 78.65 57.2163 79.2 57.2228C79.75 57.2293 80.3 57.29 80.85 57.3232C81.4 57.3563 81.95 57.396 82.5 57.4219C83.05 57.4478 83.6 57.4637 84.15 57.4787C84.7 57.4937 85.25 57.5011 85.8 57.5121C86.35 57.523 86.9 57.5411 87.45 57.5444C88 57.5477 88.55 57.5663 89.1 57.5318C89.65 57.4972 90.2 57.3126 90.75 57.337C91.3 57.3613 91.85 57.6088 92.4 57.6776C92.95 57.7465 93.5 57.7379 94.05 57.75C94.6 57.7621 95.15 57.75 95.7 57.75L95.7 57.75L31.35 57.75Z"; - SkParsePath::FromSVGString(str, &path); - - const char strB[] = "M31.35 57.75L31.35 57.75C31.9 57.7514 32.45 57.7052 33 57.7587C33.55 57.8122 34.1 57.9986 34.65 58.0709C35.2 58.1431 35.75 58.1777 36.3 58.1921C36.85 58.2065 37.4 58.1857 37.95 58.1572C38.5 58.1288 39.05 58.0888 39.6 58.0214C40.15 57.954 40.7 57.7971 41.25 57.7528C41.8 57.7084 42.35 57.7038 42.9 57.7555C43.45 57.8072 44 57.9655 44.55 58.0627C45.1 58.16 45.65 58.2885 46.2 58.3389C46.75 58.3893 47.3 58.3629 47.85 58.3651C48.4 58.3673 48.95 58.356 49.5 58.3522C50.05 58.3484 50.6 58.3447 51.15 58.3421C51.7 58.3395 52.25 58.3399 52.8 58.3366C53.35 58.3333 53.9 58.3269 54.45 58.3224C55 58.318 55.55 58.3084 56.1 58.31C56.65 58.3116 57.2 58.322 57.75 58.332C58.3 58.342 58.85 58.3645 59.4 58.3701C59.95 58.3757 60.5 58.3662 61.05 58.3655C61.6 58.3648 62.15 58.376 62.7 58.366C63.25 58.3559 63.8 58.3269 64.35 58.305C64.9 58.2831 65.45 58.2468 66 58.2345C66.55 58.2222 67.1 58.2353 67.65 58.2313C68.2 58.2272 68.75 58.233 69.3 58.2104C69.85 58.1878 70.4 58.129 70.95 58.0956C71.5 58.0623 72.05 58.0332 72.6 58.0104C73.15 57.9877 73.7 57.955 74.25 57.9592C74.8 57.9635 75.35 57.9932 75.9 58.0359C76.45 58.0787 77 58.1756 77.55 58.2158C78.1 58.256 78.65 58.2837 79.2 58.2772C79.75 58.2707 80.3 58.21 80.85 58.1768C81.4 58.1437 81.95 58.104 82.5 58.0781C83.05 58.0522 83.6 58.0363 84.15 58.0213C84.7 58.0063 85.25 57.9989 85.8 57.9879C86.35 57.977 86.9 57.9589 87.45 57.9556C88 57.9523 88.55 57.9337 89.1 57.9682C89.65 58.0028 90.2 58.1874 90.75 58.163C91.3 58.1387 91.85 57.8912 92.4 57.8224C92.95 57.7535 93.5 57.7621 94.05 57.75C94.6 57.7379 95.15 57.75 95.7 57.75L95.7 57.75L31.35 57.75Z"; - SkParsePath::FromSVGString(strB, &pathB); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubicOp119(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,5, 2,1, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(1,3, 1,0, 5,3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp120(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,4, 2,1, 4,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(0,4, 1,0, 4,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp121(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,4, 3,2, 4,3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(3,4, 1,0, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -// FIXME : haven't debugged this failure yet -static void cubicOp122(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,5, 4,1, 4,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,4); - pathB.cubicTo(0,4, 1,0, 5,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp123(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,5, 2,0, 6,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(0,6, 1,0, 5,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loop5(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,2); - path.cubicTo(1,2, 1,1.66666663f, 0.833333313f,1.33333325f); - path.close(); - pathB.moveTo(1,2); - pathB.cubicTo(1,1.66666663f, 0.833333313f,1.33333325f, 0,2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loop6(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(1,3, -1.66666675f,1.66666663f, 4.16666651f,1.00000012f); - path.close(); - pathB.moveTo(1,3); - pathB.cubicTo(-1.66666675f,1.66666663f, 4.16666651f,1.00000012f, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp124(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,5, 6,0, 3,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(0,3, 1,0, 5,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp125(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,6, 3,1, 6,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,3); - pathB.cubicTo(2,6, 1,0, 6,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp126(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,3, 6,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(1,2, 1,0, 3,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp127(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(1,5, 6,0, 3,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(0,3, 1,0, 5,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp128(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(0,3, 3,2, 5,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,3); - pathB.cubicTo(2,5, 1,0, 3,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp129(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(3,4, 2,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(1,2, 6,5, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp130(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(4,6, 3,0, 2,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,3); - pathB.cubicTo(1,2, 6,5, 6,4); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -#include "SkGeometry.h" - -static void complex_to_quads(const SkPoint pts[], SkPath* path) { - SkScalar loopT[3]; - if (SkDCubic::ComplexBreak(pts, loopT)) { - SkPoint cubicPair[7]; - SkChopCubicAt(pts, cubicPair, loopT[0]); - SkDCubic c1, c2; - c1.set(cubicPair); - c2.set(&cubicPair[3]); - SkDQuad q1 = c1.toQuad(); - SkDQuad q2 = c2.toQuad(); - path->quadTo(q1[1].asSkPoint(), q1[2].asSkPoint()); - path->quadTo(q2[1].asSkPoint(), q2[2].asSkPoint()); - } else { - path->cubicTo(pts[1], pts[2], pts[3]); - } -} - -static void cubicOp130a(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - SkPoint pts[] = { {5,6}, {4,6}, {3,0}, {2,1} }; - complex_to_quads(pts, &path); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,3); - SkPoint pts2[] = { {0,3}, {1,2}, {6,5}, {6,4} }; - complex_to_quads(pts2, &path); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp131(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(3,4, 3,0, 6,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,3); - pathB.cubicTo(2,6, 1,0, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void circlesOp1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addCircle(0, 1, 2, SkPath::kCCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addCircle(0, 1, 1, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void circlesOp2(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addCircle(0, 1, 4, SkPath::kCCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addCircle(0, 4, 3, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void rRect1x(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(20.65f, 5.65f); - path.conicTo(20.65f, 1.13612f, 25.1404f, 0.65f, 0.888488f); - path.lineTo(25.65f, 0.65f); - path.lineTo(26.1596f, 0.67604f); - path.conicTo(30.65f, 1.13612f, 30.65f, 5.65f, 0.888488f); - path.lineTo(30.65f, 25.65f); - path.conicTo(30.65f, 20.65f, 25.65f, 20.65f, 0.707107f); - path.lineTo(20.65f, 20.65f); - path.lineTo(20.65f, 5.65f); - path.close(); - path.moveTo(20.65f, 20.65f); - path.lineTo(5.65f, 20.65f); - path.conicTo(0.65f, 20.65f, 0.65f, 25.65f, 0.707107f); - path.lineTo(0.65f, 45.65f); - path.conicTo(0.65f, 50.65f, 5.65f, 50.65f, 0.707107f); - path.lineTo(25.65f, 50.65f); - path.conicTo(30.65f, 50.65f, 30.65f, 45.65f, 0.707107f); - path.lineTo(30.65f, 25.65f); - path.conicTo(30.65f, 30.65f, 25.65f, 30.65f, 0.707107f); - path.conicTo(20.65f, 30.65f, 20.65f, 25.65f, 0.707107f); - path.lineTo(20.65f, 20.65f); - path.close(); - SkPath path1(path); - - path.reset(); - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(20.65f, 45.65f); - path.lineTo(20.65f, 25.65f); - path.conicTo(20.65f, 20.65f, 25.65f, 20.65f, 0.707107f); - path.lineTo(45.65f, 20.65f); - path.conicTo(50.65f, 20.65f, 50.65f, 25.65f, 0.707107f); - path.lineTo(50.65f, 45.65f); - path.conicTo(50.65f, 50.65f, 45.65f, 50.65f, 0.707107f); - path.lineTo(25.65f, 50.65f); - path.conicTo(20.65f, 50.65f, 20.65f, 45.65f, 0.707107f); - path.close(); - SkPath path2(path); - - testPathOp(reporter, path1, path2, kDifference_SkPathOp, filename); -} - -static void loop7(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(3,4, -1,0, 8.5f,-2.5f); - path.close(); - pathB.moveTo(3,4); - pathB.cubicTo(-1,0, 8.5f,-2.5f, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void rects5(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(5, 5, 6, 6, SkPath::kCW_Direction); - path.addRect(5, 5, 6, 6, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kEvenOdd_FillType); - pathB.addRect(0, 0, 6, 6, SkPath::kCW_Direction); - pathB.addRect(5, 5, 6, 6, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loop8(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(1,4, -3.83333325f,0.166666627f, 6,-1); - path.close(); - pathB.moveTo(1,4); - pathB.cubicTo(-3.83333325f,0.166666627f, 6,-1, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loop9(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(1,3, -2.5f,0, 3.33333325f,-0.666666627f); - path.close(); - pathB.moveTo(1,3); - pathB.cubicTo(-2.5f,0, 3.33333325f,-0.666666627f, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void circlesOp3(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addCircle(0, 1, 2, SkPath::kCCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addCircle(3, 5, 3, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loop10(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(5,6); - path.cubicTo(1,2, 1,2, -3.66666651f,13.333334f); - path.close(); - pathB.moveTo(1,2); - pathB.cubicTo(1,2, -3.66666651f,13.333334f, 5,6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loop11(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(0,1); - path.cubicTo(1,3, -1.83333349f,1.33333337f, 4,-1); - path.close(); - pathB.moveTo(1,3); - pathB.cubicTo(-1.83333349f,1.33333337f, 4,-1, 0,1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp132(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(3,4, 3,0, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,3); - pathB.cubicTo(2,3, 6,5, 4,3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loop12(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(1,2); - path.cubicTo(0,6, -3.16666675f,3.66666675f, 6.33333349f,3.33333349f); - path.close(); - pathB.moveTo(0,6); - pathB.cubicTo(-3.16666675f,3.66666675f, 6.33333349f,3.33333349f, 1,2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp133(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(5,6, 5,0, 4,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(1,4, 6,5, 6,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp134(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(5,6, 6,0, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(1,3, 6,5, 6,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp135(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(5,6, 6,0, 4,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,6); - pathB.cubicTo(1,4, 6,5, 6,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp136(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(5,6, 5,0, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(1,3, 6,5, 6,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp136a(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.quadTo(5,0, 3,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,5); - pathB.cubicTo(1,3, 6,5, 6,5); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics137(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 5); - path.cubicTo(3, 6, 1, 0, 3, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 1); - pathB.cubicTo(2, 3, 5, 0, 6, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics138(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 5); - path.cubicTo(3, 6, 1, 0, 4, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 1); - pathB.cubicTo(2, 4, 5, 0, 6, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -// three curves intersect successfully nearby -- the angle only gets 2 of the 3 pts -static void cubicOp139(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(0,4, 3,1, 5,1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,3); - pathB.cubicTo(1,5, 2,0, 4,0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp140(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(1,2, 5,4, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(4,5); - pathB.cubicTo(2,3, 2,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp141(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,2); - path.cubicTo(1,2, 6,4, 3,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(4,6); - pathB.cubicTo(2,3, 2,0, 2,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void quadRect1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(6,15); - path.quadTo(16,0, 8,4); - path.quadTo(2,7, 12,12); - path.close(); - pathB.addRect(4,11, 13,16); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void quadRect2(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(5,12); - path.quadTo(15,7, 9,4); - path.quadTo(1,0, 11,15); - path.close(); - pathB.addRect(4,11, 13,16); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void quadRect3(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(12,12); - path.quadTo(2,7, 8,4); - path.quadTo(16,0, 6,15); - path.close(); - pathB.addRect(4,11, 13,16); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void quadRect4(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(11,15); - path.quadTo(1,0, 9,4); - path.quadTo(15,7, 5,12); - path.close(); - pathB.addRect(4,11, 13,16); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void quadRect5(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(11,13); - path.quadTo(4,4, 8,4); - path.quadTo(12,4, 5,13); - path.close(); - pathB.addRect(4,11, 13,16); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void quadRect6(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(5,13); - path.quadTo(12,4, 8,4); - path.quadTo(4,4, 11,13); - path.close(); - pathB.addRect(4,11, 13,16); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops4i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 3); - path.cubicTo(0, 2, 0, 2, -1.66666663f, 2.16666675f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(0, 2, -1.66666663f, 2.16666675f, 0, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops5i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 2); - path.cubicTo(0, 2, 0, 2, 0.166666672f, 2.66666675f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(0, 2, 0.166666672f, 2.66666675f, 1, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubicOp142(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(5,6); - path.cubicTo(2,5, 2,1, 1,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1,2); - pathB.cubicTo(0,1, 6,5, 5,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics6d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 5); - path.cubicTo(1, 5, 4, 2, 4, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 4); - pathB.cubicTo(0, 4, 5, 3, 5, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics7d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 6); - path.cubicTo(2, 4, 5, 1, 3, 1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(1, 3, 6, 2, 4, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics8d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 5); - path.cubicTo(2, 4, 5, 1, 3, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(2, 3, 5, 2, 4, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics9d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(2, 6, 3, 1, 5, 1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 3); - pathB.cubicTo(1, 5, 4, 2, 6, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics10u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(1, 6, 4, 1, 5, 1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(1, 5, 4, 2, 6, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void cubics11i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(2, 5, 3, 2, 5, 1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 3); - pathB.cubicTo(1, 5, 4, 2, 5, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubics12d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(0, 4, 5, 3, 5, 1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 5); - pathB.cubicTo(1, 5, 4, 2, 4, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics13d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 3); - path.cubicTo(1, 5, 4, 2, 5, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 4); - pathB.cubicTo(2, 5, 3, 2, 5, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics14d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 3); - path.cubicTo(0, 4, 3, 1, 3, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 3); - pathB.cubicTo(0, 3, 3, 2, 4, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics15d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(3, 5, 4, 0, 4, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 4); - pathB.cubicTo(2, 4, 5, 1, 5, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics16i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(2, 5, 5, 0, 4, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(2, 4, 5, 1, 5, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubics17d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(3, 4, 4, 1, 4, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(2, 4, 5, 1, 4, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics18d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(1, 3, 4, 0, 2, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 4); - pathB.cubicTo(0, 2, 5, 1, 3, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics19d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(2, 3, 5, 2, 4, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 5); - pathB.cubicTo(2, 4, 5, 1, 3, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubicOp157(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1,5); - path.cubicTo(1,3, 6,2, 4,2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2,6); - pathB.cubicTo(2,4, 5,1, 3,1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics20d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 2); - path.cubicTo(0, 3, 6, 0, 3, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 6); - pathB.cubicTo(2, 3, 2, 1, 3, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loops20i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 2); - path.cubicTo(0, 2, 0.833333313f, 2, 1, 3.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(0.833333313f, 2, 1, 3.66666651f, 1, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops21i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 2); - path.cubicTo(0, 2, 0.833333313f, 2, 1, 4); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(0.833333313f, 2, 1, 4, 1, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops22i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 3); - path.cubicTo(0, 3, 0.833333313f, 3, 1, 4.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 3); - pathB.cubicTo(0.833333313f, 3, 1, 4.66666651f, 1, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops23i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(0, 1, 6.16666698f, 5.66666698f, -5.66666651f, 6.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 1); - pathB.cubicTo(6.16666698f, 5.66666698f, -5.66666651f, 6.66666651f, 1, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops24i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 2); - path.cubicTo(0, 2, 0.833333313f, 2, 1, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(0.833333313f, 2, 1, 3, 1, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops25i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(0, 5, 0.833333313f, 5, 1, 7); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(0.833333313f, 5, 1, 7, 1, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops26i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 6); - path.cubicTo(0, 2, 6.16666698f, 6.66666698f, -5.66666651f, 7.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(6.16666698f, 6.66666698f, -5.66666651f, 7.66666651f, 1, 6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops27i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 3); - path.cubicTo(0, 3, 0.833333313f, 3, 1, 4.33333349f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 3); - pathB.cubicTo(0.833333313f, 3, 1, 4.33333349f, 1, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops28i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 3); - path.cubicTo(1, 3, 1.83333337f, 3, 2, 4.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 3); - pathB.cubicTo(1.83333337f, 3, 2, 4.66666651f, 2, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops29i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(0, 4, 1.66666663f, 4, 2, 7.33333302f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 4); - pathB.cubicTo(1.66666663f, 4, 2, 7.33333302f, 2, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops30i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(0, 4, 1.66666663f, 4, 2, 8); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 4); - pathB.cubicTo(1.66666663f, 4, 2, 8, 2, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops31i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 5); - path.cubicTo(1, 5, 1.83333337f, 5, 2, 6.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(1.83333337f, 5, 2, 6.66666651f, 2, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops32i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 6); - path.cubicTo(1, 6, 1.83333337f, 6, 2, 8); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 6); - pathB.cubicTo(1.83333337f, 6, 2, 8, 2, 6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops33i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 6); - path.cubicTo(1, 2, 7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f, 2, 6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops33iMod(skiatest::Reporter* reporter, const char* filename) { - SkPoint pts[] = {{2, 6}, {1, 2}, {7.16666698f, 6.66666698f}, {-4.66666651f, 7.66666651f}, - {1, 2}, {7.16666698f, 6.66666698f}, {-4.66666651f, 7.66666651f}, {2, 6}}; - bool up = false; - float offset = 0.0380172729f; - float step = 7.62939453e-006f; - bool lastResult = true; - // for (int i = 0; i < 30; ++i) { - SkString name(filename); - // name.appendS32(i); - // if (i > 0) { - // SkDebugf("\n\n<div id=\"%s\">\n", name.c_str()); - // } - pts[5].fY = 6.66666698f + offset; - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(pts[0]); - path.cubicTo(pts[1], pts[2], pts[3]); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(pts[4]); - pathB.cubicTo(pts[5], pts[6], pts[7]); - pathB.close(); - bool result = testPathOp(reporter, path, pathB, kIntersect_SkPathOp, name.c_str()); - if (lastResult != result) { - up = !up; - } - step /= 2; - offset += up ? step : -step; - lastResult = result; - // } -} - - -static void loops33iAsQuads(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 6); - path.cubicTo(1, 2, 7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f, 2, 6); - pathB.close(); - SkPath qPath, qPathB; - CubicPathToQuads(path, &qPath); - CubicPathToQuads(pathB, &qPathB); - testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename); -} - -static void loops34i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(0, 4, 2.5f, 4, 3, 9); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 4); - pathB.cubicTo(2.5f, 4, 3, 9, 3, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops35i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(0, 4, 2.5f, 4, 3, 10); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 4); - pathB.cubicTo(2.5f, 4, 3, 10, 3, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops36i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(1, 4, 2.66666675f, 4, 3, 8); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(2.66666675f, 4, 3, 8, 3, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops37i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(1, 4, 1.83333337f, 4, 2, 5.33333349f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(1.83333337f, 4, 2, 5.33333349f, 2, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops38i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(2, 4, 2.83333325f, 4, 3, 6); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 4); - pathB.cubicTo(2.83333325f, 4, 3, 6, 3, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops39i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 5); - path.cubicTo(0, 5, 2.5f, 5, 3, 10); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(2.5f, 5, 3, 10, 3, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops40i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 5); - path.cubicTo(0, 5, 2.5f, 5, 3, 11); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(2.5f, 5, 3, 11, 3, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops40iAsQuads(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 5); - path.cubicTo(0, 5, 2.5f, 5, 3, 11); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(2.5f, 5, 3, 11, 3, 5); - pathB.close(); - SkPath qPath, qPathB; - CubicPathToQuads(path, &qPath); - CubicPathToQuads(pathB, &qPathB); - testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename); -} - -static void loops44i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 5); - path.cubicTo(0, 1, 7.33333302f, 5.33333349f, -7, 7); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 1); - pathB.cubicTo(7.33333302f, 5.33333349f, -7, 7, 1, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops45i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 6); - path.cubicTo(0, 2, 7.33333302f, 6.33333302f, -7, 8); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(7.33333302f, 6.33333302f, -7, 8, 1, 6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops46i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 6); - path.cubicTo(1, 2, 8.33333302f, 6.33333302f, -6, 8); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(8.33333302f, 6.33333302f, -6, 8, 2, 6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -/* -FAILED: d:\cygwin\puregit\tests\pathopsextendedtest.cpp:346 0 */ -static void loops47i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(0, 1, 6, 5.83333302f, -4, 8); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 1); - pathB.cubicTo(6, 5.83333302f, -4, 8, 2, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops48i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 6); - path.cubicTo(0, 1, 9.33333302f, 6.83333302f, -8.33333302f, 9.16666603f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 1); - pathB.cubicTo(9.33333302f, 6.83333302f, -8.33333302f, 9.16666603f, 2, 6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops49i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 2); - path.cubicTo(1, 4, -0.166666687f, 2.66666675f, 1.66666675f, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(-0.166666687f, 2.66666675f, 1.66666675f, 2, 0, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops50i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 3); - path.cubicTo(1, 5, -0.166666687f, 3.66666675f, 1.66666675f, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(-0.166666687f, 3.66666675f, 1.66666675f, 3, 0, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops51i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 2); - path.cubicTo(2, 4, 0.833333313f, 2.66666675f, 2.66666675f, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 4); - pathB.cubicTo(0.833333313f, 2.66666675f, 2.66666675f, 2, 1, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops52i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 3); - path.cubicTo(2, 5, 0.833333313f, 3.66666675f, 2.66666675f, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 5); - pathB.cubicTo(0.833333313f, 3.66666675f, 2.66666675f, 3, 1, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops53i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 3); - path.cubicTo(3, 5, 1.83333325f, 3.66666675f, 3.66666651f, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 5); - pathB.cubicTo(1.83333325f, 3.66666675f, 3.66666651f, 3, 2, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops54i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 2); - path.cubicTo(1, 4, 0, 3, 1.66666675f, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 4); - pathB.cubicTo(0, 3, 1.66666675f, 2, 0, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops55i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 3); - path.cubicTo(1, 5, 0, 4, 1.66666675f, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(0, 4, 1.66666675f, 3, 0, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops56i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 2); - path.cubicTo(2, 4, 0.99999994f, 3, 2.66666675f, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 4); - pathB.cubicTo(0.99999994f, 3, 2.66666675f, 2, 1, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops57i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 3); - path.cubicTo(2, 5, 0.99999994f, 4, 2.66666675f, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 5); - pathB.cubicTo(0.99999994f, 4, 2.66666675f, 3, 1, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops58i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 3); - path.cubicTo(3, 5, 2, 4, 3.66666651f, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 5); - pathB.cubicTo(2, 4, 3.66666651f, 3, 2, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops58iAsQuads(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 3); - path.cubicTo(3, 5, 2, 4, 3.66666651f, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 5); - pathB.cubicTo(2, 4, 3.66666651f, 3, 2, 3); - pathB.close(); - SkPath qPath, qPathB; - CubicPathToQuads(path, &qPath); - CubicPathToQuads(pathB, &qPathB); -// SkPoint from = {2.61714339f,1.90228665f}; -// SkPoint to = {2.617045833359139f,1.9013528935803314f}; -// path_edit(from, to, &qPathB); - testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename); -} - -static void loops59i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 6); - path.cubicTo(1, 2, 7.33333302f, 1.66666663f, -7.5f, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(7.33333302f, 1.66666663f, -7.5f, 2, 0, 6); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops59iasQuads(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 6); - path.cubicTo(1, 2, 7.33333302f, 1.66666663f, -7.5f, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 2); - pathB.cubicTo(7.33333302f, 1.66666663f, -7.5f, 2, 0, 6); - pathB.close(); - SkPath qPath, qPathB; - CubicPathToQuads(path, &qPath); - CubicPathToQuads(pathB, &qPathB); - SkPoint from = {2.61714339f,1.90228665f}; - SkPoint to = {2.617045833359139f,1.9013528935803314f}; - path_edit(from, to, &qPathB); - testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename); -} - -static void cubics41d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(1, 4, 3, 0, 3, 1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 3); - pathB.cubicTo(1, 3, 1, 0, 4, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -void loops61i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(1, 5, -6.33333302f, 0.666666627f, 8, -1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(-6.33333302f, 0.666666627f, 8, -1, 0, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops62i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 2); - path.cubicTo(1, 6, -6.33333302f, 1.66666663f, 8, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 6); - pathB.cubicTo(-6.33333302f, 1.66666663f, 8, 0, 0, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops63i(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(2, 4, -4, -0.833333254f, 6, -3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 4); - pathB.cubicTo(-4, -0.833333254f, 6, -3, 0, 1); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubics44d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(2, 5, 3, 1, 6, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 3); - pathB.cubicTo(2, 6, 4, 3, 5, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics45u(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 3); - path.cubicTo(2, 6, 4, 3, 5, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(3, 4); - pathB.cubicTo(2, 5, 3, 1, 6, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -static void fuzz38(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(100.34f, 303.312f); - path.lineTo(-1e+08, 303.312f); - path.lineTo(102, 310.156f); - path.lineTo(100.34f, 310.156f); - path.lineTo(100.34f, 303.312f); - path.close(); - testPathOpCheck(reporter, path, pathB, kUnion_SkPathOp, filename, true); -} - -static void crbug_526025(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0xcf000000)); // 360, -2.14748e+09f -path.cubicTo(SkBits2Float(0x4e0d628f), SkBits2Float(0xceffffff), SkBits2Float(0x4e800003), SkBits2Float(0xcec6b143), SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffc)); // 5.93012e+08f, -2.14748e+09f, 1.07374e+09f, -1.66675e+09f, 1.07374e+09f, -1.07374e+09f -path.cubicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcde53aee), SkBits2Float(0x4e0d6292), SkBits2Float(0xc307820e), SkBits2Float(0x44627d00), SkBits2Float(0x437ffff2)); // 1.07374e+09f, -4.80731e+08f, 5.93012e+08f, -135.508f, 905.953f, 256 -path.lineTo(SkBits2Float(0x444bf3bc), SkBits2Float(0x4460537e)); // 815.808f, 897.305f -path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f -path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16 -path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512 -path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f -path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x44800000)); // 360, 1024 -path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140 - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321 -path.lineTo(SkBits2Float(0x45d5c000), SkBits2Float(0x43870000)); // 6840, 270 -path.lineTo(SkBits2Float(0xd0a00000), SkBits2Float(0x4cbebc20)); // -2.14748e+10f, 1e+08 -path.lineTo(SkBits2Float(0x451f7000), SkBits2Float(0x42800000)); // 2551, 64 -path.lineTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321 -path.close(); - - SkPath path2(path); - testPathOp(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzzX_392(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); -path.moveTo(SkBits2Float(0x41e80000), SkBits2Float(0x43bde212)); // 29, 379.766f -path.lineTo(SkBits2Float(0x41e80000), SkBits2Float(0x43bdc7ef)); // 29, 379.562f -path.conicTo(SkBits2Float(0x42a5861e), SkBits2Float(0x43c61f86), SkBits2Float(0x430b0610), SkBits2Float(0x43c61f86), SkBits2Float(0x3f7d23f3)); // 82.7619f, 396.246f, 139.024f, 396.246f, 0.98883f -path.conicTo(SkBits2Float(0x42a58e20), SkBits2Float(0x43c61f86), SkBits2Float(0x41e80000), SkBits2Float(0x43bde212), SkBits2Float(0x3f7d2cf5)); // 82.7776f, 396.246f, 29, 379.766f, 0.988967f -path.close(); - - SkPath path1(path); - path.setFillType(SkPath::kWinding_FillType); -path.moveTo(SkBits2Float(0xc36c7bd8), SkBits2Float(0xc3a31d72)); // -236.484f, -326.23f -path.lineTo(SkBits2Float(0xc367a4ae), SkBits2Float(0xc3a31d72)); // -231.643f, -326.23f -path.lineTo(SkBits2Float(0x430b0610), SkBits2Float(0x43c61f86)); // 139.024f, 396.246f -path.lineTo(SkBits2Float(0xc36c7bd8), SkBits2Float(0x43c61f86)); // -236.484f, 396.246f - - SkPath path2(path); - testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); -} - -static void dean2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f -path.cubicTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b), SkBits2Float(0x41531912), SkBits2Float(0x3f130322), SkBits2Float(0x4154a02b), SkBits2Float(0x3f2b74b3)); // 0.669749f, 13.2891f, 13.1936f, 0.574267f, 13.2891f, 0.669749f -path.cubicTo(SkBits2Float(0x414a835a), SkBits2Float(0x3ec07ba6), SkBits2Float(0x413fcc0d), SkBits2Float(0x3e193319), SkBits2Float(0x4134a02b), SkBits2Float(0x00000000)); // 12.6571f, 0.375943f, 11.9873f, 0.149609f, 11.2891f, 0 -path.lineTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f -path.close(); - SkPath path1(path); - - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f -path.cubicTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b), SkBits2Float(0x41531912), SkBits2Float(0x3f130322), SkBits2Float(0x4154a02b), SkBits2Float(0x3f2b74b3)); // 0.669749f, 13.2891f, 13.1936f, 0.574267f, 13.2891f, 0.669749f -path.lineTo(SkBits2Float(0x417ab74b), SkBits2Float(0x4154a02b)); // 15.6697f, 13.2891f -path.lineTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f -path.close(); - SkPath path2(path); - testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); -} - -static void cubics_d(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(3, 5, 1, 0, 3, 0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 1); - pathB.cubicTo(0, 3, 1, 0, 5, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics_d2(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 1); - path.cubicTo(2, 5, 2, 0, 2, 1); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 2); - pathB.cubicTo(1, 2, 1, 0, 5, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loops_i1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 3); - path.cubicTo(0, 4, -0.333333343f, 4.66666651f, 3, 5.83333349f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 4); - pathB.cubicTo(-0.333333343f, 4.66666651f, 3, 5.83333349f, 2, 3); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops_i2(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 4); - path.cubicTo(0, 5, -0.333333343f, 5.66666651f, 3, 6.83333302f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(-0.333333343f, 5.66666651f, 3, 6.83333302f, 2, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops_i3(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(2, 5); - path.cubicTo(0, 6, -0.333333343f, 6.66666651f, 3, 7.83333302f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 6); - pathB.cubicTo(-0.333333343f, 6.66666651f, 3, 7.83333302f, 2, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops_i4(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(1, 5, 0.666666627f, 5.66666651f, 4, 6.83333302f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 5); - pathB.cubicTo(0.666666627f, 5.66666651f, 4, 6.83333302f, 3, 4); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops_i5(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 5); - path.cubicTo(1, 6, 0.666666627f, 6.66666651f, 4, 7.83333302f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 6); - pathB.cubicTo(0.666666627f, 6.66666651f, 4, 7.83333302f, 3, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void loops_i6(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(4, 5); - path.cubicTo(2, 6, 1.66666663f, 6.66666651f, 5, 7.83333302f); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(2, 6); - pathB.cubicTo(1.66666663f, 6.66666651f, 5, 7.83333302f, 4, 5); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void cubics_d3(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(3, 4); - path.cubicTo(0, 6, 6, 1, 4, 2); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(1, 6); - pathB.cubicTo(2, 4, 4, 3, 6, 0); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void cubics_o(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(1, 4); - path.cubicTo(2, 6, 5, 0, 5, 3); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0, 5); - pathB.cubicTo(3, 5, 4, 1, 6, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); -} - -static void cubicOp158(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0,1); - path.cubicTo(2,4, 2,0, 2,0); - path.close(); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.moveTo(0,2); - pathB.cubicTo(0,2, 1,0, 4,2); - pathB.close(); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void loop17(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.moveTo(1, 2); - path.cubicTo(0, 3, -0.333333343f, 3.33333325f, 0.833333373f, 3.5f); - path.close(); - pathB.moveTo(0, 3); - pathB.cubicTo(-0.333333343f, 3.33333325f, 0.833333373f, 3.5f, 1, 2); - pathB.close(); - testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - -static void circlesOp4(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; - path.setFillType(SkPath::kWinding_FillType); - path.addCircle(0, 1, 5, SkPath::kCW_Direction); - pathB.setFillType(SkPath::kWinding_FillType); - pathB.addCircle(0, 1, 0, SkPath::kCW_Direction); - testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); -} - -static void bug5240(skiatest::Reporter* reporter, const char* filename) { - SkPath path; -path.moveTo(815, 82); -path.cubicTo(814.4794311523438f, 82.7868881225586f, 814.5330810546875f, -82.6266555786133f, 814.5291137695312f, 82.6252212524414f); -path.cubicTo(814.5229492187500f, 82.6230010986328f, 814.3790283203125f, -83.0008087158203f, 813.8533935546875f, 82.7072601318359f); -path.close(); - testPathOp(reporter, path, path, kUnion_SkPathOp, filename); -} - -static void android1(skiatest::Reporter* reporter, const char* filename) { - SkPath path, pathB; +/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#include "PathOpsExtendedTest.h"
+#include "PathOpsTestCommon.h"
+
+class PathTest_Private {
+public:
+ PathTest_Private(SkPath* path)
+ : fPath(path) {}
+
+ void setPt(int index, SkScalar x, SkScalar y) {
+ fPath->setPt(index, x, y);
+ }
+
+ SkPath* fPath;
+};
+
+static void path_edit(const SkPoint& from, const SkPoint& to, SkPath* path) {
+ PathTest_Private testPath(path);
+ for (int index = 0; index < path->countPoints(); ++index) {
+ if (SkDPoint::ApproximatelyEqual(path->getPoint(index), from)) {
+ testPath.setPt(index, to.fX, to.fY);
+ return;
+ }
+ }
+}
+
+static void cubicOp1d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,2, 1,0, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,1, 1,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp2d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,1, 1,0, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,1, 2,0, 1,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp3d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,3, 1,0, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,1, 1,0, 3,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp5d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,2, 1,0, 2,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,2, 1,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp6d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,6, 1,0, 3,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,3, 1,0, 6,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp7d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 1,0, 3,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,3, 1,0, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp8d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,5, 1,0, 4,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,4, 1,0, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp9d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,6, 1,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(1,2, 1,0, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void quadOp9d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.quadTo(1,6, 1.5f,1);
+ path.quadTo(1.5f,0.5f, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.quadTo(1,2, 1.4f,1);
+ pathB.quadTo(3,0.4f, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void lineOp9d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.lineTo(1,6);
+ path.lineTo(1.5f,1);
+ path.lineTo(1.8f,0.8f);
+ path.lineTo(2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.lineTo(1,2);
+ pathB.lineTo(1.4f,1);
+ pathB.lineTo(3,0.4f);
+ pathB.lineTo(6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp1i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,2, 1,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(1,2, 1,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp10d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,3, 1,0, 4,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(1,4, 1,0, 3,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp11d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 1,0, 5,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(1,5, 1,0, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp12d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,6, 1,0, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,1, 1,0, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp13d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(4,5, 1,0, 5,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(3,5, 1,0, 5,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp14d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,2, 2,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(1,2, 1,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp15d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,6, 2,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(1,2, 1,0, 6,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp16d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,1, 3,0, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,3);
+ pathB.cubicTo(0,1, 2,0, 1,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp17d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,2, 4,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(1,2, 2,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp18d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,5, 2,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(1,2, 1,0, 5,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp19i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,1, 2,1, 6,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(2,6, 2,0, 1,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp20d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,1, 6,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(1,2, 1,0, 1,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp21d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,1, 2,1, 6,5);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(5,6, 1,0, 1,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp22d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,3, 3,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,3);
+ pathB.cubicTo(1,2, 1,0, 3,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp23d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,2, 4,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(1,2, 1,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp24d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,2, 2,0, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(2,3, 1,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testIntersect1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(3, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kIntersect_SkPathOp, filename);
+}
+
+static void testUnion1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(3, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kUnion_SkPathOp, filename);
+}
+
+static void testDiff1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(3, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kDifference_SkPathOp, filename);
+}
+
+static void testXor1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(3, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kXOR_SkPathOp, filename);
+}
+
+static void testIntersect2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(0, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kIntersect_SkPathOp, filename);
+}
+
+static void testUnion2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(0, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kUnion_SkPathOp, filename);
+}
+
+static void testDiff2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(0, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kDifference_SkPathOp, filename);
+}
+
+static void testXor2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one, two;
+ one.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ two.addRect(0, 3, 9, 9, SkPath::kCW_Direction);
+ testPathOp(reporter, one, two, kXOR_SkPathOp, filename);
+}
+
+static void testOp1d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testOp2d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testOp3d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(1, 1, 2, 2, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testOp1u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 3, 3, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void testOp4d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testOp5d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ path.addRect(0, 0, 3, 3, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testOp6d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 3, 3, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testOp7d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testOp2u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ path.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction);
+ pathB.addRect(1, 1, 2, 2, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void testOp8d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.addRect(0, 0, 640, 480);
+ pathB.moveTo(577330, 1971.72f);
+ pathB.cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+static void cubicOp25i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,4, 5,0, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(2,3, 1,0, 4,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp26d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 4,0, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(2,3, 1,0, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp27d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,6, 1,0, 5,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(2,5, 1,0, 6,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp28u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,4, 6,0, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(2,3, 1,0, 4,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp29d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,5, 6,0, 4,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(2,4, 1,0, 5,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp30d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,5, 6,0, 5,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(3,5, 1,0, 5,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp31d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,3, 2,1, 4,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(0,4, 2,0, 3,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp31u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,3, 2,1, 4,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(0,4, 2,0, 3,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp31x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,3, 2,1, 4,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(0,4, 2,0, 3,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename);
+}
+
+static void cubicOp32d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,2, 6,0, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(1,3, 1,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp33i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,2, 6,0, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(1,3, 1,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp34d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,5, 2,1, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(1,3, 1,0, 5,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp35d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 2,1, 4,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(0,4, 1,0, 5,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp36u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,6, 2,0, 5,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(1,5, 1,0, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp37d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,6, 6,1, 4,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,6);
+ pathB.cubicTo(3,4, 1,0, 6,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp38d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,6, 3,2, 4,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(1,4, 1,0, 6,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp39d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,3, 5,1, 4,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,5);
+ pathB.cubicTo(3,4, 1,0, 3,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp40d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 3,2, 4,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(2,4, 1,0, 5,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp41i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,6, 4,3, 6,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3,4);
+ pathB.cubicTo(4,6, 1,0, 6,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp42d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,2, 6,5, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(5,6);
+ pathB.cubicTo(4,5, 1,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp43d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(1,2, 4,0, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(1,3, 2,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp44d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(3,6, 4,0, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(2,3, 2,0, 6,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp45d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(2,4, 4,0, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(2,3, 2,0, 4,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp46d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(3,5, 5,0, 4,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(2,4, 2,0, 5,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp47d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,6, 6,2, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,6);
+ pathB.cubicTo(4,5, 1,0, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp48d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(2,3, 5,1, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,5);
+ pathB.cubicTo(2,3, 2,0, 3,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp49d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(1,5, 3,2, 4,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(1,4, 2,0, 5,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp50d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,3);
+ path.cubicTo(1,6, 5,0, 5,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,5, 3,0, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp51d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,3);
+ path.cubicTo(1,2, 4,1, 6,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,4);
+ pathB.cubicTo(0,6, 3,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp52d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(1,2, 5,4, 4,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(4,5);
+ pathB.cubicTo(3,4, 2,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp53d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,3);
+ path.cubicTo(1,2, 5,3, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3,5);
+ pathB.cubicTo(1,2, 3,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp54d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,4);
+ path.cubicTo(1,3, 5,4, 4,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(4,5);
+ pathB.cubicTo(2,4, 4,0, 3,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp55d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,5);
+ path.cubicTo(1,3, 3,2, 5,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(0,5, 5,0, 3,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp56d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,6, 5,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,2, 1,0, 6,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp57d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,5);
+ path.cubicTo(0,5, 5,4, 6,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(4,5);
+ pathB.cubicTo(4,6, 5,0, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp58d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,5);
+ path.cubicTo(3,4, 6,5, 5,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(5,6);
+ pathB.cubicTo(3,5, 5,0, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp59d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(5,6, 4,0, 4,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(1,4, 1,0, 6,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp60d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(4,6, 6,0, 5,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(2,5, 2,0, 6,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp61d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1,2);
+ path.cubicTo(0,5, 3,2, 6,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(1,6, 2,1, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp62d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1,3);
+ path.cubicTo(5,6, 5,3, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3,5);
+ pathB.cubicTo(4,5, 3,1, 6,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp63d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2,3);
+ path.cubicTo(0,4, 3,2, 5,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(3,5, 3,2, 4,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp64d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(0,1, 1,0, 3,0);
+ path.lineTo(0,1);
+ path.close();
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,3, 1,0, 1,0);
+ pathB.lineTo(0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp65d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 1,0, 1,0);
+ path.lineTo(0,1);
+ path.close();
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,1, 1,0, 5,1);
+ pathB.lineTo(0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void rectOp1d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(0,1, 1,0, 3,0);
+ path.lineTo(0,1);
+ path.close();
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,3, 1,0, 1,0);
+ pathB.lineTo(0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp66u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,6, 4,2, 5,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,4);
+ pathB.cubicTo(3,5, 1,0, 6,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp67u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(3,5);
+ path.cubicTo(1,6, 5,0, 3,1);
+ path.lineTo(3,5);
+ path.close();
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,3, 5,3, 6,1);
+ pathB.lineTo(0,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp68u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,5);
+ path.cubicTo(4,5, 4,1, 5,0);
+ path.close();
+ pathB.moveTo(1,4);
+ pathB.cubicTo(0,5, 5,0, 5,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp69d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(1,3);
+ path.cubicTo(0,1, 3,1, 2,0);
+ path.close();
+ pathB.moveTo(1,3);
+ pathB.cubicTo(0,2, 3,1, 1,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+SkPathOp ops[] = {
+ kUnion_SkPathOp,
+ kXOR_SkPathOp,
+ kReverseDifference_SkPathOp,
+ kXOR_SkPathOp,
+ kReverseDifference_SkPathOp,
+};
+
+static void rRect1(skiatest::Reporter* reporter, const char* filename) {
+ SkScalar xA = 0.65f;
+ SkScalar xB = 10.65f;
+ SkScalar xC = 20.65f;
+ SkScalar xD = 30.65f;
+ SkScalar xE = 40.65f;
+ SkScalar xF = 50.65f;
+
+ SkScalar yA = 0.65f;
+ SkScalar yB = 10.65f;
+ SkScalar yC = 20.65f;
+ SkScalar yD = 30.65f;
+ SkScalar yE = 40.65f;
+ SkScalar yF = 50.65f;
+ SkPath paths[5];
+ SkRect rects[5];
+ rects[0].set(xB, yB, xE, yE);
+ paths[0].addRoundRect(rects[0], SkIntToScalar(5), SkIntToScalar(5)); // red
+ rects[1].set(xA, yA, xD, yD);
+ paths[1].addRoundRect(rects[1], SkIntToScalar(5), SkIntToScalar(5)); // green
+ rects[2].set(xC, yA, xF, yD);
+ paths[2].addRoundRect(rects[2], SkIntToScalar(5), SkIntToScalar(5)); // blue
+ rects[3].set(xA, yC, xD, yF);
+ paths[3].addRoundRect(rects[3], SkIntToScalar(5), SkIntToScalar(5)); // yellow
+ rects[4].set(xC, yC, xF, yF);
+ paths[4].addRoundRect(rects[4], SkIntToScalar(5), SkIntToScalar(5)); // cyan
+ SkPath path;
+ path.setFillType(SkPath::kInverseEvenOdd_FillType);
+ for (int index = 0; index < 5; ++index) {
+ testPathOp(reporter, path, paths[index], ops[index], filename);
+ REPORTER_ASSERT(reporter, Op(path, paths[index], ops[index], &path));
+ }
+}
+
+static void skp1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(189,7);
+ path.cubicTo(189,5.34314585f, 190.34314f,4, 192,4);
+ path.lineTo(243,4);
+ path.cubicTo(244.65686f,4, 246,5.34314585f, 246,7);
+ path.lineTo(246,21);
+ path.cubicTo(246,22.6568546f, 244.65686f,24, 243,24);
+ path.lineTo(192,24);
+ path.cubicTo(190.34314f,24, 189,22.6568546f, 189,21);
+ path.lineTo(189,7);
+ path.close();
+ path.moveTo(191,8);
+ path.cubicTo(191,6.89543009f, 191.895432f,6, 193,6);
+ path.lineTo(242,6);
+ path.cubicTo(243.104568f,6, 244,6.89543009f, 244,8);
+ path.lineTo(244,20);
+ path.cubicTo(244,21.1045704f, 243.104568f,22, 242,22);
+ path.lineTo(193,22);
+ path.cubicTo(191.895432f,22, 191,21.1045704f, 191,20);
+ path.lineTo(191,8);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(189,4);
+ pathB.lineTo(199,14);
+ pathB.lineTo(236,14);
+ pathB.lineTo(246,4);
+ pathB.lineTo(189,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skp2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(253.000000f, 11757.0000f);
+ path.lineTo(253.000000f, 222.000000f);
+ path.lineTo(823.000000f, 222.000000f);
+ path.lineTo(823.000000f, 11757.0000f);
+ path.lineTo(253.000000f, 11757.0000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(258.000000f, 1028.00000f);
+ pathB.lineTo(258.000000f, 1027.00000f);
+ pathB.lineTo(823.000000f, 1027.00000f);
+ pathB.lineTo(823.000000f, 1028.00000f);
+ pathB.lineTo(258.000000f, 1028.00000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skp3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(717.000000f, 507.000000f);
+ path.lineTo(717.000000f, 425.000000f);
+ path.lineTo(973.000000f, 425.000000f);
+ path.lineTo(973.000000f, 507.000000f);
+ path.quadTo(973.000000f, 508.242645f, 972.121582f, 509.121613f);
+ path.quadTo(971.242615f, 510.000000f, 970.000000f, 510.000000f);
+ path.lineTo(720.000000f, 510.000000f);
+ path.quadTo(718.757385f, 510.000000f, 717.878418f, 509.121613f);
+ path.quadTo(717.000000f, 508.242645f, 717.000000f, 507.000000f);
+ path.close();
+ path.moveTo(719.000000f, 426.000000f);
+ path.lineTo(971.000000f, 426.000000f);
+ path.lineTo(971.000000f, 506.000000f);
+ path.cubicTo(971.000000f, 507.104584f, 970.104553f, 508.000000f, 969.000000f, 508.000000f);
+ path.lineTo(721.000000f, 508.000000f);
+ path.cubicTo(719.895447f, 508.000000f, 719.000000f, 507.104584f, 719.000000f, 506.000000f);
+ path.lineTo(719.000000f, 426.000000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(717.000000f, 510.000000f);
+ pathB.lineTo(760.000000f, 467.000000f);
+ pathB.lineTo(930.000000f, 467.000000f);
+ pathB.lineTo(973.000000f, 510.000000f);
+ pathB.lineTo(717.000000f, 510.000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skp4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(230.756805f, 591.756775f);
+ path.quadTo(232.514725f, 590.000000f, 235.000000f, 590.000000f);
+ path.lineTo(300.000000f, 590.000000f);
+ path.quadTo(302.485291f, 590.000000f, 304.243195f, 591.756775f);
+ path.quadTo(306.000000f, 593.514709f, 306.000000f, 596.000000f);
+ path.lineTo(306.000000f, 617.000000f);
+ path.lineTo(229.000000f, 617.000000f);
+ path.lineTo(229.000000f, 596.000000f);
+ path.quadTo(229.000000f, 593.514709f, 230.756805f, 591.756775f);
+ path.close();
+ path.moveTo(231.000000f, 597.000000f);
+ path.cubicTo(231.000000f, 594.238586f, 233.238571f, 592.000000f, 236.000000f, 592.000000f);
+ path.lineTo(299.000000f, 592.000000f);
+ path.cubicTo(301.761414f, 592.000000f, 304.000000f, 594.238586f, 304.000000f, 597.000000f);
+ path.lineTo(304.000000f, 616.000000f);
+ path.lineTo(231.000000f, 616.000000f);
+ path.lineTo(231.000000f, 597.000000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(306.000000f, 590.000000f);
+ pathB.lineTo(292.000000f, 604.000000f);
+ pathB.lineTo(305.000000f, 617.000000f);
+ pathB.lineTo(306.000000f, 617.000000f);
+ pathB.lineTo(306.000000f, 590.000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skp5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(18.0000000f, 226.000000f);
+ path.quadTo(14.6862917f, 226.000000f, 12.3423996f, 228.342407f);
+ path.quadTo(10.0000000f, 230.686295f, 10.0000000f, 234.000000f);
+ path.lineTo(10.0000000f, 253.000000f);
+ path.lineTo(1247.00000f, 253.000000f);
+ path.lineTo(1247.00000f, 234.000000f);
+ path.quadTo(1247.00000f, 230.686295f, 1244.65759f, 228.342407f);
+ path.quadTo(1242.31372f, 226.000000f, 1239.00000f, 226.000000f);
+ path.lineTo(18.0000000f, 226.000000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kInverseWinding_FillType);
+ pathB.moveTo(18.0000000f, 226.000000f);
+ pathB.lineTo(1239.00000f, 226.000000f);
+ pathB.cubicTo(1243.41833f, 226.000000f, 1247.00000f, 229.581726f, 1247.00000f, 234.000000f);
+ pathB.lineTo(1247.00000f, 252.000000f);
+ pathB.lineTo(10.0000000f, 252.000000f);
+ pathB.lineTo(10.0000000f, 234.000000f);
+ pathB.cubicTo(10.0000000f, 229.581726f, 13.5817204f, 226.000000f, 18.0000000f, 226.000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp70d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,5, 4,0, 5,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(0,5, 1,0, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp71d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,5, 4,1, 6,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,4);
+ pathB.cubicTo(4,6, 1,0, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp72i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,5, 5,2, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,5);
+ pathB.cubicTo(4,5, 1,0, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp73d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 4,0, 6,4);
+ path.lineTo(0,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(4,6, 1,0, 4,3);
+ pathB.lineTo(0,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp74d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 5,1, 5,1);
+ path.lineTo(0,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,5);
+ pathB.cubicTo(1,5, 1,0, 5,1);
+ pathB.lineTo(1,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp75d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,4, 5,1, 6,4);
+ path.lineTo(0,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,5);
+ pathB.cubicTo(4,6, 1,0, 4,0);
+ pathB.lineTo(1,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp76u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,2, 2,0, 5,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(3,5, 1,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp77i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,3, 2,0, 3,2);
+ path.lineTo(0,1);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(2,3, 1,0, 3,1);
+ pathB.lineTo(0,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp78u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1,6);
+ path.cubicTo(1,6, 5,0, 6,1);
+ path.lineTo(1,6);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,6, 6,1, 6,1);
+ pathB.lineTo(0,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp79u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,3, 1,0, 6,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(4,6, 1,0, 3,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp80i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,3, 2,1, 4,3);
+ path.lineTo(0,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(3,4, 1,0, 3,2);
+ pathB.lineTo(1,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp81d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(4,6, 4,3, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3,4);
+ pathB.cubicTo(4,5, 1,0, 6,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp82i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,3, 5,2, 3,0);
+ path.lineTo(0,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,5);
+ pathB.cubicTo(0,3, 1,0, 3,2);
+ pathB.lineTo(2,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp83i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,3, 2,1, 4,1);
+ path.lineTo(0,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(1,4, 1,0, 3,0);
+ pathB.lineTo(1,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp84d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,4);
+ path.cubicTo(2,3, 6,3, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3,6);
+ pathB.cubicTo(2,3, 4,0, 3,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void skpClip1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1126.17114f, 877.171204f);
+ path.quadTo(1127.34314f, 876.000000f, 1129.00000f, 876.000000f);
+ path.lineTo(1243.00000f, 876.000000f);
+ path.quadTo(1244.65686f, 876.000000f, 1245.82886f, 877.171204f);
+ path.quadTo(1247.00000f, 878.343140f, 1247.00000f, 880.000000f);
+ path.lineTo(1247.00000f, 907.000000f);
+ path.lineTo(1246.00000f, 907.000000f);
+ path.lineTo(1246.00000f, 880.000000f);
+ path.cubicTo(1246.00000f, 878.343140f, 1244.65686f, 877.000000f, 1243.00000f, 877.000000f);
+ path.lineTo(1129.00000f, 877.000000f);
+ path.cubicTo(1127.34314f, 877.000000f, 1126.00000f, 878.343140f, 1126.00000f, 880.000000f);
+ path.lineTo(1126.00000f, 907.000000f);
+ path.lineTo(1125.00000f, 907.000000f);
+ path.lineTo(1125.00000f, 880.000000f);
+ path.quadTo(1125.00000f, 878.343140f, 1126.17114f, 877.171204f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1247.00000f, 876.000000f);
+ pathB.lineTo(1231.00000f, 892.000000f);
+ pathB.lineTo(1246.00000f, 907.000000f);
+ pathB.lineTo(1247.00000f, 907.000000f);
+ pathB.lineTo(1247.00000f, 876.000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpClip2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(134.000000f, 11414.0000f);
+ path.cubicTo(131.990234f, 11414.0000f, 130.326660f, 11415.4824f, 130.042755f, 11417.4131f);
+ path.cubicTo(130.233124f, 11418.3193f, 131.037079f, 11419.0000f, 132.000000f, 11419.0000f);
+ path.lineTo(806.000000f, 11419.0000f);
+ path.cubicTo(806.962891f, 11419.0000f, 807.766907f, 11418.3193f, 807.957275f, 11417.4131f);
+ path.cubicTo(807.673401f, 11415.4824f, 806.009766f, 11414.0000f, 804.000000f, 11414.0000f);
+ path.lineTo(134.000000f, 11414.0000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kInverseWinding_FillType);
+ pathB.moveTo(132.000000f, 11415.0000f);
+ pathB.lineTo(806.000000f, 11415.0000f);
+ pathB.cubicTo(807.104553f, 11415.0000f, 808.000000f, 11415.4473f, 808.000000f, 11416.0000f);
+ pathB.lineTo(808.000000f, 11417.0000f);
+ pathB.cubicTo(808.000000f, 11418.1045f, 807.104553f, 11419.0000f, 806.000000f, 11419.0000f);
+ pathB.lineTo(132.000000f, 11419.0000f);
+ pathB.cubicTo(130.895432f, 11419.0000f, 130.000000f, 11418.1045f, 130.000000f, 11417.0000f);
+ pathB.lineTo(130.000000f, 11416.0000f);
+ pathB.cubicTo(130.000000f, 11415.4473f, 130.895432f, 11415.0000f, 132.000000f, 11415.0000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skp96prezzi1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(157.464005f, 670.463989f);
+ path.quadTo(158.928925f, 669.000000f, 161.000000f, 669.000000f);
+ path.lineTo(248.000000f, 669.000000f);
+ path.quadTo(250.071075f, 669.000000f, 251.535995f, 670.463989f);
+ path.quadTo(253.000000f, 671.928955f, 253.000000f, 674.000000f);
+ path.lineTo(253.000000f, 706.000000f);
+ path.lineTo(251.000000f, 706.000000f);
+ path.lineTo(251.000000f, 675.000000f);
+ path.cubicTo(251.000000f, 672.790833f, 249.209137f, 671.000000f, 247.000000f, 671.000000f);
+ path.lineTo(162.000000f, 671.000000f);
+ path.cubicTo(159.790863f, 671.000000f, 158.000000f, 672.790833f, 158.000000f, 675.000000f);
+ path.lineTo(158.000000f, 706.000000f);
+ path.lineTo(156.000000f, 706.000000f);
+ path.lineTo(156.000000f, 674.000000f);
+ path.quadTo(156.000000f, 671.928955f, 157.464005f, 670.463989f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(156.000000f, 669.000000f);
+ pathB.lineTo(178.500000f, 691.500000f);
+ pathB.lineTo(230.500000f, 691.500000f);
+ pathB.lineTo(253.000000f, 669.000000f);
+ pathB.lineTo(156.000000f, 669.000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpancestry_com1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(161.000000f, 925.000000f);
+ path.cubicTo(159.874390f, 925.000000f, 158.835663f, 925.371948f, 158.000000f, 925.999634f);
+ path.lineTo(158.000000f, 926.000000f);
+ path.lineTo(1108.00000f, 926.000000f);
+ path.lineTo(1108.00000f, 925.999634f);
+ path.cubicTo(1107.16443f, 925.371948f, 1106.12561f, 925.000000f, 1105.00000f, 925.000000f);
+ path.lineTo(161.000000f, 925.000000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(161.000000f, 926.000000f);
+ pathB.lineTo(1105.00000f, 926.000000f);
+ pathB.cubicTo(1107.20911f, 926.000000f, 1109.00000f, 927.790833f, 1109.00000f, 930.000000f);
+ pathB.lineTo(1109.00000f, 956.000000f);
+ pathB.cubicTo(1109.00000f, 958.209167f, 1107.20911f, 960.000000f, 1105.00000f, 960.000000f);
+ pathB.lineTo(161.000000f, 960.000000f);
+ pathB.cubicTo(158.790863f, 960.000000f, 157.000000f, 958.209167f, 157.000000f, 956.000000f);
+ pathB.lineTo(157.000000f, 930.000000f);
+ pathB.cubicTo(157.000000f, 927.790833f, 158.790863f, 926.000000f, 161.000000f, 926.000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpeldorado_com_ua1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(286.695129f, 291.000000f);
+ path.lineTo(229.304855f, 561.000000f);
+ path.lineTo(979.304871f, 561.000000f);
+ path.lineTo(1036.69507f, 291.000000f);
+ path.lineTo(286.695129f, 291.000000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1006.69513f, 291.000000f);
+ pathB.cubicTo(1023.26367f, 291.000000f, 1033.84021f, 304.431458f, 1030.31836f, 321.000000f);
+ pathB.lineTo(985.681519f, 531.000000f);
+ pathB.cubicTo(982.159790f, 547.568542f, 965.873413f, 561.000000f, 949.304871f, 561.000000f);
+ pathB.lineTo(259.304871f, 561.000000f);
+ pathB.cubicTo(242.736313f, 561.000000f, 232.159805f, 547.568542f, 235.681549f, 531.000000f);
+ pathB.lineTo(280.318420f, 321.000000f);
+ pathB.cubicTo(283.840179f, 304.431458f, 300.126587f, 291.000000f, 316.695129f, 291.000000f);
+ pathB.lineTo(1006.69513f, 291.000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpbyte_com1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(968.000000f, 14.0000000f);
+ path.cubicTo(965.238586f, 14.0000000f, 963.000000f, 16.2385769f, 963.000000f, 19.0000000f);
+ path.lineTo(963.000000f, 32.0000000f);
+ path.cubicTo(963.000000f, 34.7614250f, 965.238586f, 37.0000000f, 968.000000f, 37.0000000f);
+ path.lineTo(1034.00000f, 37.0000000f);
+ path.cubicTo(1036.76147f, 37.0000000f, 1039.00000f, 34.7614250f, 1039.00000f, 32.0000000f);
+ path.lineTo(1039.00000f, 19.0000000f);
+ path.cubicTo(1039.00000f, 16.2385769f, 1036.76147f, 14.0000000f, 1034.00000f, 14.0000000f);
+ path.lineTo(968.000000f, 14.0000000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kInverseWinding_FillType);
+ pathB.moveTo(968.000000f, 14.0000000f);
+ pathB.lineTo(1034.00000f, 14.0000000f);
+ pathB.cubicTo(1036.76147f, 14.0000000f, 1039.00000f, 16.2385750f, 1039.00000f, 19.0000000f);
+ pathB.lineTo(1039.00000f, 32.0000000f);
+ pathB.cubicTo(1039.00000f, 34.2091408f, 1036.76147f, 36.0000000f, 1034.00000f, 36.0000000f);
+ pathB.lineTo(968.000000f, 36.0000000f);
+ pathB.cubicTo(965.238586f, 36.0000000f, 963.000000f, 34.2091408f, 963.000000f, 32.0000000f);
+ pathB.lineTo(963.000000f, 19.0000000f);
+ pathB.cubicTo(963.000000f, 16.2385750f, 965.238586f, 14.0000000f, 968.000000f, 14.0000000f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skphealth_com76(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(708.099182f, 7.09919119f);
+ path.lineTo(708.099182f, 7.09920025f);
+ path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f);
+ path.lineTo(704.000000f, 33.0000000f);
+ path.lineTo(705.000000f, 33.0000000f);
+ path.lineTo(705.000000f, 17.0000000f);
+ path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f);
+ path.lineTo(708.099182f, 7.09919119f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(704.000000f, 3.00000000f);
+ pathB.lineTo(704.000000f, 33.0000000f);
+ pathB.lineTo(705.000000f, 33.0000000f);
+ pathB.lineTo(719.500000f, 3.00000000f);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpahrefs_com88(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1099.82886f, 7.17117119f);
+ path.lineTo(1099.12134f, 7.87867832f);
+ path.cubicTo(1099.66418f, 8.42157173f, 1100.00000f, 9.17157173f, 1100.00000f, 10.0000000f);
+ path.lineTo(1100.00000f, 28.0000000f);
+ path.cubicTo(1100.00000f, 29.6568546f, 1098.65686f, 31.0000000f, 1097.00000f, 31.0000000f);
+ path.lineTo(1088.00000f, 31.0000000f);
+ path.lineTo(1088.00000f, 32.0000000f);
+ path.lineTo(1097.00000f, 32.0000000f);
+ path.quadTo(1098.65686f, 32.0000000f, 1099.82886f, 30.8288002f);
+ path.quadTo(1101.00000f, 29.6568546f, 1101.00000f, 28.0000000f);
+ path.lineTo(1101.00000f, 10.0000000f);
+ path.quadTo(1101.00000f, 8.34314537f, 1099.82886f, 7.17119980f);
+ path.lineTo(1099.82886f, 7.17117119f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1101.00000f, 6.00000000f);
+ pathB.lineTo(1088.00000f, 6.00000000f);
+ pathB.lineTo(1088.00000f, 19.0000000f);
+ pathB.lineTo(1101.00000f, 32.0000000f);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpahrefs_com29(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1037.17114f, 7.17119980f);
+ path.quadTo(1038.34314f, 6.00000000f, 1040.00000f, 6.00000000f);
+ path.lineTo(1074.00000f, 6.00000000f);
+ path.lineTo(1074.00000f, 32.0000000f);
+ path.lineTo(1040.00000f, 32.0000000f);
+ path.quadTo(1038.34314f, 32.0000000f, 1037.17114f, 30.8288002f);
+ path.quadTo(1036.00000f, 29.6568546f, 1036.00000f, 28.0000000f);
+ path.lineTo(1036.00000f, 10.0000000f);
+ path.quadTo(1036.00000f, 8.34314537f, 1037.17114f, 7.17119980f);
+ path.close();
+ path.moveTo(1037.00000f, 10.0000000f);
+ path.cubicTo(1037.00000f, 8.34314537f, 1038.34314f, 7.00000000f, 1040.00000f, 7.00000000f);
+ path.lineTo(1073.00000f, 7.00000000f);
+ path.lineTo(1073.00000f, 31.0000000f);
+ path.lineTo(1040.00000f, 31.0000000f);
+ path.cubicTo(1038.34314f, 31.0000000f, 1037.00000f, 29.6568546f, 1037.00000f, 28.0000000f);
+ path.lineTo(1037.00000f, 10.0000000f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1036.00000f, 32.0000000f);
+ pathB.lineTo(1049.00000f, 19.0000000f);
+ pathB.lineTo(1073.00000f, 31.0000000f);
+ pathB.lineTo(1074.00000f, 32.0000000f);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp85d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,6, 1,0, 6,2);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(2,6, 1,0, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void skpkkiste_to98(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(96, 122);
+ path.cubicTo(94.6192932f, 122, 93.3692932f, 122.559647f, 92.4644699f, 123.46447f);
+ path.lineTo(94.1715698f, 125.17157f);
+ path.cubicTo(94.8954315f, 124.447708f, 95.8954315f, 124, 97, 124);
+ path.lineTo(257, 124);
+ path.cubicTo(258.104553f, 124, 259.104584f, 124.447708f, 259.82843f, 125.17157f);
+ path.lineTo(261.535522f, 123.46447f);
+ path.cubicTo(260.630707f, 122.559647f, 259.380707f, 122, 258, 122);
+ path.lineTo(96, 122);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(258, 122);
+ pathB.cubicTo(260.761414f, 122, 263, 124.238579f, 263, 127);
+ pathB.lineTo(263, 284);
+ pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289);
+ pathB.lineTo(96, 289);
+ pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284);
+ pathB.lineTo(91, 127);
+ pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122);
+ pathB.lineTo(258, 122);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void issue1417(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(122.58908843994140625f, 82.2836456298828125f);
+ path1.quadTo(129.8215789794921875f, 80, 138, 80);
+ path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f);
+ path1.lineTo(161.1764678955078125f, 100);
+ path1.lineTo(161.1764678955078125f, 100);
+ path1.lineTo(115.29412078857421875f, 100);
+ path1.lineTo(115.29412078857421875f, 100);
+ path1.lineTo(122.58908843994140625f, 82.2836456298828125f);
+ path1.lineTo(122.58908843994140625f, 82.2836456298828125f);
+ path1.close();
+ path1.moveTo(98.68194580078125f, 140.343841552734375f);
+ path1.lineTo(115.29412078857421875f, 100);
+ path1.lineTo(115.29412078857421875f, 100);
+ path1.lineTo(97.9337615966796875f, 100);
+ path1.lineTo(97.9337615966796875f, 100);
+ path1.quadTo(88, 112.94264984130859375f, 88, 130);
+ path1.quadTo(88, 131.544830322265625f, 88.08148956298828125f, 133.0560302734375f);
+ path1.lineTo(98.68194580078125f, 140.343841552734375f);
+ path1.lineTo(98.68194580078125f, 140.343841552734375f);
+ path1.close();
+ path1.moveTo(136.969696044921875f, 166.6666717529296875f);
+ path1.lineTo(98.68194580078125f, 140.343841552734375f);
+ path1.lineTo(98.68194580078125f, 140.343841552734375f);
+ path1.lineTo(93.45894622802734375f, 153.02825927734375f);
+ path1.lineTo(93.45894622802734375f, 153.02825927734375f);
+ path1.quadTo(96.94116973876953125f, 159.65185546875f, 102.64466094970703125f, 165.3553466796875f);
+ path1.quadTo(110.7924652099609375f, 173.503143310546875f, 120.8179779052734375f, 177.1177825927734375f);
+ path1.lineTo(136.969696044921875f, 166.6666717529296875f);
+ path1.lineTo(136.969696044921875f, 166.6666717529296875f);
+ path1.close();
+ path1.moveTo(175.8309783935546875f, 141.5211334228515625f);
+ path1.lineTo(136.969696044921875f, 166.6666717529296875f);
+ path1.lineTo(136.969696044921875f, 166.6666717529296875f);
+ path1.lineTo(153.15728759765625f, 177.7956390380859375f);
+ path1.lineTo(153.15728759765625f, 177.7956390380859375f);
+ path1.quadTo(164.392425537109375f, 174.318267822265625f, 173.3553466796875f, 165.3553466796875f);
+ path1.quadTo(177.805816650390625f, 160.9048614501953125f, 180.90380859375f, 155.8941650390625f);
+ path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
+ path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
+ path1.close();
+ path1.moveTo(175.8309783935546875f, 141.5211334228515625f);
+ path1.lineTo(187.8782806396484375f, 133.7258148193359375f);
+ path1.lineTo(187.8782806396484375f, 133.7258148193359375f);
+ path1.quadTo(188, 131.8880615234375f, 188, 130);
+ path1.quadTo(188, 112.942657470703125f, 178.0662384033203125f, 100);
+ path1.lineTo(161.1764678955078125f, 100);
+ path1.lineTo(161.1764678955078125f, 100);
+ path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
+ path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(174.117645263671875f, 100);
+ path2.lineTo(161.1764678955078125f, 100);
+ path2.lineTo(161.1764678955078125f, 100);
+ path2.lineTo(155.1280364990234375f, 82.86279296875f);
+ path2.lineTo(155.1280364990234375f, 82.86279296875f);
+ path2.quadTo(153.14971923828125f, 82.15229034423828125f, 151.098419189453125f, 81.618133544921875f);
+ path2.lineTo(143.5294189453125f, 100);
+ path2.lineTo(143.5294189453125f, 100);
+ path2.lineTo(161.1764678955078125f, 100);
+ path2.lineTo(161.1764678955078125f, 100);
+ path2.lineTo(168.23529052734375f, 120);
+ path2.lineTo(168.23529052734375f, 120);
+ path2.lineTo(181.1764678955078125f, 120);
+ path2.lineTo(181.1764678955078125f, 120);
+ path2.lineTo(186.3661956787109375f, 134.7042236328125f);
+ path2.lineTo(186.3661956787109375f, 134.7042236328125f);
+ path2.lineTo(187.8782806396484375f, 133.7258148193359375f);
+ path2.lineTo(187.8782806396484375f, 133.7258148193359375f);
+ path2.quadTo(188, 131.8880615234375f, 188, 130);
+ path2.quadTo(188, 124.80947113037109375f, 187.080169677734375f, 120);
+ path2.lineTo(181.1764678955078125f, 120);
+ path2.lineTo(181.1764678955078125f, 120);
+ path2.lineTo(174.117645263671875f, 100);
+ path2.lineTo(174.117645263671875f, 100);
+ path2.close();
+ path2.moveTo(88.91983795166015625f, 120);
+ path2.lineTo(107.0588226318359375f, 120);
+ path2.lineTo(107.0588226318359375f, 120);
+ path2.lineTo(98.68194580078125f, 140.343841552734375f);
+ path2.lineTo(98.68194580078125f, 140.343841552734375f);
+ path2.lineTo(88.08148956298828125f, 133.0560302734375f);
+ path2.lineTo(88.08148956298828125f, 133.0560302734375f);
+ path2.quadTo(88, 131.544830322265625f, 88, 130);
+ path2.quadTo(88, 124.80951690673828125f, 88.91983795166015625f, 120);
+ path2.close();
+ path2.moveTo(96.67621612548828125f, 145.21490478515625f);
+ path2.lineTo(98.68194580078125f, 140.343841552734375f);
+ path2.lineTo(98.68194580078125f, 140.343841552734375f);
+ path2.lineTo(120.68767547607421875f, 155.4727783203125f);
+ path2.lineTo(120.68767547607421875f, 155.4727783203125f);
+ path2.lineTo(118.68194580078125f, 160.343841552734375f);
+ path2.lineTo(118.68194580078125f, 160.343841552734375f);
+ path2.lineTo(96.67621612548828125f, 145.21490478515625f);
+ path2.lineTo(96.67621612548828125f, 145.21490478515625f);
+ path2.close();
+ path2.moveTo(113.232177734375f, 173.5789947509765625f);
+ path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.8179779052734375f, 177.1177825927734375f);
+ path2.lineTo(132.2864990234375f, 169.6969757080078125f);
+ path2.lineTo(132.2864990234375f, 169.6969757080078125f);
+ path2.lineTo(118.68194580078125f, 160.343841552734375f);
+ path2.lineTo(118.68194580078125f, 160.343841552734375f);
+ path2.lineTo(113.232177734375f, 173.5789947509765625f);
+ path2.lineTo(113.232177734375f, 173.5789947509765625f);
+ path2.close();
+ // FIXME : difficult data, circle back later
+ testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void issue1418(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(0, 0);
+ path1.lineTo(1, 0);
+ path1.lineTo(1, 0);
+ path1.lineTo(1, 1);
+ path1.lineTo(1, 1);
+ path1.lineTo(0, 1);
+ path1.lineTo(0, 1);
+ path1.lineTo(0, 0);
+ path1.lineTo(0, 0);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f);
+ path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192092895508f, -0.50000005960464477539f);
+ path2.quadTo(1.2071068286895751953f, -0.50000005960464477539f, 1.3535535335540771484f, -0.35355341434478759766f);
+ path2.quadTo(1.5000001192092895508f, -0.20710679888725280762f, 1.5000001192092895508f, 0);
+ path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.3535535335540771484f, 0.35355341434478759766f);
+ path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.0000001192092895508f, 0.50000005960464477539f);
+ path2.quadTo(0.79289329051971435547f, 0.50000005960464477539f, 0.64644664525985717773f, 0.35355341434478759766f);
+ path2.quadTo(0.50000005960464477539f, 0.20710679888725280762f, 0.50000005960464477539f, 0);
+ path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.64644664525985717773f, -0.35355341434478759766f);
+ testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp85i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(1, 5, 4, 3, 6, 4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 4);
+ pathB.cubicTo(4, 6, 4, 3, 5, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void issue1418b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(0, 0);
+ path1.lineTo(1, 0);
+ path1.lineTo(1, 1);
+ path1.lineTo(0, 1);
+ path1.lineTo(0, 0);
+ path1.close();
+ path1.setFillType(SkPath::kWinding_FillType);
+ SkPath path2;
+ path2.moveTo(0.646446645f, -0.353553414f);
+ path2.quadTo(0.792893291f, -0.50000006f, 1.00000012f, -0.50000006f);
+ path2.quadTo(1.20710683f, -0.50000006f, 1.35355353f, -0.353553414f);
+ path2.quadTo(1.50000012f, -0.207106799f, 1.50000012f, 0);
+ path2.quadTo(1.50000012f, 0.207106799f, 1.35355353f, 0.353553414f);
+ path2.quadTo(1.20710683f, 0.50000006f, 1.00000012f, 0.50000006f);
+ path2.quadTo(0.792893291f, 0.50000006f, 0.646446645f, 0.353553414f);
+ path2.quadTo(0.50000006f, 0.207106799f, 0.50000006f, 0);
+ path2.quadTo(0.50000006f, -0.207106799f, 0.646446645f, -0.353553414f);
+ path2.close();
+ path2.moveTo(1.00000012f, 0.50000006f);
+ path2.lineTo(1.00000012f, 1.00000012f);
+ path2.lineTo(0.50000006f, 1.00000012f);
+ path2.quadTo(0.50000006f, 0.792893291f, 0.646446645f, 0.646446645f);
+ path2.quadTo(0.792893291f, 0.50000006f, 1.00000012f, 0.50000006f);
+ path2.close();
+ path2.setFillType(SkPath::kEvenOdd_FillType);
+ testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename);
+}
+
+static void rectOp1i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void rectOp2i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 3, 3, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void rectOp3x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(3, 3);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(2, 2);
+ path.lineTo(3, 2);
+ path.lineTo(3, 3);
+ path.lineTo(2, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 1);
+ pathB.lineTo(3, 1);
+ pathB.lineTo(3, 3);
+ pathB.lineTo(1, 3);
+ pathB.close();
+ pathB.moveTo(2, 2);
+ pathB.lineTo(3, 2);
+ pathB.lineTo(3, 3);
+ pathB.lineTo(2, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename);
+}
+
+static void issue1435(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(160, 60);
+ path1.lineTo(220, 230);
+ path1.lineTo(60, 120);
+ path1.lineTo(260, 120);
+ path1.lineTo(90, 230);
+ path1.lineTo(160, 60);
+ path1.close();
+ path1.setFillType(SkPath::kEvenOdd_FillType);
+
+ SkPath path2;
+ path2.moveTo(142.589081f, 102.283646f);
+ path2.quadTo(149.821579f, 100, 158, 100);
+ path2.quadTo(167.156921f, 100, 175.128036f, 102.862793f);
+ path2.lineTo(181.176468f, 120);
+ path2.lineTo(135.294128f, 120);
+ path2.lineTo(142.589081f, 102.283646f);
+ path2.close();
+ path2.moveTo(118.681946f, 160.343842f);
+ path2.lineTo(135.294128f, 120);
+ path2.lineTo(117.933762f, 120);
+ path2.quadTo(108, 132.942657f, 108, 150);
+ path2.quadTo(108, 151.54483f, 108.08149f, 153.05603f);
+ path2.lineTo(118.681946f, 160.343842f);
+ path2.close();
+ path2.moveTo(156.969696f, 186.666672f);
+ path2.lineTo(118.681946f, 160.343842f);
+ path2.lineTo(113.458946f, 173.028259f);
+ path2.quadTo(116.94117f, 179.651855f, 122.644661f, 185.355347f);
+ path2.quadTo(130.792465f, 193.503143f, 140.817978f, 197.117783f);
+ path2.lineTo(156.969696f, 186.666672f);
+ path2.close();
+ path2.moveTo(195.830978f, 161.521133f);
+ path2.lineTo(156.969696f, 186.666672f);
+ path2.lineTo(173.157288f, 197.795639f);
+ path2.quadTo(184.392426f, 194.318268f, 193.355347f, 185.355347f);
+ path2.quadTo(197.805817f, 180.904861f, 200.903809f, 175.894165f);
+ path2.lineTo(195.830978f, 161.521133f);
+ path2.close();
+ path2.moveTo(195.830978f, 161.521133f);
+ path2.lineTo(207.878281f, 153.725815f);
+ path2.quadTo(208, 151.888062f, 208, 150);
+ path2.quadTo(208, 132.942657f, 198.066238f, 120);
+ path2.lineTo(181.176468f, 120);
+ path2.lineTo(195.830978f, 161.521133f);
+ path2.close();
+ path2.setFillType(SkPath::kEvenOdd_FillType);
+ testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename);
+}
+
+static void skpkkiste_to716(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1173, 284);
+ path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f);
+ path.lineTo(1174, 123.999496f);
+ path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127);
+ path.lineTo(1173, 284);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1340, 122);
+ pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127);
+ pathB.lineTo(1345, 284);
+ pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289);
+ pathB.lineTo(1178, 289);
+ pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284);
+ pathB.lineTo(1173, 127);
+ pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122);
+ pathB.lineTo(1340, 122);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loopEdge1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,0);
+ path.lineTo(3,0);
+ path.lineTo(3,2);
+ path.lineTo(1,2);
+ path.lineTo(1,1);
+ path.lineTo(2,1);
+ path.lineTo(2,3);
+ path.lineTo(0,3);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(1,2);
+ pathB.lineTo(2,2);
+ pathB.lineTo(2,4);
+ pathB.lineTo(1,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loopEdge2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,0);
+ path.lineTo(3,0);
+ path.lineTo(3,2);
+ path.lineTo(1,2);
+ path.lineTo(1,1);
+ path.lineTo(2,1);
+ path.lineTo(2,3);
+ path.lineTo(0,3);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(1 - 1e-6f,2);
+ pathB.lineTo(2 - 1e-6f,2);
+ pathB.lineTo(2 - 1e-6f,4);
+ pathB.lineTo(1 - 1e-6f,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp86i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 4);
+ path.cubicTo(3, 4, 6, 2, 5, 2);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(2, 6);
+ pathB.cubicTo(2, 5, 4, 0, 4, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp87u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,2, 2,0, 6,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(4,6, 1,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp88u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,5, 5,0, 6,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(4,6, 1,0, 5,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp89u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 3);
+ path.cubicTo(1, 6, 5, 0, 6, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(3, 6, 3, 0, 6, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp90u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 5);
+ path.cubicTo(1, 2, 5, 2, 4, 1);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(2, 5);
+ pathB.cubicTo(1, 4, 5, 0, 2, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp91u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 6);
+ path.cubicTo(0, 3, 6, 3, 5, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 6);
+ pathB.cubicTo(0, 5, 6, 1, 3, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void skpaaalgarve_org53(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(-1.24344979e-014f, 348);
+ path.lineTo(258, 348);
+ path.lineTo(258, 322);
+ path.quadTo(258, 317.857849f, 255.072006f, 314.928009f);
+ path.quadTo(252.142136f, 312, 248, 312);
+ path.lineTo(1.77635684e-015f, 312);
+ path.lineTo(-1.24344979e-014f, 348);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 312);
+ pathB.lineTo(258, 312);
+ pathB.lineTo(258, 348);
+ pathB.lineTo(0, 348);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpabcspark_ca103(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1.99840144e-015f, 494);
+ path.lineTo(97, 494);
+ path.quadTo(100.313705f, 494, 102.6576f, 491.657593f);
+ path.quadTo(105, 489.313721f, 105, 486);
+ path.lineTo(105, 425);
+ path.quadTo(105, 421.686279f, 102.6576f, 419.342407f);
+ path.quadTo(100.313705f, 417, 97, 417);
+ path.lineTo(2.22044605e-016f, 417);
+ path.lineTo(1.99840144e-015f, 494);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 417);
+ pathB.lineTo(105, 417);
+ pathB.lineTo(105, 494);
+ pathB.lineTo(0, 494);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpacesoftech_com47(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(670.537415f, 285);
+ path.lineTo(670.387451f, 285);
+ path.lineTo(596.315186f, 314.850708f);
+ path.lineTo(626.19696f, 389);
+ path.lineTo(626.346863f, 389);
+ path.lineTo(700.419189f, 359.149261f);
+ path.lineTo(670.537415f, 285);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(663.318542f, 374.100616f);
+ pathB.quadTo(647.950989f, 380.293671f, 632.705322f, 373.806305f);
+ pathB.quadTo(617.459595f, 367.318909f, 611.266541f, 351.951355f);
+ pathB.quadTo(605.073486f, 336.58374f, 611.560913f, 321.338074f);
+ pathB.quadTo(618.048279f, 306.092407f, 633.415833f, 299.899353f);
+ pathB.quadTo(648.783447f, 293.706299f, 664.029114f, 300.193665f);
+ pathB.quadTo(679.27478f, 306.68103f, 685.467834f, 322.048645f);
+ pathB.quadTo(691.660889f, 337.416199f, 685.173523f, 352.661896f);
+ pathB.quadTo(678.686157f, 367.907562f, 663.318542f, 374.100616f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpact_com43(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1.45716772e-016f, 924.336121f);
+ path.lineTo(-1.11022302e-016f, 920);
+ path.lineTo(6, 920);
+ path.lineTo(6, 926);
+ path.lineTo(1.66389287f, 926);
+ path.quadTo(1.18842196f, 925.674561f, 0.756800175f, 925.243225f);
+ path.quadTo(0.325406998f, 924.811523f, 1.45716772e-016f, 924.336121f);
+ path.close();
+ path.moveTo(1, 921);
+ path.lineTo(5, 921);
+ path.lineTo(5, 925);
+ path.cubicTo(2.79086018f, 925, 1, 923.209167f, 1, 921);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(-1, 920);
+ pathB.lineTo(0, 920);
+ pathB.lineTo(3, 927);
+ pathB.lineTo(-1, 927);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpadbox_lt8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(320.097229f, 628.573669f);
+ path.lineTo(610.227173f, 85.7786865f);
+ path.lineTo(946.652588f, 265.601807f);
+ path.lineTo(656.522644f, 808.39679f);
+ path.lineTo(320.097229f, 628.573669f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kInverseWinding_FillType);
+ pathB.moveTo(333.866608f, 623.496155f);
+ pathB.lineTo(613.368042f, 100.585754f);
+ pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395f, 100.085449f);
+ pathB.lineTo(932.633057f, 269.854553f);
+ pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301f, 271.503906f);
+ pathB.lineTo(653.631897f, 794.414307f);
+ pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544f, 794.914612f);
+ pathB.lineTo(334.366943f, 625.145508f);
+ pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608f, 623.496155f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpadindex_de4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 926);
+ path.lineTo(0, 0);
+ path.lineTo(1280, 0);
+ path.lineTo(1280, 926);
+ path.lineTo(0, 926);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 312);
+ pathB.lineTo(8.20486257e-015f, 178);
+ pathB.lineTo(49, 178);
+ pathB.lineTo(49, 312);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpadithya_putr4_blogspot_com551(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(205.605804f, 142.334625f);
+ path.lineTo(254.665359f, 85.6058044f);
+ path.lineTo(311.394196f, 134.665359f);
+ path.lineTo(262.334625f, 191.39418f);
+ path.lineTo(205.605804f, 142.334625f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(283.407959f, 110.462646f);
+ pathB.cubicTo(298.864319f, 123.829437f, 300.558258f, 147.195221f, 287.191467f, 162.651581f);
+ pathB.lineTo(286.537354f, 163.407959f);
+ pathB.cubicTo(273.170563f, 178.864334f, 249.804779f, 180.558258f, 234.348419f, 167.191467f);
+ pathB.lineTo(233.592026f, 166.537338f);
+ pathB.cubicTo(218.135666f, 153.170547f, 216.441727f, 129.804779f, 229.808517f, 114.348412f);
+ pathB.lineTo(230.462646f, 113.592026f);
+ pathB.cubicTo(243.829437f, 98.1356659f, 267.195221f, 96.4417267f, 282.651581f, 109.808517f);
+ pathB.lineTo(283.407959f, 110.462646f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpadspert_de11(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(-4.4408921e-016f, 682.5f);
+ path.lineTo(30.5f, 682.5f);
+ path.cubicTo(32.709137f, 682.5f, 34.5f, 680.709167f, 34.5f, 678.5f);
+ path.lineTo(34.5f, 486.5f);
+ path.cubicTo(34.5f, 484.290863f, 32.709137f, 482.5f, 30.5f, 482.5f);
+ path.lineTo(0, 482.5f);
+ path.lineTo(-4.4408921e-016f, 682.5f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 482);
+ pathB.lineTo(35, 482);
+ pathB.lineTo(35, 683);
+ pathB.lineTo(0, 683);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpaiaigames_com870(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(324.071075f, 845.071045f);
+ path.cubicTo(324.405151f, 844.737f, 324.715668f, 844.379395f, 325, 844.000977f);
+ path.lineTo(325, 842.127197f);
+ path.cubicTo(324.571411f, 842.956238f, 324.017761f, 843.710144f, 323.363953f, 844.363953f);
+ path.lineTo(324.071075f, 845.071045f);
+ path.close();
+ path.moveTo(323.363953f, 714.636047f);
+ path.lineTo(324.071075f, 713.928955f);
+ path.cubicTo(324.405151f, 714.263f, 324.715668f, 714.620605f, 325, 714.999023f);
+ path.lineTo(325, 716.872803f);
+ path.cubicTo(324.571411f, 716.043762f, 324.017761f, 715.289856f, 323.363953f, 714.636047f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(317, 711);
+ pathB.cubicTo(322.522858f, 711, 327, 715.477173f, 327, 721);
+ pathB.lineTo(327, 838);
+ pathB.cubicTo(327, 843.522827f, 322.522858f, 848, 317, 848);
+ pathB.lineTo(155, 848);
+ pathB.cubicTo(149.477158f, 848, 145, 843.522827f, 145, 838);
+ pathB.lineTo(145, 721);
+ pathB.cubicTo(145, 715.477173f, 149.477158f, 711, 155, 711);
+ pathB.lineTo(317, 711);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp92i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(2, 6, 4, 1, 5, 4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(4, 5, 1, 0, 6, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp93d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(1, 6, 4, 1, 4, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(3, 4, 1, 0, 6, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp94u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 3);
+ path.cubicTo(2, 3, 5, 0, 5, 3);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(3, 5, 3, 0, 3, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void skpadbox_lt15(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(333.292084f, 624.570984f);
+ path.lineTo(614.229797f, 98.9735107f);
+ path.lineTo(933.457764f, 269.604431f);
+ path.lineTo(652.52002f, 795.201904f);
+ path.lineTo(333.292084f, 624.570984f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(613.368042f, 100.585754f);
+ pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395f, 100.085449f);
+ pathB.lineTo(932.633057f, 269.854553f);
+ pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301f, 271.503906f);
+ pathB.lineTo(653.631897f, 794.414307f);
+ pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544f, 794.914612f);
+ pathB.lineTo(334.366943f, 625.145508f);
+ pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608f, 623.496155f);
+ pathB.lineTo(613.368042f, 100.585754f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpadoption_org196(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(802, 367);
+ path.lineTo(802, 324);
+ path.lineTo(956, 324);
+ path.lineTo(956, 371);
+ path.quadTo(956, 373.071075f, 954.536011f, 374.536011f);
+ path.quadTo(953.071045f, 376, 951, 376);
+ path.lineTo(811, 376);
+ path.cubicTo(806.029419f, 376, 802, 371.970551f, 802, 367);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kInverseWinding_FillType);
+ pathB.moveTo(803, 326);
+ pathB.lineTo(955, 326);
+ pathB.lineTo(955, 370);
+ pathB.cubicTo(955, 372.761414f, 952.761414f, 375, 950, 375);
+ pathB.lineTo(808, 375);
+ pathB.cubicTo(805.238586f, 375, 803, 372.761414f, 803, 370);
+ pathB.lineTo(803, 326);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpadspert_net23(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(-2.220446e-018f, 483.5f);
+ path.lineTo(0, 482.5f);
+ path.lineTo(30.5f, 482.5f);
+ path.cubicTo(32.709137f, 482.5f, 34.5f, 484.290863f, 34.5f, 486.5f);
+ path.lineTo(34.5f, 678.5f);
+ path.cubicTo(34.5f, 680.709167f, 32.709137f, 682.5f, 30.5f, 682.5f);
+ path.lineTo(-4.4408921e-016f, 682.5f);
+ path.lineTo(-4.41868766e-016f, 681.5f);
+ path.lineTo(30.5f, 681.5f);
+ path.cubicTo(32.1568565f, 681.5f, 33.5f, 680.15686f, 33.5f, 678.5f);
+ path.lineTo(33.5f, 486.5f);
+ path.cubicTo(33.5f, 484.84314f, 32.1568565f, 483.5f, 30.5f, 483.5f);
+ path.lineTo(-2.220446e-018f, 483.5f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 482);
+ pathB.lineTo(35, 482);
+ pathB.lineTo(35, 683);
+ pathB.lineTo(0, 683);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpadventistmission_org572(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1182.00037f, 926);
+ path.cubicTo(1181.08813f, 924.785583f, 1179.63586f, 924, 1178, 924);
+ path.lineTo(938, 924);
+ path.cubicTo(936.364197f, 924, 934.911865f, 924.785583f, 933.999634f, 926);
+ path.lineTo(1182.00037f, 926);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(934, 924);
+ pathB.lineTo(1182, 924);
+ pathB.lineTo(1182, 926);
+ pathB.lineTo(934, 926);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpagentxsites_com55(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(925, 27);
+ path.cubicTo(924.447693f, 27, 924, 27.4477158f, 924, 28);
+ path.lineTo(924, 55);
+ path.cubicTo(924, 55.5522842f, 924.447693f, 56, 925, 56);
+ path.lineTo(1103, 56);
+ path.cubicTo(1103.55225f, 56, 1104, 55.5522842f, 1104, 55);
+ path.lineTo(1104, 28);
+ path.cubicTo(1104, 27.4477158f, 1103.55225f, 27, 1103, 27);
+ path.lineTo(925, 27);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1103, 27);
+ pathB.cubicTo(1104.10461f, 27, 1105, 27.8954315f, 1105, 29);
+ pathB.lineTo(1105, 54);
+ pathB.cubicTo(1105, 55.1045685f, 1104.10461f, 56, 1103, 56);
+ pathB.lineTo(926, 56);
+ pathB.cubicTo(924.895447f, 56, 924, 55.1045685f, 924, 54);
+ pathB.lineTo(924, 29);
+ pathB.cubicTo(924, 27.8954315f, 924.895447f, 27, 926, 27);
+ pathB.lineTo(1103, 27);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpbakosoft_com10(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(190, 170);
+ path.cubicTo(178.9543f, 170, 170, 178.9543f, 170, 190);
+ path.cubicTo(170, 201.0457f, 178.9543f, 210, 190, 210);
+ path.lineTo(370, 210);
+ path.cubicTo(381.045685f, 210, 390, 201.0457f, 390, 190);
+ path.cubicTo(390, 178.9543f, 381.045685f, 170, 370, 170);
+ path.lineTo(190, 170);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(210, 190);
+ pathB.quadTo(210, 198.284271f, 204.142136f, 204.142136f);
+ pathB.quadTo(198.284271f, 210, 190, 210);
+ pathB.quadTo(181.715729f, 210, 175.857864f, 204.142136f);
+ pathB.quadTo(170, 198.284271f, 170, 190);
+ pathB.quadTo(170, 181.715729f, 175.857864f, 175.857864f);
+ pathB.quadTo(181.715729f, 170, 190, 170);
+ pathB.quadTo(198.284271f, 170, 204.142136f, 175.857864f);
+ pathB.quadTo(210, 181.715729f, 210, 190);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpbambootheme_com12(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(47.8780937f, 58);
+ path.lineTo(0, 58);
+ path.lineTo(-8.65973959e-015f, 96.9914017f);
+ path.quadTo(20.0654926f, 96.6451874f, 34.3553391f, 82.3553391f);
+ path.quadTo(44.9466133f, 71.764061f, 47.8780937f, 58);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(-1, -3);
+ pathB.lineTo(-1, -3);
+ pathB.cubicTo(26.6142502f, -3, 49, 19.3857498f, 49, 47);
+ pathB.lineTo(49, 47);
+ pathB.cubicTo(49, 74.6142502f, 26.6142502f, 97, -1, 97);
+ pathB.lineTo(-1, 97);
+ pathB.cubicTo(-28.6142502f, 97, -51, 74.6142502f, -51, 47);
+ pathB.lineTo(-51, 47);
+ pathB.cubicTo(-51, 19.3857498f, -28.6142502f, -3, -1, -3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpakmmos_ru100(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(693.000488f, 926);
+ path.cubicTo(692.164734f, 925.37207f, 691.125793f, 925, 690, 925);
+ path.lineTo(578, 925);
+ path.cubicTo(576.874207f, 925, 575.835266f, 925.37207f, 574.999512f, 926);
+ path.lineTo(693.000488f, 926);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(575, 925);
+ pathB.lineTo(693, 925);
+ pathB.lineTo(693, 926);
+ pathB.lineTo(575, 926);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpcarpetplanet_ru22(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(195, 785);
+ path.cubicTo(124.307556f, 785, 67, 841.859863f, 67, 912);
+ path.lineTo(67, 913);
+ path.cubicTo(67, 917.388916f, 67.2243805f, 921.725769f, 67.662384f, 926);
+ path.lineTo(322, 926);
+ path.lineTo(322, 896.048035f);
+ path.cubicTo(314.09201f, 833.437622f, 260.247131f, 785, 195, 785);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(195, 785);
+ pathB.cubicTo(265.140167f, 785, 322, 842.307556f, 322, 913);
+ pathB.cubicTo(322, 983.692444f, 265.140167f, 1041, 195, 1041);
+ pathB.lineTo(194, 1041);
+ pathB.cubicTo(123.85984f, 1041, 67, 983.692444f, 67, 913);
+ pathB.cubicTo(67, 842.307556f, 123.85984f, 785, 194, 785);
+ pathB.lineTo(195, 785);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpcarrot_is24(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(945, 597);
+ path.quadTo(913.93396f, 597, 891.96698f, 618.96698f);
+ path.quadTo(870, 640.93396f, 870, 672);
+ path.quadTo(870, 703.06604f, 891.96698f, 725.03302f);
+ path.quadTo(913.93396f, 747, 945, 747);
+ path.quadTo(976.06604f, 747, 998.03302f, 725.03302f);
+ path.quadTo(1020, 703.06604f, 1020, 672);
+ path.quadTo(1020, 640.93396f, 998.03302f, 618.96698f);
+ path.quadTo(976.06604f, 597, 945, 597);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(945.080994f, 597.161987f);
+ pathB.cubicTo(903.659973f, 597.161987f, 870.080994f, 630.73999f, 870.080994f, 672.161987f);
+ pathB.cubicTo(870.080994f, 676.096008f, 870.387024f, 679.957031f, 870.971008f, 683.726013f);
+ pathB.cubicTo(876.53302f, 719.656006f, 907.593994f, 747.161987f, 945.080994f, 747.161987f);
+ pathB.cubicTo(982.567993f, 747.161987f, 1013.62903f, 719.656006f, 1019.19104f, 683.726013f);
+ pathB.cubicTo(1019.77502f, 679.955017f, 1020.08099f, 676.094971f, 1020.08099f, 672.161987f);
+ pathB.cubicTo(1020.08002f, 630.73999f, 986.502014f, 597.161987f, 945.080994f, 597.161987f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpbangalorenest_com4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 926);
+ path.lineTo(0, 0);
+ path.lineTo(1265, 0);
+ path.lineTo(1265, 926);
+ path.lineTo(0, 926);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 290);
+ pathB.lineTo(-2.64514972e-014f, 146);
+ pathB.lineTo(30, 146);
+ pathB.lineTo(30, 290);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpbenzoteh_ru152(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(883, 23);
+ path.lineTo(883, 0);
+ path.lineTo(1122.5f, 0);
+ path.lineTo(1122.5f, 25.2136822f);
+ path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
+ path.quadTo(1120.07104f, 28, 1118, 28);
+ path.lineTo(888, 28);
+ path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ path.quadTo(883, 25.0710678f, 883, 23);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(883, 0);
+ pathB.lineTo(1123, 0);
+ pathB.lineTo(1123, 23);
+ pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
+ pathB.quadTo(1120.07104f, 28, 1118, 28);
+ pathB.lineTo(888, 28);
+ pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ pathB.quadTo(883, 25.0710678f, 883, 23);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpbestred_ru37(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(883, 23);
+ path.lineTo(883, 0);
+ path.lineTo(1122.5f, 0);
+ path.lineTo(1122.5f, 25.2136822f);
+ path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
+ path.quadTo(1120.07104f, 28, 1118, 28);
+ path.lineTo(888, 28);
+ path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ path.quadTo(883, 25.0710678f, 883, 23);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(883, 0);
+ pathB.lineTo(1123, 0);
+ pathB.lineTo(1123, 23);
+ pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
+ pathB.quadTo(1120.07104f, 28, 1118, 28);
+ pathB.lineTo(888, 28);
+ pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ pathB.quadTo(883, 25.0710678f, 883, 23);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpbingoentertainment_net189(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(896, 745.38678f);
+ path.lineTo(896, 873.38678f);
+ path.lineTo(922.567993f, 876.683716f);
+ path.lineTo(922.567993f, 748.683716f);
+ path.lineTo(896, 745.38678f);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(899.200928f, 745.783997f);
+ pathB.cubicTo(897.119385f, 745.525696f, 895.432007f, 752.031982f, 895.432007f, 760.316284f);
+ pathB.lineTo(895.432007f, 858.316284f);
+ pathB.cubicTo(895.432007f, 866.600586f, 897.119385f, 873.525696f, 899.200928f, 873.783997f);
+ pathB.lineTo(918.799133f, 876.216003f);
+ pathB.cubicTo(920.880615f, 876.474304f, 922.567993f, 869.968018f, 922.567993f, 861.683716f);
+ pathB.lineTo(922.567993f, 763.683716f);
+ pathB.cubicTo(922.567993f, 755.399414f, 920.880615f, 748.474304f, 918.799133f, 748.216003f);
+ pathB.lineTo(899.200928f, 745.783997f);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpcarrefour_ro62(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1104, 453);
+ path.lineTo(399, 453);
+ path.lineTo(399, 657);
+ path.cubicTo(399, 661.970581f, 403.029449f, 666, 408, 666);
+ path.lineTo(1095, 666);
+ path.cubicTo(1099.97058f, 666, 1104, 661.970581f, 1104, 657);
+ path.lineTo(1104, 453);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kInverseWinding_FillType);
+ pathB.moveTo(400, 453);
+ pathB.lineTo(1103, 453);
+ pathB.lineTo(1103, 666);
+ pathB.lineTo(406, 666);
+ pathB.cubicTo(402.686279f, 666, 400, 663.313721f, 400, 660);
+ pathB.lineTo(400, 453);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpcaffelavazzait_com_ua21(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(883, 23);
+ path.lineTo(883, 0);
+ path.lineTo(1122.5f, 0);
+ path.lineTo(1122.5f, 25.2136822f);
+ path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
+ path.quadTo(1120.07104f, 28, 1118, 28);
+ path.lineTo(888, 28);
+ path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ path.quadTo(883, 25.0710678f, 883, 23);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(883, 0);
+ pathB.lineTo(1123, 0);
+ pathB.lineTo(1123, 23);
+ pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
+ pathB.quadTo(1120.07104f, 28, 1118, 28);
+ pathB.lineTo(888, 28);
+ pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ pathB.quadTo(883, 25.0710678f, 883, 23);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpcamcorder_kz21(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(883, 23);
+ path.lineTo(883, 0);
+ path.lineTo(1122.5f, 0);
+ path.lineTo(1122.5f, 25.2136822f);
+ path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f);
+ path.quadTo(1120.07104f, 28, 1118, 28);
+ path.lineTo(888, 28);
+ path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ path.quadTo(883, 25.0710678f, 883, 23);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(883, 0);
+ pathB.lineTo(1123, 0);
+ pathB.lineTo(1123, 23);
+ pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f);
+ pathB.quadTo(1120.07104f, 28, 1118, 28);
+ pathB.lineTo(888, 28);
+ pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f);
+ pathB.quadTo(883, 25.0710678f, 883, 23);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpcavablar_net563(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(160.000488f, 918);
+ path.cubicTo(159.164749f, 917.37207f, 158.125824f, 917, 157, 917);
+ path.lineTo(94, 917);
+ path.cubicTo(92.874176f, 917, 91.8352661f, 917.37207f, 90.9995193f, 918);
+ path.lineTo(160.000488f, 918);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(91, 917);
+ pathB.lineTo(160, 917);
+ pathB.lineTo(160, 918);
+ pathB.lineTo(91, 918);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void skpinsomnia_gr72(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1138, 231);
+ path.lineTo(1137, 243.625748f);
+ path.lineTo(1137, 926);
+ path.lineTo(1139, 926);
+ path.lineTo(1139, 231);
+ path.lineTo(1138, 231);
+ path.close();
+ SkPath pathB;
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1139, 231);
+ pathB.lineTo(1138, 231);
+ pathB.lineTo(633, 6101);
+ pathB.lineTo(1139, 6607);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp95u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 2);
+ path.cubicTo(2, 3, 5, 1, 3, 2);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(2, 3, 2, 0, 3, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp96d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 6);
+ path.cubicTo(0, 3, 6, 3, 5, 0);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(3, 6);
+ pathB.cubicTo(0, 5, 6, 1, 3, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp97x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 2);
+ path.cubicTo(0, 6, 2, 1, 2, 1);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(1, 2, 2, 0, 6, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename);
+}
+
+static void cubicOp98x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 3);
+ path.cubicTo(3, 6, 4, 1, 6, 3);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(3, 6, 3, 0, 6, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename);
+}
+
+static void cubicOp99(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3,6);
+ path.cubicTo(0,3, 6,5, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(5,6);
+ pathB.cubicTo(4,5, 6,3, 3,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp100(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,2, 2,1, 4,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(2,4, 1,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp101(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(2, 3, 2, 1, 5, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(3, 5, 1, 0, 3, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp102(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,2, 1,0, 3,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,1);
+ pathB.cubicTo(0,3, 1,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp103(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 2,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(1,2, 1,0, 5,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp104(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,6, 4,0, 6,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,4);
+ pathB.cubicTo(1,6, 1,0, 6,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp105(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,4, 6,5, 2,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(5,6);
+ pathB.cubicTo(0,2, 1,0, 4,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp106(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(4, 6, 2, 1, 2, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(0, 2, 1, 0, 6, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp107(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(4, 6, 2, 1, 2, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(0, 2, 1, 0, 6, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp108(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(4, 6, 2, 1, 2, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(0, 2, 1, 0, 6, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp109(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(4,5, 6,3, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3,6);
+ pathB.cubicTo(4,5, 1,0, 5,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp110(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 4, 4, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp111(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1,4);
+ path.cubicTo(0,5, 4,1, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,4);
+ pathB.cubicTo(1,3, 4,1, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void xOp1u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 4);
+ path.cubicTo(4, 5, 3, 2, 6, 3);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(2, 3);
+ pathB.cubicTo(3, 6, 4, 1, 5, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void xOp1i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 4);
+ path.cubicTo(1, 5, 6, 0, 5, 1);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(0, 6);
+ pathB.cubicTo(1, 5, 4, 1, 5, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void xOp2i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(0, 4, 3, 2, 6, 1);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(2, 3);
+ pathB.cubicTo(1, 6, 5, 1, 4, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void xOp3i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1,4);
+ path.cubicTo(0,5, 4,1, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,4);
+ pathB.cubicTo(1,3, 4,1, 5,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void findFirst1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,6, 5,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,2, 1,0, 6,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp112(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2,4);
+ path.cubicTo(2,3, 6,4, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(4,6);
+ pathB.cubicTo(0,1, 4,2, 3,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp113(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(2,4);
+ path.cubicTo(3,5, 2.33333325f,4.33333349f, 3.83333325f,3.83333349f);
+ path.close();
+ pathB.moveTo(3,5);
+ pathB.cubicTo(2.33333325f,4.33333349f, 3.83333325f,3.83333349f, 2,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp114(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 3);
+ pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp114asQuad(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 3);
+ pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1);
+ pathB.close();
+ SkPath qPath, qPathB;
+ CubicPathToQuads(path, &qPath);
+ CubicPathToQuads(pathB, &qPathB);
+ testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename);
+}
+
+static void quadOp10i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0, 0);
+ path.quadTo(1, 8, 3, 5);
+ path.lineTo(8, 1);
+ path.close();
+ pathB.moveTo(0, 0);
+ pathB.quadTo(8, 1, 4, 8);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void kari1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(39.9375, -5.8359375);
+ path1.lineTo(40.625, -5.7890625);
+ path1.lineTo(37.7109375, 1.3515625);
+ path1.lineTo(37.203125, 0.9609375);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(37.52734375f, -1.44140625f);
+ path2.cubicTo(37.8736991882324f, -1.69921875f, 38.1640625f, -2.140625f, 38.3984375f, -2.765625f);
+ path2.lineTo(38.640625f, -2.609375f);
+ path2.cubicTo(38.53125f, -1.89583337306976f, 38.0664443969727f, -0.154893040657043f, 38.0664443969727f, -0.154893040657043f);
+ path2.cubicTo(38.0664443969727f, -0.154893040657043f, 37.1809883117676f, -1.18359375f, 37.52734375, -1.44140625f);
+ path2.close();
+
+ testPathOp(reporter, path1, path2, kDifference_SkPathOp, filename);
+}
+
+static void issue2504(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(34.2421875, -5.976562976837158203125);
+ path1.lineTo(35.453121185302734375, 0);
+ path1.lineTo(31.9375, 0);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(36.71843719482421875, 0.8886508941650390625);
+ path2.cubicTo(36.71843719482421875, 0.8886508941650390625,
+ 35.123386383056640625, 0.554015457630157470703125,
+ 34.511409759521484375, -0.1152553558349609375);
+ path2.cubicTo(33.899425506591796875, -0.7845261096954345703125,
+ 34.53484344482421875, -5.6777553558349609375,
+ 34.53484344482421875, -5.6777553558349609375);
+ path2.close();
+ testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void issue2540(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(26.5054988861083984375, 85.73960113525390625);
+ path1.cubicTo(84.19739532470703125, 17.77140045166015625, 16.93920135498046875, 101.86199951171875, 12.631000518798828125, 105.24700164794921875);
+ path1.cubicTo(11.0819997787475585937500000, 106.46399688720703125, 11.5260000228881835937500000, 104.464996337890625, 11.5260000228881835937500000, 104.464996337890625);
+ path1.lineTo(23.1654987335205078125, 89.72879791259765625);
+ path1.cubicTo(23.1654987335205078125, 89.72879791259765625, -10.1713008880615234375, 119.9160003662109375, -17.1620006561279296875, 120.8249969482421875);
+ path1.cubicTo(-19.1149997711181640625, 121.07900238037109375, -18.0380001068115234375, 119.79299163818359375, -18.0380001068115234375, 119.79299163818359375);
+ path1.cubicTo(-18.0380001068115234375, 119.79299163818359375, 14.22100067138671875, 90.60700225830078125, 26.5054988861083984375, 85.73960113525390625);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(-25.077999114990234375, 124.9120025634765625);
+ path2.cubicTo(-25.077999114990234375, 124.9120025634765625, -25.9509983062744140625, 125.95400238037109375, -24.368999481201171875, 125.7480010986328125);
+ path2.cubicTo(-16.06999969482421875, 124.66899871826171875, 1.2680000066757202148437500, 91.23999786376953125, 37.264003753662109375, 95.35400390625);
+ path2.cubicTo(37.264003753662109375, 95.35400390625, 11.3710002899169921875, 83.7339935302734375, -25.077999114990234375, 124.9120025634765625);
+ path2.close();
+ testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void rects1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(6, 0);
+ path.lineTo(6, 6);
+ path.lineTo(0, 6);
+ path.close();
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.moveTo(0, 0);
+ pathB.lineTo(1, 0);
+ pathB.lineTo(1, 1);
+ pathB.lineTo(0, 1);
+ pathB.close();
+ pathB.moveTo(0, 0);
+ pathB.lineTo(2, 0);
+ pathB.lineTo(2, 2);
+ pathB.lineTo(0, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void rects2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(4, 0);
+ path.lineTo(4, 4);
+ path.lineTo(0, 4);
+ path.close();
+ path.moveTo(3, 3);
+ path.lineTo(4, 3);
+ path.lineTo(4, 4);
+ path.lineTo(3, 4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 3);
+ pathB.lineTo(6, 3);
+ pathB.lineTo(6, 6);
+ pathB.lineTo(3, 6);
+ pathB.close();
+ pathB.moveTo(3, 3);
+ pathB.lineTo(4, 3);
+ pathB.lineTo(4, 4);
+ pathB.lineTo(3, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void rects3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 4, 4, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void rects4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void issue2753(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(142.701f, 110.568f);
+ path1.lineTo(142.957f, 100);
+ path1.lineTo(153.835f, 100);
+ path1.lineTo(154.592f, 108.188f);
+ path1.cubicTo(154.592f, 108.188f, 153.173f, 108.483f, 152.83f, 109.412f);
+ path1.cubicTo(152.83f, 109.412f, 142.701f, 110.568f, 142.701f, 110.568f);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(39, 124.001f);
+ path2.cubicTo(39, 124.001f, 50.6f, 117.001f, 50.6f, 117.001f);
+ path2.cubicTo(50.6f, 117.001f, 164.601f, 85.2f, 188.201f, 117.601f);
+ path2.cubicTo(188.201f, 117.601f, 174.801f, 93, 39, 124.001f);
+ path2.close();
+
+ testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void issue2808(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1, path2;
+
+ path1.moveTo(509.20300293f, 385.601989746f);
+ path1.quadTo(509.20300293f, 415.68838501f, 487.928710938f, 436.96270752f);
+ path1.quadTo(466.654388428f, 458.236999512f, 436.567993164f, 458.236999512f);
+ path1.quadTo(406.4815979f, 458.236999512f, 385.207275391f, 436.96270752f);
+ path1.quadTo(363.932983398f, 415.68838501f, 363.932983398f, 385.601989746f);
+ path1.quadTo(363.932983398f, 355.515594482f, 385.207275391f, 334.241271973f);
+ path1.quadTo(406.4815979f, 312.96697998f, 436.567993164f, 312.96697998f);
+ path1.quadTo(466.654388428f, 312.96697998f, 487.928710938f, 334.241271973f);
+ path1.quadTo(509.20300293f, 355.515594482f, 509.20300293f, 385.601989746f);
+ path1.close();
+
+ path2.moveTo(449.033996582f, 290.87298584f);
+ path2.quadTo(449.033996582f, 301.028259277f, 441.853149414f, 308.209106445f);
+ path2.quadTo(434.672271729f, 315.389984131f, 424.516998291f, 315.389984131f);
+ path2.quadTo(414.361724854f, 315.389984131f, 407.180847168f, 308.209106445f);
+ path2.quadTo(400, 301.028259277f, 400, 290.87298584f);
+ path2.quadTo(400, 280.717712402f, 407.180847168f, 273.536865234f);
+ path2.quadTo(414.361724854f, 266.355987549f, 424.516998291f, 266.355987549f);
+ path2.quadTo(434.672271729f, 266.355987549f, 441.853149414f, 273.536865234f);
+ path2.quadTo(449.033996582f, 280.717712402f, 449.033996582f, 290.87298584f);
+ path2.close();
+
+ testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp115(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 2,1, 5,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(3,5, 1,0, 4,3);
+ pathB.close();
+ SkPath path2(path);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void testRect1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, path2;
+ path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
+ path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+// path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
+ testPathOp(reporter, path, path2, kUnion_SkPathOp, filename);
+}
+
+static void testRect2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(4, 4, 5, 5, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction);
+ pathB.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp116(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(4,6, 2,0, 2,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(0,2, 1,0, 6,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp117(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(4,5, 6,0, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(0,1, 1,0, 5,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp118(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(4,6, 5,1, 6,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,5);
+ pathB.cubicTo(2,6, 1,0, 6,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loop1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(1,5, -5.66666651f,3.33333349f, 8.83333302f,2.33333349f);
+ path.close();
+ pathB.moveTo(1,5);
+ pathB.cubicTo(-5.66666651f,3.33333349f, 8.83333302f,2.33333349f, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+#include "SkPathOpsCubic.h"
+
+static void loop1asQuad(skiatest::Reporter* reporter, const char* filename) {
+ CubicPts cubic1 = {{{0,1}, {1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.33333349f}}};
+ CubicPts cubic2 = {{{1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.33333349f}, {0,1}}};
+ SkDCubic c1, c2;
+ c1.debugSet(cubic1.fPts);
+ c2.debugSet(cubic2.fPts);
+ double c1InflectionTs[2], c2InflectionTs[2];
+ SkDEBUGCODE(int c1InfTCount =) c1.findInflections(c1InflectionTs);
+ SkASSERT(c1InfTCount == 2);
+ SkDEBUGCODE(int c2InfTCount =) c2.findInflections(c2InflectionTs);
+ SkASSERT(c2InfTCount == 1);
+ SkASSERT(c1InflectionTs[0] > c1InflectionTs[1]);
+ SkDCubicPair c1pair = c1.chopAt(c1InflectionTs[0]);
+ SkDCubicPair c1apair = c1pair.first().chopAt(c1InflectionTs[1]);
+ SkDCubicPair c2pair = c2.chopAt(c2InflectionTs[0]);
+ SkDQuad q1[2] = { c1pair.first().toQuad(), c1pair.second().toQuad() };
+ SkDQuad q1a[2] = { c1apair.first().toQuad(), c1apair.second().toQuad() };
+ SkDQuad q2[2] = { c2pair.first().toQuad(), c2pair.second().toQuad() };
+ SkPath path, pathB;
+ path.moveTo(q1a[0].fPts[0].asSkPoint());
+ path.quadTo(q1a[0].fPts[1].asSkPoint(), q1a[0].fPts[2].asSkPoint());
+ path.quadTo(q1a[1].fPts[1].asSkPoint(), q1a[1].fPts[2].asSkPoint());
+ path.quadTo(q1[1].fPts[1].asSkPoint(), q1[1].fPts[2].asSkPoint());
+ path.close();
+ pathB.moveTo(q2[0].fPts[0].asSkPoint());
+ pathB.quadTo(q2[0].fPts[1].asSkPoint(), q2[0].fPts[2].asSkPoint());
+ pathB.quadTo(q2[1].fPts[1].asSkPoint(), q2[1].fPts[2].asSkPoint());
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loop2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 3.f,4.f, 4.5f,1.5f);
+ path.close();
+ pathB.moveTo(3,4);
+ pathB.cubicTo(3.f,4.f, 4.5f,1.5f, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loop3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(3,5, -3.66666651f,0, 10.5f,-1.66666651f);
+ path.close();
+ pathB.moveTo(3,5);
+ pathB.cubicTo(-3.66666651f,0, 10.5f,-1.66666651f, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loop4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,5);
+ path.cubicTo(1,5, 1,4, 0.833333313f,3);
+ path.close();
+ pathB.moveTo(1,5);
+ pathB.cubicTo(1,4, 0.833333313f,3, 0,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+#include "SkParsePath.h"
+
+static void issue3517(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+
+ const char str[] = "M31.35 57.75L31.35 57.75C31.9 57.7486 32.45 57.7948 33 57.7413C33.55 57.6878 34.1 57.5014 34.65 57.4291C35.2 57.3569 35.75 57.3223 36.3 57.3079C36.85 57.2935 37.4 57.3143 37.95 57.3428C38.5 57.3712 39.05 57.4112 39.6 57.4786C40.15 57.546 40.7 57.7029 41.25 57.7472C41.8 57.7916 42.35 57.7962 42.9 57.7445C43.45 57.6928 44 57.5345 44.55 57.4373C45.1 57.34 45.65 57.2115 46.2 57.1611C46.75 57.1107 47.3 57.1371 47.85 57.1349C48.4 57.1327 48.95 57.144 49.5 57.1478C50.05 57.1516 50.6 57.1553 51.15 57.1579C51.7 57.1605 52.25 57.1601 52.8 57.1634C53.35 57.1667 53.9 57.1731 54.45 57.1776C55 57.182 55.55 57.1916 56.1 57.19C56.65 57.1884 57.2 57.178 57.75 57.168C58.3 57.158 58.85 57.1355 59.4 57.1299C59.95 57.1243 60.5 57.1338 61.05 57.1345C61.6 57.1352 62.15 57.124 62.7 57.134C63.25 57.1441 63.8 57.1731 64.35 57.195C64.9 57.2169 65.45 57.2532 66 57.2655C66.55 57.2778 67.1 57.2647 67.65 57.2687C68.2 57.2728 68.75 57.267 69.3 57.2896C69.85 57.3122 70.4 57.371 70.95 57.4044C71.5 57.4377 72.05 57.4668 72.6 57.4896C73.15 57.5123 73.7 57.545 74.25 57.5408C74.8 57.5365 75.35 57.5068 75.9 57.4641C76.45 57.4213 77 57.3244 77.55 57.2842C78.1 57.244 78.65 57.2163 79.2 57.2228C79.75 57.2293 80.3 57.29 80.85 57.3232C81.4 57.3563 81.95 57.396 82.5 57.4219C83.05 57.4478 83.6 57.4637 84.15 57.4787C84.7 57.4937 85.25 57.5011 85.8 57.5121C86.35 57.523 86.9 57.5411 87.45 57.5444C88 57.5477 88.55 57.5663 89.1 57.5318C89.65 57.4972 90.2 57.3126 90.75 57.337C91.3 57.3613 91.85 57.6088 92.4 57.6776C92.95 57.7465 93.5 57.7379 94.05 57.75C94.6 57.7621 95.15 57.75 95.7 57.75L95.7 57.75L31.35 57.75Z";
+ SkParsePath::FromSVGString(str, &path);
+
+ const char strB[] = "M31.35 57.75L31.35 57.75C31.9 57.7514 32.45 57.7052 33 57.7587C33.55 57.8122 34.1 57.9986 34.65 58.0709C35.2 58.1431 35.75 58.1777 36.3 58.1921C36.85 58.2065 37.4 58.1857 37.95 58.1572C38.5 58.1288 39.05 58.0888 39.6 58.0214C40.15 57.954 40.7 57.7971 41.25 57.7528C41.8 57.7084 42.35 57.7038 42.9 57.7555C43.45 57.8072 44 57.9655 44.55 58.0627C45.1 58.16 45.65 58.2885 46.2 58.3389C46.75 58.3893 47.3 58.3629 47.85 58.3651C48.4 58.3673 48.95 58.356 49.5 58.3522C50.05 58.3484 50.6 58.3447 51.15 58.3421C51.7 58.3395 52.25 58.3399 52.8 58.3366C53.35 58.3333 53.9 58.3269 54.45 58.3224C55 58.318 55.55 58.3084 56.1 58.31C56.65 58.3116 57.2 58.322 57.75 58.332C58.3 58.342 58.85 58.3645 59.4 58.3701C59.95 58.3757 60.5 58.3662 61.05 58.3655C61.6 58.3648 62.15 58.376 62.7 58.366C63.25 58.3559 63.8 58.3269 64.35 58.305C64.9 58.2831 65.45 58.2468 66 58.2345C66.55 58.2222 67.1 58.2353 67.65 58.2313C68.2 58.2272 68.75 58.233 69.3 58.2104C69.85 58.1878 70.4 58.129 70.95 58.0956C71.5 58.0623 72.05 58.0332 72.6 58.0104C73.15 57.9877 73.7 57.955 74.25 57.9592C74.8 57.9635 75.35 57.9932 75.9 58.0359C76.45 58.0787 77 58.1756 77.55 58.2158C78.1 58.256 78.65 58.2837 79.2 58.2772C79.75 58.2707 80.3 58.21 80.85 58.1768C81.4 58.1437 81.95 58.104 82.5 58.0781C83.05 58.0522 83.6 58.0363 84.15 58.0213C84.7 58.0063 85.25 57.9989 85.8 57.9879C86.35 57.977 86.9 57.9589 87.45 57.9556C88 57.9523 88.55 57.9337 89.1 57.9682C89.65 58.0028 90.2 58.1874 90.75 58.163C91.3 58.1387 91.85 57.8912 92.4 57.8224C92.95 57.7535 93.5 57.7621 94.05 57.75C94.6 57.7379 95.15 57.75 95.7 57.75L95.7 57.75L31.35 57.75Z";
+ SkParsePath::FromSVGString(strB, &pathB);
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubicOp119(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,5, 2,1, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(1,3, 1,0, 5,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp120(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,4, 2,1, 4,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(0,4, 1,0, 4,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp121(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 3,2, 4,3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(3,4, 1,0, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+// FIXME : haven't debugged this failure yet
+static void cubicOp122(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,5, 4,1, 4,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,4);
+ pathB.cubicTo(0,4, 1,0, 5,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp123(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 2,0, 6,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(0,6, 1,0, 5,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loop5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,2);
+ path.cubicTo(1,2, 1,1.66666663f, 0.833333313f,1.33333325f);
+ path.close();
+ pathB.moveTo(1,2);
+ pathB.cubicTo(1,1.66666663f, 0.833333313f,1.33333325f, 0,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loop6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(1,3, -1.66666675f,1.66666663f, 4.16666651f,1.00000012f);
+ path.close();
+ pathB.moveTo(1,3);
+ pathB.cubicTo(-1.66666675f,1.66666663f, 4.16666651f,1.00000012f, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp124(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 6,0, 3,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(0,3, 1,0, 5,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp125(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,6, 3,1, 6,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,3);
+ pathB.cubicTo(2,6, 1,0, 6,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp126(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,3, 6,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(1,2, 1,0, 3,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp127(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(1,5, 6,0, 3,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(0,3, 1,0, 5,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp128(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,3, 3,2, 5,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,3);
+ pathB.cubicTo(2,5, 1,0, 3,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp129(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(3,4, 2,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(1,2, 6,5, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp130(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(4,6, 3,0, 2,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,3);
+ pathB.cubicTo(1,2, 6,5, 6,4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+#include "SkGeometry.h"
+
+static void complex_to_quads(const SkPoint pts[], SkPath* path) {
+ SkScalar loopT[3];
+ if (SkDCubic::ComplexBreak(pts, loopT)) {
+ SkPoint cubicPair[7];
+ SkChopCubicAt(pts, cubicPair, loopT[0]);
+ SkDCubic c1, c2;
+ c1.set(cubicPair);
+ c2.set(&cubicPair[3]);
+ SkDQuad q1 = c1.toQuad();
+ SkDQuad q2 = c2.toQuad();
+ path->quadTo(q1[1].asSkPoint(), q1[2].asSkPoint());
+ path->quadTo(q2[1].asSkPoint(), q2[2].asSkPoint());
+ } else {
+ path->cubicTo(pts[1], pts[2], pts[3]);
+ }
+}
+
+static void cubicOp130a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ SkPoint pts[] = { {5,6}, {4,6}, {3,0}, {2,1} };
+ complex_to_quads(pts, &path);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,3);
+ SkPoint pts2[] = { {0,3}, {1,2}, {6,5}, {6,4} };
+ complex_to_quads(pts2, &path);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp131(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(3,4, 3,0, 6,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,3);
+ pathB.cubicTo(2,6, 1,0, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void circlesOp1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addCircle(0, 1, 2, SkPath::kCCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addCircle(0, 1, 1, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void circlesOp2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addCircle(0, 1, 4, SkPath::kCCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addCircle(0, 4, 3, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void rRect1x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(20.65f, 5.65f);
+ path.conicTo(20.65f, 1.13612f, 25.1404f, 0.65f, 0.888488f);
+ path.lineTo(25.65f, 0.65f);
+ path.lineTo(26.1596f, 0.67604f);
+ path.conicTo(30.65f, 1.13612f, 30.65f, 5.65f, 0.888488f);
+ path.lineTo(30.65f, 25.65f);
+ path.conicTo(30.65f, 20.65f, 25.65f, 20.65f, 0.707107f);
+ path.lineTo(20.65f, 20.65f);
+ path.lineTo(20.65f, 5.65f);
+ path.close();
+ path.moveTo(20.65f, 20.65f);
+ path.lineTo(5.65f, 20.65f);
+ path.conicTo(0.65f, 20.65f, 0.65f, 25.65f, 0.707107f);
+ path.lineTo(0.65f, 45.65f);
+ path.conicTo(0.65f, 50.65f, 5.65f, 50.65f, 0.707107f);
+ path.lineTo(25.65f, 50.65f);
+ path.conicTo(30.65f, 50.65f, 30.65f, 45.65f, 0.707107f);
+ path.lineTo(30.65f, 25.65f);
+ path.conicTo(30.65f, 30.65f, 25.65f, 30.65f, 0.707107f);
+ path.conicTo(20.65f, 30.65f, 20.65f, 25.65f, 0.707107f);
+ path.lineTo(20.65f, 20.65f);
+ path.close();
+ SkPath path1(path);
+
+ path.reset();
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(20.65f, 45.65f);
+ path.lineTo(20.65f, 25.65f);
+ path.conicTo(20.65f, 20.65f, 25.65f, 20.65f, 0.707107f);
+ path.lineTo(45.65f, 20.65f);
+ path.conicTo(50.65f, 20.65f, 50.65f, 25.65f, 0.707107f);
+ path.lineTo(50.65f, 45.65f);
+ path.conicTo(50.65f, 50.65f, 45.65f, 50.65f, 0.707107f);
+ path.lineTo(25.65f, 50.65f);
+ path.conicTo(20.65f, 50.65f, 20.65f, 45.65f, 0.707107f);
+ path.close();
+ SkPath path2(path);
+
+ testPathOp(reporter, path1, path2, kDifference_SkPathOp, filename);
+}
+
+static void loop7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(3,4, -1,0, 8.5f,-2.5f);
+ path.close();
+ pathB.moveTo(3,4);
+ pathB.cubicTo(-1,0, 8.5f,-2.5f, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void rects5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(5, 5, 6, 6, SkPath::kCW_Direction);
+ path.addRect(5, 5, 6, 6, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.addRect(0, 0, 6, 6, SkPath::kCW_Direction);
+ pathB.addRect(5, 5, 6, 6, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loop8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(1,4, -3.83333325f,0.166666627f, 6,-1);
+ path.close();
+ pathB.moveTo(1,4);
+ pathB.cubicTo(-3.83333325f,0.166666627f, 6,-1, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loop9(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(1,3, -2.5f,0, 3.33333325f,-0.666666627f);
+ path.close();
+ pathB.moveTo(1,3);
+ pathB.cubicTo(-2.5f,0, 3.33333325f,-0.666666627f, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void circlesOp3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addCircle(0, 1, 2, SkPath::kCCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addCircle(3, 5, 3, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loop10(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(5,6);
+ path.cubicTo(1,2, 1,2, -3.66666651f,13.333334f);
+ path.close();
+ pathB.moveTo(1,2);
+ pathB.cubicTo(1,2, -3.66666651f,13.333334f, 5,6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loop11(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(0,1);
+ path.cubicTo(1,3, -1.83333349f,1.33333337f, 4,-1);
+ path.close();
+ pathB.moveTo(1,3);
+ pathB.cubicTo(-1.83333349f,1.33333337f, 4,-1, 0,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp132(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(3,4, 3,0, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,3);
+ pathB.cubicTo(2,3, 6,5, 4,3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loop12(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(1,2);
+ path.cubicTo(0,6, -3.16666675f,3.66666675f, 6.33333349f,3.33333349f);
+ path.close();
+ pathB.moveTo(0,6);
+ pathB.cubicTo(-3.16666675f,3.66666675f, 6.33333349f,3.33333349f, 1,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp133(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(5,6, 5,0, 4,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,4, 6,5, 6,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp134(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(5,6, 6,0, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(1,3, 6,5, 6,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp135(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(5,6, 6,0, 4,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,6);
+ pathB.cubicTo(1,4, 6,5, 6,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp136(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(5,6, 5,0, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,3, 6,5, 6,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp136a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.quadTo(5,0, 3,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,5);
+ pathB.cubicTo(1,3, 6,5, 6,5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics137(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 5);
+ path.cubicTo(3, 6, 1, 0, 3, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 1);
+ pathB.cubicTo(2, 3, 5, 0, 6, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics138(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 5);
+ path.cubicTo(3, 6, 1, 0, 4, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 1);
+ pathB.cubicTo(2, 4, 5, 0, 6, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+// three curves intersect successfully nearby -- the angle only gets 2 of the 3 pts
+static void cubicOp139(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(0,4, 3,1, 5,1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,3);
+ pathB.cubicTo(1,5, 2,0, 4,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp140(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(1,2, 5,4, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(4,5);
+ pathB.cubicTo(2,3, 2,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp141(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,2);
+ path.cubicTo(1,2, 6,4, 3,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(4,6);
+ pathB.cubicTo(2,3, 2,0, 2,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void quadRect1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(6,15);
+ path.quadTo(16,0, 8,4);
+ path.quadTo(2,7, 12,12);
+ path.close();
+ pathB.addRect(4,11, 13,16);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void quadRect2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(5,12);
+ path.quadTo(15,7, 9,4);
+ path.quadTo(1,0, 11,15);
+ path.close();
+ pathB.addRect(4,11, 13,16);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void quadRect3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(12,12);
+ path.quadTo(2,7, 8,4);
+ path.quadTo(16,0, 6,15);
+ path.close();
+ pathB.addRect(4,11, 13,16);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void quadRect4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(11,15);
+ path.quadTo(1,0, 9,4);
+ path.quadTo(15,7, 5,12);
+ path.close();
+ pathB.addRect(4,11, 13,16);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void quadRect5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(11,13);
+ path.quadTo(4,4, 8,4);
+ path.quadTo(12,4, 5,13);
+ path.close();
+ pathB.addRect(4,11, 13,16);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void quadRect6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(5,13);
+ path.quadTo(12,4, 8,4);
+ path.quadTo(4,4, 11,13);
+ path.close();
+ pathB.addRect(4,11, 13,16);
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops4i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 3);
+ path.cubicTo(0, 2, 0, 2, -1.66666663f, 2.16666675f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(0, 2, -1.66666663f, 2.16666675f, 0, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops5i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 2);
+ path.cubicTo(0, 2, 0, 2, 0.166666672f, 2.66666675f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(0, 2, 0.166666672f, 2.66666675f, 1, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubicOp142(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(5,6);
+ path.cubicTo(2,5, 2,1, 1,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(0,1, 6,5, 5,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics6d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 5);
+ path.cubicTo(1, 5, 4, 2, 4, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 4);
+ pathB.cubicTo(0, 4, 5, 3, 5, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics7d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 6);
+ path.cubicTo(2, 4, 5, 1, 3, 1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(1, 3, 6, 2, 4, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics8d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 5);
+ path.cubicTo(2, 4, 5, 1, 3, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(2, 3, 5, 2, 4, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics9d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(2, 6, 3, 1, 5, 1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 3);
+ pathB.cubicTo(1, 5, 4, 2, 6, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics10u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(1, 6, 4, 1, 5, 1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(1, 5, 4, 2, 6, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void cubics11i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(2, 5, 3, 2, 5, 1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 3);
+ pathB.cubicTo(1, 5, 4, 2, 5, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubics12d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(0, 4, 5, 3, 5, 1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 5);
+ pathB.cubicTo(1, 5, 4, 2, 4, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics13d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 3);
+ path.cubicTo(1, 5, 4, 2, 5, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 4);
+ pathB.cubicTo(2, 5, 3, 2, 5, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics14d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 3);
+ path.cubicTo(0, 4, 3, 1, 3, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 3);
+ pathB.cubicTo(0, 3, 3, 2, 4, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics15d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(3, 5, 4, 0, 4, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 4);
+ pathB.cubicTo(2, 4, 5, 1, 5, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics16i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(2, 5, 5, 0, 4, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(2, 4, 5, 1, 5, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubics17d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(3, 4, 4, 1, 4, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(2, 4, 5, 1, 4, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics18d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(1, 3, 4, 0, 2, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 4);
+ pathB.cubicTo(0, 2, 5, 1, 3, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics19d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(2, 3, 5, 2, 4, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 5);
+ pathB.cubicTo(2, 4, 5, 1, 3, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubicOp157(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1,5);
+ path.cubicTo(1,3, 6,2, 4,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2,6);
+ pathB.cubicTo(2,4, 5,1, 3,1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics20d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 2);
+ path.cubicTo(0, 3, 6, 0, 3, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 6);
+ pathB.cubicTo(2, 3, 2, 1, 3, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loops20i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 2);
+ path.cubicTo(0, 2, 0.833333313f, 2, 1, 3.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(0.833333313f, 2, 1, 3.66666651f, 1, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops21i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 2);
+ path.cubicTo(0, 2, 0.833333313f, 2, 1, 4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(0.833333313f, 2, 1, 4, 1, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops22i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 3);
+ path.cubicTo(0, 3, 0.833333313f, 3, 1, 4.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 3);
+ pathB.cubicTo(0.833333313f, 3, 1, 4.66666651f, 1, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops23i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(0, 1, 6.16666698f, 5.66666698f, -5.66666651f, 6.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 1);
+ pathB.cubicTo(6.16666698f, 5.66666698f, -5.66666651f, 6.66666651f, 1, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops24i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 2);
+ path.cubicTo(0, 2, 0.833333313f, 2, 1, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(0.833333313f, 2, 1, 3, 1, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops25i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(0, 5, 0.833333313f, 5, 1, 7);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(0.833333313f, 5, 1, 7, 1, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops26i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 6);
+ path.cubicTo(0, 2, 6.16666698f, 6.66666698f, -5.66666651f, 7.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(6.16666698f, 6.66666698f, -5.66666651f, 7.66666651f, 1, 6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops27i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 3);
+ path.cubicTo(0, 3, 0.833333313f, 3, 1, 4.33333349f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 3);
+ pathB.cubicTo(0.833333313f, 3, 1, 4.33333349f, 1, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops28i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 3);
+ path.cubicTo(1, 3, 1.83333337f, 3, 2, 4.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 3);
+ pathB.cubicTo(1.83333337f, 3, 2, 4.66666651f, 2, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops29i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(0, 4, 1.66666663f, 4, 2, 7.33333302f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 4);
+ pathB.cubicTo(1.66666663f, 4, 2, 7.33333302f, 2, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops30i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(0, 4, 1.66666663f, 4, 2, 8);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 4);
+ pathB.cubicTo(1.66666663f, 4, 2, 8, 2, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops31i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 5);
+ path.cubicTo(1, 5, 1.83333337f, 5, 2, 6.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(1.83333337f, 5, 2, 6.66666651f, 2, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops32i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 6);
+ path.cubicTo(1, 6, 1.83333337f, 6, 2, 8);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 6);
+ pathB.cubicTo(1.83333337f, 6, 2, 8, 2, 6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops33i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 6);
+ path.cubicTo(1, 2, 7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f, 2, 6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops33iMod(skiatest::Reporter* reporter, const char* filename) {
+ SkPoint pts[] = {{2, 6}, {1, 2}, {7.16666698f, 6.66666698f}, {-4.66666651f, 7.66666651f},
+ {1, 2}, {7.16666698f, 6.66666698f}, {-4.66666651f, 7.66666651f}, {2, 6}};
+ bool up = false;
+ float offset = 0.0380172729f;
+ float step = 7.62939453e-006f;
+ bool lastResult = true;
+ // for (int i = 0; i < 30; ++i) {
+ SkString name(filename);
+ // name.appendS32(i);
+ // if (i > 0) {
+ // SkDebugf("\n\n<div id=\"%s\">\n", name.c_str());
+ // }
+ pts[5].fY = 6.66666698f + offset;
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(pts[0]);
+ path.cubicTo(pts[1], pts[2], pts[3]);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(pts[4]);
+ pathB.cubicTo(pts[5], pts[6], pts[7]);
+ pathB.close();
+ bool result = testPathOp(reporter, path, pathB, kIntersect_SkPathOp, name.c_str());
+ if (lastResult != result) {
+ up = !up;
+ }
+ step /= 2;
+ offset += up ? step : -step;
+ lastResult = result;
+ // }
+}
+
+
+static void loops33iAsQuads(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 6);
+ path.cubicTo(1, 2, 7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f, 2, 6);
+ pathB.close();
+ SkPath qPath, qPathB;
+ CubicPathToQuads(path, &qPath);
+ CubicPathToQuads(pathB, &qPathB);
+ testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops34i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(0, 4, 2.5f, 4, 3, 9);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 4);
+ pathB.cubicTo(2.5f, 4, 3, 9, 3, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops35i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(0, 4, 2.5f, 4, 3, 10);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 4);
+ pathB.cubicTo(2.5f, 4, 3, 10, 3, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops36i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(1, 4, 2.66666675f, 4, 3, 8);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(2.66666675f, 4, 3, 8, 3, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops37i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(1, 4, 1.83333337f, 4, 2, 5.33333349f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(1.83333337f, 4, 2, 5.33333349f, 2, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops38i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(2, 4, 2.83333325f, 4, 3, 6);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 4);
+ pathB.cubicTo(2.83333325f, 4, 3, 6, 3, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops39i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 5);
+ path.cubicTo(0, 5, 2.5f, 5, 3, 10);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(2.5f, 5, 3, 10, 3, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops40i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 5);
+ path.cubicTo(0, 5, 2.5f, 5, 3, 11);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(2.5f, 5, 3, 11, 3, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops40iAsQuads(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 5);
+ path.cubicTo(0, 5, 2.5f, 5, 3, 11);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(2.5f, 5, 3, 11, 3, 5);
+ pathB.close();
+ SkPath qPath, qPathB;
+ CubicPathToQuads(path, &qPath);
+ CubicPathToQuads(pathB, &qPathB);
+ testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops44i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 5);
+ path.cubicTo(0, 1, 7.33333302f, 5.33333349f, -7, 7);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 1);
+ pathB.cubicTo(7.33333302f, 5.33333349f, -7, 7, 1, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops45i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 6);
+ path.cubicTo(0, 2, 7.33333302f, 6.33333302f, -7, 8);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(7.33333302f, 6.33333302f, -7, 8, 1, 6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops46i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 6);
+ path.cubicTo(1, 2, 8.33333302f, 6.33333302f, -6, 8);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(8.33333302f, 6.33333302f, -6, 8, 2, 6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+/*
+FAILED: d:\cygwin\puregit\tests\pathopsextendedtest.cpp:346 0 */
+static void loops47i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(0, 1, 6, 5.83333302f, -4, 8);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 1);
+ pathB.cubicTo(6, 5.83333302f, -4, 8, 2, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops48i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 6);
+ path.cubicTo(0, 1, 9.33333302f, 6.83333302f, -8.33333302f, 9.16666603f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 1);
+ pathB.cubicTo(9.33333302f, 6.83333302f, -8.33333302f, 9.16666603f, 2, 6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops49i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 2);
+ path.cubicTo(1, 4, -0.166666687f, 2.66666675f, 1.66666675f, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(-0.166666687f, 2.66666675f, 1.66666675f, 2, 0, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops50i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 3);
+ path.cubicTo(1, 5, -0.166666687f, 3.66666675f, 1.66666675f, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(-0.166666687f, 3.66666675f, 1.66666675f, 3, 0, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops51i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 2);
+ path.cubicTo(2, 4, 0.833333313f, 2.66666675f, 2.66666675f, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 4);
+ pathB.cubicTo(0.833333313f, 2.66666675f, 2.66666675f, 2, 1, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops52i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 3);
+ path.cubicTo(2, 5, 0.833333313f, 3.66666675f, 2.66666675f, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 5);
+ pathB.cubicTo(0.833333313f, 3.66666675f, 2.66666675f, 3, 1, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops53i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 3);
+ path.cubicTo(3, 5, 1.83333325f, 3.66666675f, 3.66666651f, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 5);
+ pathB.cubicTo(1.83333325f, 3.66666675f, 3.66666651f, 3, 2, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops54i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 2);
+ path.cubicTo(1, 4, 0, 3, 1.66666675f, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 4);
+ pathB.cubicTo(0, 3, 1.66666675f, 2, 0, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops55i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 3);
+ path.cubicTo(1, 5, 0, 4, 1.66666675f, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(0, 4, 1.66666675f, 3, 0, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops56i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 2);
+ path.cubicTo(2, 4, 0.99999994f, 3, 2.66666675f, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 4);
+ pathB.cubicTo(0.99999994f, 3, 2.66666675f, 2, 1, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops57i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 3);
+ path.cubicTo(2, 5, 0.99999994f, 4, 2.66666675f, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 5);
+ pathB.cubicTo(0.99999994f, 4, 2.66666675f, 3, 1, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops58i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 3);
+ path.cubicTo(3, 5, 2, 4, 3.66666651f, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 5);
+ pathB.cubicTo(2, 4, 3.66666651f, 3, 2, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops58iAsQuads(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 3);
+ path.cubicTo(3, 5, 2, 4, 3.66666651f, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 5);
+ pathB.cubicTo(2, 4, 3.66666651f, 3, 2, 3);
+ pathB.close();
+ SkPath qPath, qPathB;
+ CubicPathToQuads(path, &qPath);
+ CubicPathToQuads(pathB, &qPathB);
+// SkPoint from = {2.61714339f,1.90228665f};
+// SkPoint to = {2.617045833359139f,1.9013528935803314f};
+// path_edit(from, to, &qPathB);
+ testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops59i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 6);
+ path.cubicTo(1, 2, 7.33333302f, 1.66666663f, -7.5f, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(7.33333302f, 1.66666663f, -7.5f, 2, 0, 6);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops59iasQuads(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 6);
+ path.cubicTo(1, 2, 7.33333302f, 1.66666663f, -7.5f, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(7.33333302f, 1.66666663f, -7.5f, 2, 0, 6);
+ pathB.close();
+ SkPath qPath, qPathB;
+ CubicPathToQuads(path, &qPath);
+ CubicPathToQuads(pathB, &qPathB);
+ SkPoint from = {2.61714339f,1.90228665f};
+ SkPoint to = {2.617045833359139f,1.9013528935803314f};
+ path_edit(from, to, &qPathB);
+ testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubics41d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(1, 4, 3, 0, 3, 1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 3);
+ pathB.cubicTo(1, 3, 1, 0, 4, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+void loops61i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(1, 5, -6.33333302f, 0.666666627f, 8, -1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(-6.33333302f, 0.666666627f, 8, -1, 0, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops62i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 2);
+ path.cubicTo(1, 6, -6.33333302f, 1.66666663f, 8, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 6);
+ pathB.cubicTo(-6.33333302f, 1.66666663f, 8, 0, 0, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops63i(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(2, 4, -4, -0.833333254f, 6, -3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 4);
+ pathB.cubicTo(-4, -0.833333254f, 6, -3, 0, 1);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubics44d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(2, 5, 3, 1, 6, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 3);
+ pathB.cubicTo(2, 6, 4, 3, 5, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics45u(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 3);
+ path.cubicTo(2, 6, 4, 3, 5, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(3, 4);
+ pathB.cubicTo(2, 5, 3, 1, 6, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+static void fuzz38(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(100.34f, 303.312f);
+ path.lineTo(-1e+08, 303.312f);
+ path.lineTo(102, 310.156f);
+ path.lineTo(100.34f, 310.156f);
+ path.lineTo(100.34f, 303.312f);
+ path.close();
+ testPathOpCheck(reporter, path, pathB, kUnion_SkPathOp, filename, true);
+}
+
+static void crbug_526025(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0xcf000000)); // 360, -2.14748e+09f
+path.cubicTo(SkBits2Float(0x4e0d628f), SkBits2Float(0xceffffff), SkBits2Float(0x4e800003), SkBits2Float(0xcec6b143), SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffc)); // 5.93012e+08f, -2.14748e+09f, 1.07374e+09f, -1.66675e+09f, 1.07374e+09f, -1.07374e+09f
+path.cubicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcde53aee), SkBits2Float(0x4e0d6292), SkBits2Float(0xc307820e), SkBits2Float(0x44627d00), SkBits2Float(0x437ffff2)); // 1.07374e+09f, -4.80731e+08f, 5.93012e+08f, -135.508f, 905.953f, 256
+path.lineTo(SkBits2Float(0x444bf3bc), SkBits2Float(0x4460537e)); // 815.808f, 897.305f
+path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f
+path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16
+path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512
+path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f
+path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x44800000)); // 360, 1024
+path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321
+path.lineTo(SkBits2Float(0x45d5c000), SkBits2Float(0x43870000)); // 6840, 270
+path.lineTo(SkBits2Float(0xd0a00000), SkBits2Float(0x4cbebc20)); // -2.14748e+10f, 1e+08
+path.lineTo(SkBits2Float(0x451f7000), SkBits2Float(0x42800000)); // 2551, 64
+path.lineTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321
+path.close();
+
+ SkPath path2(path);
+ testPathOp(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzzX_392(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+path.moveTo(SkBits2Float(0x41e80000), SkBits2Float(0x43bde212)); // 29, 379.766f
+path.lineTo(SkBits2Float(0x41e80000), SkBits2Float(0x43bdc7ef)); // 29, 379.562f
+path.conicTo(SkBits2Float(0x42a5861e), SkBits2Float(0x43c61f86), SkBits2Float(0x430b0610), SkBits2Float(0x43c61f86), SkBits2Float(0x3f7d23f3)); // 82.7619f, 396.246f, 139.024f, 396.246f, 0.98883f
+path.conicTo(SkBits2Float(0x42a58e20), SkBits2Float(0x43c61f86), SkBits2Float(0x41e80000), SkBits2Float(0x43bde212), SkBits2Float(0x3f7d2cf5)); // 82.7776f, 396.246f, 29, 379.766f, 0.988967f
+path.close();
+
+ SkPath path1(path);
+ path.setFillType(SkPath::kWinding_FillType);
+path.moveTo(SkBits2Float(0xc36c7bd8), SkBits2Float(0xc3a31d72)); // -236.484f, -326.23f
+path.lineTo(SkBits2Float(0xc367a4ae), SkBits2Float(0xc3a31d72)); // -231.643f, -326.23f
+path.lineTo(SkBits2Float(0x430b0610), SkBits2Float(0x43c61f86)); // 139.024f, 396.246f
+path.lineTo(SkBits2Float(0xc36c7bd8), SkBits2Float(0x43c61f86)); // -236.484f, 396.246f
+
+ SkPath path2(path);
+ testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename);
+}
+
+static void dean2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f
+path.cubicTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b), SkBits2Float(0x41531912), SkBits2Float(0x3f130322), SkBits2Float(0x4154a02b), SkBits2Float(0x3f2b74b3)); // 0.669749f, 13.2891f, 13.1936f, 0.574267f, 13.2891f, 0.669749f
+path.cubicTo(SkBits2Float(0x414a835a), SkBits2Float(0x3ec07ba6), SkBits2Float(0x413fcc0d), SkBits2Float(0x3e193319), SkBits2Float(0x4134a02b), SkBits2Float(0x00000000)); // 12.6571f, 0.375943f, 11.9873f, 0.149609f, 11.2891f, 0
+path.lineTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f
+path.close();
+ SkPath path1(path);
+
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f
+path.cubicTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b), SkBits2Float(0x41531912), SkBits2Float(0x3f130322), SkBits2Float(0x4154a02b), SkBits2Float(0x3f2b74b3)); // 0.669749f, 13.2891f, 13.1936f, 0.574267f, 13.2891f, 0.669749f
+path.lineTo(SkBits2Float(0x417ab74b), SkBits2Float(0x4154a02b)); // 15.6697f, 13.2891f
+path.lineTo(SkBits2Float(0x3f2b74b3), SkBits2Float(0x4154a02b)); // 0.669749f, 13.2891f
+path.close();
+ SkPath path2(path);
+ testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename);
+}
+
+static void cubics_d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(3, 5, 1, 0, 3, 0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 1);
+ pathB.cubicTo(0, 3, 1, 0, 5, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics_d2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(2, 5, 2, 0, 2, 1);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 2);
+ pathB.cubicTo(1, 2, 1, 0, 5, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loops_i1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 3);
+ path.cubicTo(0, 4, -0.333333343f, 4.66666651f, 3, 5.83333349f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 4);
+ pathB.cubicTo(-0.333333343f, 4.66666651f, 3, 5.83333349f, 2, 3);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops_i2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 4);
+ path.cubicTo(0, 5, -0.333333343f, 5.66666651f, 3, 6.83333302f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(-0.333333343f, 5.66666651f, 3, 6.83333302f, 2, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops_i3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(2, 5);
+ path.cubicTo(0, 6, -0.333333343f, 6.66666651f, 3, 7.83333302f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 6);
+ pathB.cubicTo(-0.333333343f, 6.66666651f, 3, 7.83333302f, 2, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops_i4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(1, 5, 0.666666627f, 5.66666651f, 4, 6.83333302f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 5);
+ pathB.cubicTo(0.666666627f, 5.66666651f, 4, 6.83333302f, 3, 4);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops_i5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 5);
+ path.cubicTo(1, 6, 0.666666627f, 6.66666651f, 4, 7.83333302f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 6);
+ pathB.cubicTo(0.666666627f, 6.66666651f, 4, 7.83333302f, 3, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void loops_i6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(4, 5);
+ path.cubicTo(2, 6, 1.66666663f, 6.66666651f, 5, 7.83333302f);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(2, 6);
+ pathB.cubicTo(1.66666663f, 6.66666651f, 5, 7.83333302f, 4, 5);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void cubics_d3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3, 4);
+ path.cubicTo(0, 6, 6, 1, 4, 2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 6);
+ pathB.cubicTo(2, 4, 4, 3, 6, 0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void cubics_o(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(1, 4);
+ path.cubicTo(2, 6, 5, 0, 5, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0, 5);
+ pathB.cubicTo(3, 5, 4, 1, 6, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename);
+}
+
+static void cubicOp158(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(2,4, 2,0, 2,0);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(0,2);
+ pathB.cubicTo(0,2, 1,0, 4,2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void loop17(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.moveTo(1, 2);
+ path.cubicTo(0, 3, -0.333333343f, 3.33333325f, 0.833333373f, 3.5f);
+ path.close();
+ pathB.moveTo(0, 3);
+ pathB.cubicTo(-0.333333343f, 3.33333325f, 0.833333373f, 3.5f, 1, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void circlesOp4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addCircle(0, 1, 5, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.addCircle(0, 1, 0, SkPath::kCW_Direction);
+ testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
+static void bug5240(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+path.moveTo(815, 82);
+path.cubicTo(814.4794311523438f, 82.7868881225586f, 814.5330810546875f,
+82.6266555786133f, 814.5291137695312f, 82.6252212524414f);
+path.cubicTo(814.5229492187500f, 82.6230010986328f, 814.3790283203125f,
+83.0008087158203f, 813.8533935546875f, 82.7072601318359f);
+path.close();
+ testPathOp(reporter, path, path, kUnion_SkPathOp, filename);
+}
+
+static void android1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path, pathB;
path.moveTo(SkBits2Float(0xc0a00000), SkBits2Float(0x00000000)); // -5, 0
path.lineTo(SkBits2Float(0x44866000), SkBits2Float(0x00000000)); // 1075, 0
path.lineTo(SkBits2Float(0x44866000), SkBits2Float(0x43720000)); // 1075, 242
@@ -5423,2950 +5423,2950 @@ pathB.lineTo(SkBits2Float(0x44870000), SkBits2Float(0x43720000)); // 1080, 242 pathB.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x43720000)); // 0, 242
pathB.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
pathB.close();
- testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); -} - - -static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; - -#define TEST(name) { name, #name } - -static struct TestDesc tests[] = { - TEST(android1), - TEST(bug5240), - TEST(circlesOp4), - TEST(loop17), - TEST(cubicOp158), - TEST(loops_i1), - TEST(loops_i2), - TEST(loops_i3), - TEST(loops_i4), - TEST(loops_i5), - TEST(loops_i6), - TEST(cubics_d3), - TEST(cubics_o), - TEST(cubics_d2), - TEST(cubics_d), - TEST(dean2), - TEST(fuzzX_392), - TEST(crbug_526025), - TEST(fuzz38), - TEST(cubics44d), - TEST(cubics45u), - TEST(loops61i), - TEST(loops62i), - TEST(loops63i), - TEST(loops58iAsQuads), - TEST(cubics41d), - TEST(loops59iasQuads), - TEST(loops59i), - TEST(loops44i), - TEST(loops45i), - TEST(loops46i), - TEST(loops47i), - TEST(loops48i), - TEST(loops49i), - TEST(loops50i), - TEST(loops51i), - TEST(loops52i), - TEST(loops53i), - TEST(loops54i), - TEST(loops55i), - TEST(loops56i), - TEST(loops57i), - TEST(loops58i), - TEST(loops33iMod), - TEST(loops33iAsQuads), - TEST(loops33i), - TEST(loops40i), - TEST(loops40iAsQuads), - TEST(loops39i), - TEST(loops38i), - TEST(loops37i), - TEST(loops36i), - TEST(loops35i), - TEST(loops34i), - TEST(loops32i), - TEST(loops31i), - TEST(loops30i), - TEST(loops29i), - TEST(loops28i), - TEST(loops27i), - TEST(loops26i), - TEST(loops25i), - TEST(loops24i), - TEST(loops23i), - TEST(loops22i), - TEST(loops21i), - TEST(loops20i), - TEST(cubics20d), - TEST(cubics6d), - TEST(cubics7d), - TEST(cubics8d), - TEST(cubics9d), - TEST(cubics10u), - TEST(cubics11i), - TEST(cubics12d), - TEST(cubics13d), - TEST(cubics14d), - TEST(cubics15d), - TEST(cubics16i), - TEST(cubics17d), - TEST(cubics18d), - TEST(cubics19d), - TEST(cubicOp157), - TEST(cubicOp142), - TEST(loops4i), - TEST(quadRect1), - TEST(quadRect2), - TEST(quadRect3), - TEST(quadRect4), - TEST(quadRect5), - TEST(quadRect6), - TEST(cubicOp141), - TEST(cubicOp58d), - TEST(loops5i), - TEST(cubicOp140), - TEST(cubicOp139), - TEST(cubics138), - TEST(cubics137), - TEST(cubicOp136a), - TEST(cubicOp136), - TEST(cubicOp135), - TEST(cubicOp134), - TEST(cubicOp133), - TEST(loop12), - TEST(cubicOp132), - TEST(loop11), - TEST(loop10), - TEST(circlesOp3), - TEST(loop9), - TEST(loop8), - TEST(rects5), - TEST(loop7), - TEST(cubicOp130a), - TEST(rRect1x), - TEST(circlesOp2), - TEST(circlesOp1), - TEST(cubicOp131), - TEST(cubicOp130), - TEST(cubicOp129), - TEST(cubicOp128), - TEST(cubicOp127), - TEST(cubicOp126), - TEST(cubicOp125), - TEST(cubicOp124), - TEST(loop6), - TEST(loop5), - TEST(cubicOp123), - TEST(cubicOp122), - TEST(cubicOp121), - TEST(cubicOp120), - TEST(cubicOp119), - TEST(loop4), - TEST(loop3), - TEST(loop2), - TEST(loop1asQuad), - TEST(loop1), - TEST(issue3517), - TEST(cubicOp118), - TEST(cubicOp117), - TEST(cubicOp116), - TEST(testRect2), - TEST(testRect1), - TEST(cubicOp115), - TEST(issue2753), - TEST(cubicOp114), - TEST(issue2808), - TEST(cubicOp114asQuad), - TEST(rects4), - TEST(rects3), - TEST(rects2), - TEST(rects1), - TEST(issue2540), - TEST(issue2504), - TEST(kari1), - TEST(quadOp10i), - TEST(cubicOp113), - TEST(skpcarrot_is24), - TEST(issue1417), - TEST(cubicOp112), - TEST(skpadspert_net23), - TEST(skpadspert_de11), - TEST(findFirst1), - TEST(xOp2i), - TEST(xOp3i), - TEST(xOp1u), - TEST(xOp1i), - TEST(cubicOp111), - TEST(cubicOp110), - TEST(cubicOp109), - TEST(cubicOp108), - TEST(cubicOp107), - TEST(cubicOp106), - TEST(cubicOp105), - TEST(cubicOp104), - TEST(cubicOp103), - TEST(cubicOp102), - TEST(cubicOp101), - TEST(cubicOp100), - TEST(cubicOp99), - TEST(issue1435), - TEST(cubicOp98x), - TEST(cubicOp97x), - TEST(skpcarpetplanet_ru22), - TEST(cubicOp96d), - TEST(cubicOp95u), - TEST(skpadbox_lt15), - TEST(skpagentxsites_com55), - TEST(skpadventistmission_org572), - TEST(skpadoption_org196), - TEST(skpbambootheme_com12), - TEST(skpbakosoft_com10), - TEST(skpakmmos_ru100), - TEST(skpbangalorenest_com4), - TEST(skpbingoentertainment_net189), - TEST(skpbestred_ru37), - TEST(skpbenzoteh_ru152), - TEST(skpcamcorder_kz21), - TEST(skpcaffelavazzait_com_ua21), - TEST(skpcarrefour_ro62), - TEST(skpcavablar_net563), - TEST(skpinsomnia_gr72), - TEST(skpadbox_lt8), - TEST(skpact_com43), - TEST(skpacesoftech_com47), - TEST(skpabcspark_ca103), - TEST(cubicOp94u), - TEST(cubicOp93d), - TEST(cubicOp92i), - TEST(skpadithya_putr4_blogspot_com551), - TEST(skpadindex_de4), - TEST(skpaiaigames_com870), - TEST(skpaaalgarve_org53), - TEST(skpkkiste_to716), - TEST(cubicOp91u), - TEST(cubicOp90u), - TEST(cubicOp89u), - TEST(cubicOp88u), - TEST(cubicOp87u), - TEST(cubicOp86i), - TEST(loopEdge2), - TEST(loopEdge1), - TEST(rectOp3x), - TEST(rectOp2i), - TEST(rectOp1i), - TEST(issue1418b), - TEST(cubicOp85i), - TEST(issue1418), - TEST(skpkkiste_to98), - TEST(skpahrefs_com29), - TEST(cubicOp85d), - TEST(skpahrefs_com88), - TEST(skphealth_com76), - TEST(skpancestry_com1), - TEST(skpbyte_com1), - TEST(skpeldorado_com_ua1), - TEST(skp96prezzi1), - TEST(skpClip2), - TEST(skpClip1), - TEST(cubicOp84d), - TEST(cubicOp83i), - TEST(cubicOp82i), - TEST(cubicOp81d), - TEST(cubicOp80i), - TEST(cubicOp79u), - TEST(cubicOp78u), - TEST(cubicOp77i), - TEST(cubicOp76u), - TEST(cubicOp75d), - TEST(cubicOp74d), - TEST(cubicOp73d), - TEST(cubicOp72i), - TEST(cubicOp71d), - TEST(skp5), - TEST(skp4), - TEST(skp3), - TEST(skp2), - TEST(skp1), - TEST(rRect1), - TEST(cubicOp70d), - TEST(cubicOp69d), - TEST(cubicOp68u), - TEST(cubicOp67u), - TEST(cubicOp66u), - TEST(rectOp1d), - TEST(cubicOp65d), - TEST(cubicOp64d), - TEST(cubicOp63d), - TEST(cubicOp62d), - TEST(cubicOp61d), - TEST(cubicOp60d), - TEST(cubicOp59d), - TEST(cubicOp57d), - TEST(cubicOp56d), - TEST(cubicOp55d), - TEST(cubicOp54d), - TEST(cubicOp53d), - TEST(cubicOp52d), - TEST(cubicOp51d), - TEST(cubicOp50d), - TEST(cubicOp49d), - TEST(cubicOp48d), - TEST(cubicOp47d), - TEST(cubicOp46d), - TEST(cubicOp45d), - TEST(cubicOp44d), - TEST(cubicOp43d), - TEST(cubicOp42d), - TEST(cubicOp41i), - TEST(cubicOp40d), - TEST(cubicOp39d), - TEST(cubicOp38d), - TEST(cubicOp37d), - TEST(cubicOp36u), - TEST(cubicOp35d), - TEST(cubicOp34d), - TEST(cubicOp33i), - TEST(cubicOp32d), - TEST(cubicOp31d), - TEST(cubicOp31x), - TEST(cubicOp31u), - TEST(cubicOp30d), - TEST(cubicOp29d), - TEST(cubicOp28u), - TEST(cubicOp27d), - TEST(cubicOp26d), - TEST(cubicOp25i), - TEST(testOp8d), - TEST(testDiff1), - TEST(testIntersect1), - TEST(testUnion1), - TEST(testXor1), - TEST(testDiff2), - TEST(testIntersect2), - TEST(testUnion2), - TEST(testXor2), - TEST(testOp1d), - TEST(testOp2d), - TEST(testOp3d), - TEST(testOp1u), - TEST(testOp4d), - TEST(testOp5d), - TEST(testOp6d), - TEST(testOp7d), - TEST(testOp2u), - - TEST(cubicOp24d), - TEST(cubicOp23d), - TEST(cubicOp22d), - TEST(cubicOp21d), - TEST(cubicOp20d), - TEST(cubicOp19i), - TEST(cubicOp18d), - TEST(cubicOp17d), - TEST(cubicOp16d), - TEST(cubicOp15d), - TEST(cubicOp14d), - TEST(cubicOp13d), - TEST(cubicOp12d), - TEST(cubicOp11d), - TEST(cubicOp10d), - TEST(cubicOp1i), - TEST(cubicOp9d), - TEST(quadOp9d), - TEST(lineOp9d), - TEST(cubicOp8d), - TEST(cubicOp7d), - TEST(cubicOp6d), - TEST(cubicOp5d), - TEST(cubicOp3d), - TEST(cubicOp2d), - TEST(cubicOp1d), -}; - -static const size_t testCount = SK_ARRAY_COUNT(tests); - -static struct TestDesc subTests[] = { - TEST(loops47i), - TEST(loops61i), - TEST(loops62i), - TEST(issue3517), -}; - -static const size_t subTestCount = SK_ARRAY_COUNT(subTests); - -static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0; - -static bool runSubTests = false; -static bool runSubTestsFirst = true; -static bool runReverse = false; - -DEF_TEST(PathOpsOp, reporter) { -#if DEBUG_SHOW_TEST_NAME - strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); -#endif - if (runSubTests && runSubTestsFirst) { - RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse); - } - RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runReverse); - if (runSubTests && !runSubTestsFirst) { - RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse); - } -} - -static void fuzz535151(skiatest::Reporter* reporter, const char* filename) { - SkPath one; - one.setFillType(SkPath::kWinding_FillType); - SkPath two; - two.setFillType(SkPath::kWinding_FillType); - two.moveTo(0, 0); - two.lineTo(0, 50); - two.lineTo(4.29497e+09f, 50); - SkPath dummy; - testPathOpFuzz(reporter, one, two, kIntersect_SkPathOp, filename); -} - -static void bufferOverflow(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0,0, 300,170141183460469231731687303715884105728.f); - SkPath pathB; - pathB.addRect(0,0, 300,16); - testPathOpFuzz(reporter, path, pathB, kUnion_SkPathOp, filename); -} - -// m 100,0 60,170 -160,-110 200,0 -170,11000000000 z -static void fuzz433(skiatest::Reporter* reporter, const char* filename) { - SkPath path1, path2; - path1.moveTo(100,0); - path1.lineTo(60,170); - path1.lineTo(-160,-110); - path1.lineTo(200,0); - path1.lineTo(-170,11000000000.0f); - path1.close(); - - path2.moveTo(100 + 20,0 + 20); - path2.lineTo(60 + 20,170 + 20); - path2.lineTo(-160 + 20,-110 + 20); - path2.lineTo(200 + 20,0 + 20); - path2.lineTo(-170 + 20,11000000000.0f + 20); - path2.close(); - - testPathOpFuzz(reporter, path1, path2, kIntersect_SkPathOp, filename); -} - -static void fuzz433b(skiatest::Reporter* reporter, const char* filename) { - SkPath path1, path2; - path1.setFillType(SkPath::kEvenOdd_FillType); - path1.moveTo(140, 40); - path1.lineTo(200, 210); - path1.lineTo(40, 100); - path1.lineTo(240, 100); - path1.lineTo(70, 1.1e+10f); - path1.lineTo(140, 40); - path1.close(); - - path1.setFillType(SkPath::kWinding_FillType); - path2.moveTo(190, 60); - path2.lineTo(250, 230); - path2.lineTo(90, 120); - path2.lineTo(290, 120); - path2.lineTo(120, 1.1e+10f); - path2.lineTo(190, 60); - path2.close(); - - testPathOpFuzz(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void fuzz487a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42633333)); -path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc)); -path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41a3ffff)); -path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a)); -path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a)); -path.cubicTo(SkBits2Float(0x429c6668), SkBits2Float(0x425d999a), SkBits2Float(0x4279999c), SkBits2Float(0x42886667), SkBits2Float(0x42673335), SkBits2Float(0x42ab0000)); -path.lineTo(SkBits2Float(0x41c0ccd0), SkBits2Float(0x42990000)); -path.cubicTo(SkBits2Float(0x41b33336), SkBits2Float(0x42a5999a), SkBits2Float(0x41ac0003), SkBits2Float(0x42b2cccd), SkBits2Float(0x41ac0003), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4261999c), SkBits2Float(0x434d3333), SkBits2Float(0x4364e667), SkBits2Float(0x4346b333), SkBits2Float(0x4364e667), SkBits2Float(0x43400000)); -path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x42a20000), SkBits2Float(0x43016667), SkBits2Float(0x4287cccd), SkBits2Float(0x42ea999a), SkBits2Float(0x4273999a)); -path.lineTo(SkBits2Float(0x4306cccd), SkBits2Float(0x41f5999a)); -path.cubicTo(SkBits2Float(0x42f76667), SkBits2Float(0x41c26667), SkBits2Float(0x42dd999a), SkBits2Float(0x41a4cccd), SkBits2Float(0x42c23334), SkBits2Float(0x41a4cccd)); -path.lineTo(SkBits2Float(0x42c23334), SkBits2Float(0x425e0000)); -path.cubicTo(SkBits2Float(0x42a43334), SkBits2Float(0x425e0000), SkBits2Float(0x428a0001), SkBits2Float(0x427ecccd), SkBits2Float(0x42780002), SkBits2Float(0x4297999a)); -path.lineTo(SkBits2Float(0x41fccccd), SkBits2Float(0x42693333)); -path.cubicTo(SkBits2Float(0x41c9999a), SkBits2Float(0x428acccd), SkBits2Float(0x41ac0000), SkBits2Float(0x42a4999a), SkBits2Float(0x41ac0000), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4261999a), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4261999a), SkBits2Float(0x42de0000), SkBits2Float(0x42813333), SkBits2Float(0x42f83333), SkBits2Float(0x42996666), SkBits2Float(0x4303199a)); -path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x431cb334)); -path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd)); -path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd)); -path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd)); -path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334)); -path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43080000)); -path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz487b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42633333)); -path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc)); -path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41a3ffff)); -path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a)); -path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a)); -path.cubicTo(SkBits2Float(0x429c6668), SkBits2Float(0x425d999a), SkBits2Float(0x4279999c), SkBits2Float(0x42886667), SkBits2Float(0x42673335), SkBits2Float(0x42ab0000)); -path.lineTo(SkBits2Float(0x41c0ccd0), SkBits2Float(0x42990000)); -path.cubicTo(SkBits2Float(0x41b33336), SkBits2Float(0x42a5999a), SkBits2Float(0x41ac0003), SkBits2Float(0x42b2cccd), SkBits2Float(0x41ac0003), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4261999c), SkBits2Float(0x434d3333), SkBits2Float(0x4364e667), SkBits2Float(0x4346b333), SkBits2Float(0x4364e667), SkBits2Float(0x43400000)); -path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x42a20000), SkBits2Float(0x43016667), SkBits2Float(0x4287cccd), SkBits2Float(0x42ea999a), SkBits2Float(0x4273999a)); -path.lineTo(SkBits2Float(0x4306cccd), SkBits2Float(0x41f5999a)); -path.cubicTo(SkBits2Float(0x42f76667), SkBits2Float(0x41c26667), SkBits2Float(0x42dd999a), SkBits2Float(0x41a4cccd), SkBits2Float(0x42c23334), SkBits2Float(0x41a4cccd)); -path.lineTo(SkBits2Float(0x42c23334), SkBits2Float(0x425e0000)); -path.cubicTo(SkBits2Float(0x42a43334), SkBits2Float(0x425e0000), SkBits2Float(0x428a0001), SkBits2Float(0x427ecccd), SkBits2Float(0x42780002), SkBits2Float(0x4297999a)); -path.lineTo(SkBits2Float(0x41fccccd), SkBits2Float(0x42693333)); -path.cubicTo(SkBits2Float(0x41c9999a), SkBits2Float(0x428acccd), SkBits2Float(0x41ac0000), SkBits2Float(0x42a4999a), SkBits2Float(0x41ac0000), SkBits2Float(0x42c00000)); -path.lineTo(SkBits2Float(0x4261999a), SkBits2Float(0x42c00000)); -path.cubicTo(SkBits2Float(0x4261999a), SkBits2Float(0x42de0000), SkBits2Float(0x42813333), SkBits2Float(0x42f83333), SkBits2Float(0x42996666), SkBits2Float(0x4303199a)); -path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x431cb334)); -path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd)); -path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd)); -path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd)); -path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334)); -path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43080000)); -path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz714(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x430c0000), SkBits2Float(0x42200000)); -path.lineTo(SkBits2Float(0x43480000), SkBits2Float(0x43520000)); -path.lineTo(SkBits2Float(0x42200000), SkBits2Float(0x42c80000)); -path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x42c80000)); // 2.22222e+022f -path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x43520000)); // 2.22222e+022f -path.lineTo(SkBits2Float(0x430c0000), SkBits2Float(0x42200000)); -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x43200000), SkBits2Float(0x42700000)); -path.lineTo(SkBits2Float(0x435c0000), SkBits2Float(0x43660000)); -path.lineTo(SkBits2Float(0x42700000), SkBits2Float(0x42f00000)); -path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x42f00000)); // 2.22222e+022f -path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x43660000)); // 2.22222e+022f -path.lineTo(SkBits2Float(0x43200000), SkBits2Float(0x42700000)); -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x7f800000), SkBits2Float(0x7f800000)); -path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000)); -path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000)); -path.quadTo(SkBits2Float(0xffc00000), SkBits2Float(0x7f800000), SkBits2Float(0xffc00000), SkBits2Float(0x7f800000)); -path.quadTo(SkBits2Float(0xff000001), SkBits2Float(0x7f800000), SkBits2Float(0xff000001), SkBits2Float(0x7f800000)); -path.quadTo(SkBits2Float(0xff000001), SkBits2Float(0xffc00000), SkBits2Float(0xffc00000), SkBits2Float(0xffc00000)); -path.quadTo(SkBits2Float(0xffc00000), SkBits2Float(0xff000001), SkBits2Float(0x7f800000), SkBits2Float(0xff000001)); -path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0xff000001), SkBits2Float(0x7f800000), SkBits2Float(0xffc00000)); -path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0xffc00000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000)); -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - - -static void fuzz753_91(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x42910000), SkBits2Float(0x00000000)); // 72.5f, 0 -path.lineTo(SkBits2Float(0x42166668), SkBits2Float(0x00000000)); // 37.6f, 0 -path.cubicTo(SkBits2Float(0x42166668), SkBits2Float(0xc1966668), SkBits2Float(0x41c66668), SkBits2Float(0xc20a6666), SkBits2Float(0x40f00010), SkBits2Float(0xc21ccccd)); // 37.6f, -18.8f, 24.8f, -34.6f, 7.50001f, -39.2f -path.lineTo(SkBits2Float(0x41840004), SkBits2Float(0xc291cccd)); // 16.5f, -72.9f -path.lineTo(SkBits2Float(0x42fb6668), SkBits2Float(0x42c73334)); // 125.7f, 99.6f -path.lineTo(SkBits2Float(0x43646668), SkBits2Float(0x43880ccd)); // 228.4f, 272.1f - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x428bf702), SkBits2Float(0xcf223cbf)); // 69.9824f, -2.72189e+09f -path.lineTo(SkBits2Float(0x42112d68), SkBits2Float(0xcf223cbf)); // 36.2943f, -2.72189e+09f -path.cubicTo(SkBits2Float(0x4220d9fc), SkBits2Float(0xcf223cc0), SkBits2Float(0x420ee118), SkBits2Float(0xcf223cc0), SkBits2Float(0x41cef2f8), SkBits2Float(0xcf223cc0)); // 40.2129f, -2.72189e+09f, 35.7198f, -2.72189e+09f, 25.8686f, -2.72189e+09f -path.lineTo(SkBits2Float(0x424a99e0), SkBits2Float(0xcf223cc0)); // 50.6503f, -2.72189e+09f -path.cubicTo(SkBits2Float(0x42266e32), SkBits2Float(0xcf223cc0), SkBits2Float(0x41f0fa20), SkBits2Float(0xcf223cc0), SkBits2Float(0x41872ed4), SkBits2Float(0xcf223cc0)); // 41.6076f, -2.72189e+09f, 30.1221f, -2.72189e+09f, 16.8979f, -2.72189e+09f -path.lineTo(SkBits2Float(0x40f8fbe0), SkBits2Float(0xcf223cc0)); // 7.78075f, -2.72189e+09f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void bug597926_0(skiatest::Reporter* reporter, const char* filename) { -SkPath path; -path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x43b38000), SkBits2Float(0x433e0000)); // 359, 190 -path.lineTo(SkBits2Float(0x40c00000), SkBits2Float(0x449ce000)); // 6, 1255 -path.cubicTo(SkBits2Float(0x438c0000), SkBits2Float(0x4497a000), SkBits2Float(0x43e40000), SkBits2Float(0x44750000), SkBits2Float(0x41000000), SkBits2Float(0x44aa2000)); // 280, 1213, 456, 980, 8, 1361 -path.moveTo(SkBits2Float(0x43290000), SkBits2Float(0x4431c000)); // 169, 711 -path.lineTo(SkBits2Float(0xd987d6ba), SkBits2Float(0xd93d0ad4)); // -4.7794e+15f, -3.32567e+15f -path.conicTo(SkBits2Float(0x43cc8000), SkBits2Float(0x445b8000), SkBits2Float(0xd888b096), SkBits2Float(0xd9a1ebfa), SkBits2Float(0x3ebcb199)); // 409, 878, -1.20234e+15f, -5.69712e+15f, 0.368542f -path.cubicTo(SkBits2Float(0x43c00000), SkBits2Float(0x443a8000), SkBits2Float(0x42380000), SkBits2Float(0x4421c000), SkBits2Float(0x42500000), SkBits2Float(0x448ca000)); // 384, 746, 46, 647, 52, 1125 -path.quadTo(SkBits2Float(0x43948000), SkBits2Float(0x42ac0000), SkBits2Float(0x43880000), SkBits2Float(0x4487e000)); // 297, 86, 272, 1087 -SkPath path1(path); -path.reset(); -path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0xc51d735c), SkBits2Float(0xc49db029)); // -2519.21f, -1261.51f -path.cubicTo(SkBits2Float(0xc51d1dbd), SkBits2Float(0xc49d7a3f), SkBits2Float(0xc51c524a), SkBits2Float(0xc49d1610), SkBits2Float(0xc51d1a96), SkBits2Float(0xc49d86a6)); // -2513.86f, -1259.82f, -2501.14f, -1256.69f, -2513.66f, -1260.21f -path.cubicTo(SkBits2Float(0xc51cd471), SkBits2Float(0xc49d54d0), SkBits2Float(0xc51c2e51), SkBits2Float(0xc49d0081), SkBits2Float(0xc51d197b), SkBits2Float(0xc49d7927)); // -2509.28f, -1258.65f, -2498.89f, -1256.02f, -2513.59f, -1259.79f -path.quadTo(SkBits2Float(0xc51bf7eb), SkBits2Float(0xc49cf010), SkBits2Float(0xc51ba866), SkBits2Float(0xc49cb9e6)); // -2495.49f, -1255.5f, -2490.52f, -1253.81f -path.cubicTo(SkBits2Float(0xc51bac0d), SkBits2Float(0xc49cc50e), SkBits2Float(0xc51c29eb), SkBits2Float(0xc49cfb01), SkBits2Float(0xc51c5bca), SkBits2Float(0xc49d1fa6)); // -2490.75f, -1254.16f, -2498.62f, -1255.84f, -2501.74f, -1256.99f -SkPath path2(path); -testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename); -} - -static void fuzz1450_0(skiatest::Reporter* reporter, const char* filename) { -SkPath path; -path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0xcf000000)); // 360, -2.14748e+09f -path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcf000000), SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffe), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, -2.14748e+09f, 1.07374e+09f, -1.07374e+09f, 0.707107f -path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0x43800001), SkBits2Float(0x43348000), SkBits2Float(0x43800001), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, 256, 180.5f, 256, 0.707107f -SkPath path1(path); -path.reset(); -path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140 -path.conicTo(SkBits2Float(0x43b40005), SkBits2Float(0x458a945d), SkBits2Float(0x45610000), SkBits2Float(0x458a945d), SkBits2Float(0x3f3504f3)); // 360, 4434.55f, 3600, 4434.55f, 0.707107f -path.conicTo(SkBits2Float(0x45d5bfff), SkBits2Float(0x458a945d), SkBits2Float(0x45d5bfff), SkBits2Float(0x45816000), SkBits2Float(0x3f3504f3)); // 6840, 4434.55f, 6840, 4140, 0.707107f -path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512 -path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16 -path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x44800000)); // 360, 1024 -path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140 -path.close(); -SkPath path2(path); -testPathOpFuzz(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void fuzz1450_1(skiatest::Reporter* reporter, const char* filename) { -SkPath path; -path.setFillType(SkPath::kEvenOdd_FillType); -path.moveTo(SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffe)); // 1.07374e+09f, -1.07374e+09f -path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcf000000), SkBits2Float(0x43b40000), SkBits2Float(0xcf000000), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, -2.14748e+09f, 360, -2.14748e+09f, 0.707107f -path.lineTo(SkBits2Float(0x43348000), SkBits2Float(0x43800001)); // 180.5f, 256 -path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16 -path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512 -path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f -path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x44800000)); // 360, 1024 -path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140 -path.conicTo(SkBits2Float(0x43b40005), SkBits2Float(0x458a945d), SkBits2Float(0x45610000), SkBits2Float(0x458a945d), SkBits2Float(0x3f3504f3)); // 360, 4434.55f, 3600, 4434.55f, 0.707107f -path.conicTo(SkBits2Float(0x45d5bfff), SkBits2Float(0x458a945d), SkBits2Float(0x45d5bfff), SkBits2Float(0x45816000), SkBits2Float(0x3f3504f3)); // 6840, 4434.55f, 6840, 4140, 0.707107f -path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f -path.lineTo(SkBits2Float(0x43348000), SkBits2Float(0x43800001)); // 180.5f, 256 -path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0x43800001), SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffe), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, 256, 1.07374e+09f, -1.07374e+09f, 0.707107f -path.close(); -SkPath path1(path); -path.reset(); -path.moveTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321 -path.lineTo(SkBits2Float(0x45d5c000), SkBits2Float(0x43870000)); // 6840, 270 -path.lineTo(SkBits2Float(0xd0a00000), SkBits2Float(0x4cbebc20)); // -2.14748e+10f, 1e+08 -path.lineTo(SkBits2Float(0x451f7000), SkBits2Float(0x42800000)); // 2551, 64 -path.lineTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321 -path.close(); -SkPath path2(path); -testPathOpFuzz(reporter, path1, path2, kUnion_SkPathOp, filename); -} - -static void fuzz763_9(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321), SkBits2Float(0xed7a6a4b), SkBits2Float(0x1f212a8c)); // 2.49282e-13f, 4.78968e-34f, 1.99397e+36f, -4.84373e+27f, 3.41283e-20f -path.lineTo(SkBits2Float(0x7bc00321), SkBits2Float(0xed7a6a4b)); // 1.99397e+36f, -4.84373e+27f -path.lineTo(SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28)); // 9.4495e-15f, 0.000617492f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3), SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6)); // -8.10388e-33f, 0.00148185f, 2.25206e-21f, 5.54035e+21f -path.moveTo(SkBits2Float(0x29272a81), SkBits2Float(0x2ab03a55)); // 3.71183e-14f, 3.13044e-13f -path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3a214729), SkBits2Float(0xdf28282a), SkBits2Float(0x8a2f2121)); // 2.22225e-15f, 0.000615227f, -1.2117e+19f, -8.43217e-33f -path.quadTo(SkBits2Float(0x373b3a27), SkBits2Float(0x201fc4c1), SkBits2Float(0x27576c2a), SkBits2Float(0x5921c25d)); // 1.11596e-05f, 1.35329e-19f, 2.98959e-15f, 2.8457e+15f -path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3a214729), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21)); // 2.22225e-15f, 0.000615227f, -1.2117e+19f, 0.00105459f -path.cubicTo(SkBits2Float(0x373b3ac5), SkBits2Float(0x201fc422), SkBits2Float(0x523a702a), SkBits2Float(0x27576c51), SkBits2Float(0x5921c25d), SkBits2Float(0x51523a70)); // 1.11598e-05f, 1.35327e-19f, 2.00186e+11f, 2.9896e-15f, 2.8457e+15f, 5.64327e+10f -path.quadTo(SkBits2Float(0xd912102a), SkBits2Float(0x284f9a28), SkBits2Float(0xb38a1f30), SkBits2Float(0x3a3ac23a)); // -2.56957e+15f, 1.15242e-14f, -6.4318e-08f, 0.000712428f -path.lineTo(SkBits2Float(0xc809272a), SkBits2Float(0x29b02829)); // -140445, 7.82294e-14f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename); -} - - -static void fuzz763_4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x555b3a2d), SkBits2Float(0x2a212a8c)); // 1.50652e+13f, 1.43144e-13f -path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f -path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac2b33a)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148544f -path.cubicTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6), SkBits2Float(0x295b2d2a), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c275b)); // 2.25206e-21f, 5.54035e+21f, 4.86669e-14f, 3.19905e+24f, 9.6297e-12f, 2.48963e-13f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f -path.lineTo(SkBits2Float(0x2a212a8c), SkBits2Float(0x2a21081f)); // 1.43144e-13f, 1.43025e-13f -path.conicTo(SkBits2Float(0xde6a4b7b), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a6a)); // -4.22068e+18f, 2.50338e-13f, 4.61198e-19f, 0.00096035f, 121589 -path.lineTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f -path.close(); -path.moveTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f -path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f -path.lineTo(SkBits2Float(0x2928088c), SkBits2Float(0x2be61d2a)); // 3.73109e-14f, 1.63506e-12f -path.conicTo(SkBits2Float(0x2a812a63), SkBits2Float(0x2d292a27), SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x552d6829)); // 2.29444e-13f, 9.6159e-12f, 1.5954e+13f, 4.87407e+16f, 1.19164e+13f -path.conicTo(SkBits2Float(0x395b2d5b), SkBits2Float(0x68552768), SkBits2Float(0x555b2df0), SkBits2Float(0x1f722a8c), SkBits2Float(0x082a212a)); // 0.000209024f, 4.02636e+24f, 1.50619e+13f, 5.12807e-20f, 5.11965e-34f -path.lineTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f -path.close(); -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2147ed7a), SkBits2Float(0x28282a3a), SkBits2Float(0x21df212a), SkBits2Float(0x033a8a3a)); // 6.14991e+25f, 6.77381e-19f, 9.33503e-15f, 1.51198e-18f, 5.48192e-37f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename); -} - -static void fuzz763_3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c)); // 1.50606e+13f, 1.43144e-13f -path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x295b2d1f), SkBits2Float(0x29685568)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.86669e-14f, 5.15884e-14f -path.conicTo(SkBits2Float(0x8c28295b), SkBits2Float(0x1f21212a), SkBits2Float(0xc0032a08), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced)); // -1.29547e-31f, 3.41205e-20f, -2.04944f, 3.04132e+35f, 5.77848e-19f -path.moveTo(SkBits2Float(0x25682929), SkBits2Float(0x212a8c5b)); // 2.01367e-16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4a7bc0)); // 4.7323e-37f, 6.11969e+25f -path.conicTo(SkBits2Float(0x032108ed), SkBits2Float(0x283a7bc0), SkBits2Float(0x47ed7a6a), SkBits2Float(0x282a3a21), SkBits2Float(0x3a21ff28)); // 4.73239e-37f, 1.03519e-14f, 121589, 9.4495e-15f, 0.000617968f -path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3), SkBits2Float(0x2a292827), SkBits2Float(0x962be61d)); // -8.10388e-33f, 0.00148185f, 1.50241e-13f, -1.38859e-25f -path.lineTo(SkBits2Float(0x295b2d2a), SkBits2Float(0x2d296868)); // 4.86669e-14f, 9.62972e-12f -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x898ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a6a)); // 6.14991e+25f, -3.39271e-33f, 4.61198e-19f, 0.00096035f, 121589 -path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.close(); -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0xb38a281a), SkBits2Float(0x29283ac2)); // -1.2117e+19f, 0.00105459f, -6.43342e-08f, 3.73545e-14f -path.moveTo(SkBits2Float(0x962be61d), SkBits2Float(0x432a2927)); // -1.38859e-25f, 170.161f -path.conicTo(SkBits2Float(0x3a2a552a), SkBits2Float(0x3b1e2ab0), SkBits2Float(0x29272021), SkBits2Float(0x3b3ac527), SkBits2Float(0x1fc42236)); // 0.000649768f, 0.00241343f, 3.71093e-14f, 0.00284989f, 8.30658e-20f -path.cubicTo(SkBits2Float(0x27576c2a), SkBits2Float(0x5921c25d), SkBits2Float(0x51503a70), SkBits2Float(0x12102a10), SkBits2Float(0x633a28d9), SkBits2Float(0x29c80927)); // 2.98959e-15f, 2.8457e+15f, 5.58959e+10f, 4.54902e-28f, 3.43404e+21f, 8.88337e-14f -path.lineTo(SkBits2Float(0x272927b0), SkBits2Float(0x5b392929)); // 2.3475e-15f, 5.21181e+16f -path.moveTo(SkBits2Float(0x3a1127b4), SkBits2Float(0x2921ee3b)); // 0.000553723f, 3.59558e-14f -path.cubicTo(SkBits2Float(0x5e215d3b), SkBits2Float(0x7828ee3a), SkBits2Float(0x8e28b03b), SkBits2Float(0x50783be8), SkBits2Float(0x9e0b8a3a), SkBits2Float(0x555b2d68)); // 2.90688e+18f, 1.37053e+34f, -2.07925e-30f, 1.66587e+10f, -7.38718e-21f, 1.50618e+13f -path.moveTo(SkBits2Float(0x21081f3f), SkBits2Float(0x9fd4e62a)); // 4.61199e-19f, -9.01663e-20f -path.cubicTo(SkBits2Float(0x3a293a2a), SkBits2Float(0x0e3bf0c5), SkBits2Float(0x3b29d42a), SkBits2Float(0x0f217265), SkBits2Float(0x2d5d2921), SkBits2Float(0x5568295b)); // 0.000645551f, 2.31655e-30f, 0.00259138f, 7.95994e-30f, 1.25715e-11f, 1.5954e+13f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename); -} - -static void fuzz763_5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f -path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b79), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f -path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f -path.cubicTo(SkBits2Float(0xe62a2928), SkBits2Float(0x2a63962b), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x001f2a21)); // -2.0089e+23f, 2.02138e-13f, 3.19905e+24f, 9.6297e-12f, 2.49282e-13f, 2.86201e-39f -path.lineTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f -path.close(); -path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a6a)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, 0.00096035f, 121589 -path.lineTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f -path.close(); -path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f -path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3b21), SkBits2Float(0x28ee4f9a), SkBits2Float(0x68293b78)); // -1.2117e+19f, 0.00105462f, 2.64578e-14f, 3.19671e+24f -path.lineTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x5b2d8c55)); // 4.87407e+16f, 4.88495e+16f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c)); // 1.50606e+13f, 1.43144e-13f -path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f -path.lineTo(SkBits2Float(0x081f2ad7), SkBits2Float(0x7bc00321)); // 4.78977e-34f, 1.99397e+36f -path.moveTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f -path.quadTo(SkBits2Float(0x4f1a3a8a), SkBits2Float(0x3ab38a28), SkBits2Float(0x29283ac2), SkBits2Float(0x962be62a)); // 2.58753e+09f, 0.00136978f, 3.73545e-14f, -1.38859e-25f -path.cubicTo(SkBits2Float(0x272a812a), SkBits2Float(0x3a2a5529), SkBits2Float(0x3b1e2ab0), SkBits2Float(0x29272021), SkBits2Float(0x3b3ac527), SkBits2Float(0x1fc42237)); // 2.36623e-15f, 0.000649768f, 0.00241343f, 3.71093e-14f, 0.00284989f, 8.30658e-20f -path.cubicTo(SkBits2Float(0x27576c2a), SkBits2Float(0x5921c25d), SkBits2Float(0x51523a70), SkBits2Float(0x12102a10), SkBits2Float(0x633a28d9), SkBits2Float(0x29c80927)); // 2.98959e-15f, 2.8457e+15f, 5.64327e+10f, 4.54902e-28f, 3.43404e+21f, 8.88337e-14f -path.lineTo(SkBits2Float(0x29292727), SkBits2Float(0x21475b3b)); // 3.75595e-14f, 6.75446e-19f -path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f -path.cubicTo(SkBits2Float(0x682d2928), SkBits2Float(0x555b6829), SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 3.27091e+24f, 1.50775e+13f, 1.50606e+13f, 1.43144e-13f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x295b2ded), SkBits2Float(0x29685568), SkBits2Float(0x8c555b2d), SkBits2Float(0xe61d2a2a), SkBits2Float(0x2a63962b)); // 4.86676e-14f, 5.15884e-14f, -1.64364e-31f, -1.85547e+23f, 2.02138e-13f -path.conicTo(SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a), SkBits2Float(0x4b7bc003)); // 1.5954e+13f, 4.87407e+16f, 5.7784e-19f, 4.61198e-19f, 1.64987e+07f -path.lineTo(SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21)); // 2.50338e-13f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a3a7bc0), SkBits2Float(0x2147ed7a), SkBits2Float(0x28282a3a), SkBits2Float(0x8a3a21df), SkBits2Float(0x27b42a3a)); // 5.63611e+25f, 6.77381e-19f, 9.33503e-15f, -8.96194e-33f, 5.00058e-15f -path.conicTo(SkBits2Float(0x2921217d), SkBits2Float(0x5e3a3b35), SkBits2Float(0x7828ee3a), SkBits2Float(0x8e28b03b), SkBits2Float(0x783be82a)); // 3.57782e-14f, 3.35484e+18f, 1.37053e+34f, -2.07925e-30f, 1.52448e+34f -path.conicTo(SkBits2Float(0x8e0b8a3a), SkBits2Float(0x279fd4e6), SkBits2Float(0x7a293a2a), SkBits2Float(0x2a0ef0c5), SkBits2Float(0x653b29d4)); // -1.71996e-30f, 4.43622e-15f, 2.19669e+35f, 1.26957e-13f, 5.52409e+22f -path.quadTo(SkBits2Float(0x29210f21), SkBits2Float(0x282a085d), SkBits2Float(0xc2ab2127), SkBits2Float(0xa6800028)); // 3.57623e-14f, 9.43871e-15f, -85.5648f, -8.88183e-16f -path.lineTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f -path.close(); -path.moveTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f -path.quadTo(SkBits2Float(0x216a2770), SkBits2Float(0x2ab73b28), SkBits2Float(0x4b28f427), SkBits2Float(0x283b5b28)); // 7.93345e-19f, 3.25484e-13f, 1.10726e+07f, 1.04004e-14f -path.lineTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f -path.close(); -path.moveTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f -path.conicTo(SkBits2Float(0xf86d273b), SkBits2Float(0x27e523e3), SkBits2Float(0x2927e0f5), SkBits2Float(0x2ac0e729), SkBits2Float(0x6b492128)); // -1.92402e+34f, 6.35992e-15f, 3.72766e-14f, 3.42665e-13f, 2.43151e+26f -path.cubicTo(SkBits2Float(0x2f273927), SkBits2Float(0xa83a2c21), SkBits2Float(0xd7122121), SkBits2Float(0x21212921), SkBits2Float(0x3be3db3a), SkBits2Float(0xa9deb63b)); // 1.52089e-10f, -1.03346e-14f, -1.60671e+14f, 5.46034e-19f, 0.00695362f, -9.89039e-14f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename); -} - -// crbug.com/626164 -static void fuzz763_1c(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.cubicTo(SkBits2Float(0x1931204a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a4a34), SkBits2Float(0x4a4a4a4a)); // 9.15721e-24f, 1.14845e-12f, 3.31014e+06f, 3.31014e+06f, 3.31432e+06f, 3.31432e+06f - path.moveTo(SkBits2Float(0x000010a1), SkBits2Float(0x19312000)); // 5.96533e-42f, 9.15715e-24f - path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa14a4a4a), SkBits2Float(0x08ff2ba1), SkBits2Float(0x08ff4a4a), SkBits2Float(0x4a344a4a)); // 3.31432e+06f, 3.31432e+06f, -6.85386e-19f, 1.53575e-33f, 1.53647e-33f, 2.95387e+06f - path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4e4a08ff), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa1a181ff)); // 3.31432e+06f, 3.31432e+06f, 1.14845e-12f, 8.47397e+08f, 3.31432e+06f, -1.09442e-18f - - SkPath path2(path); - SkPath dummy; - testPathOpFuzz(reporter, path1, path2, (SkPathOp)4, filename); -} - -// crbug.com/626186 -static void fuzz763_1b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.cubicTo(SkBits2Float(0x0000ff07), SkBits2Float(0xf9f9ff00), SkBits2Float(0xfe0ef9f4), SkBits2Float(0xd9b105fb), SkBits2Float(0x000000f9), SkBits2Float(0xfe11f901)); // 9.14866e-41f, -1.62257e+35f, -4.75121e+37f, -6.22846e+15f, 3.48923e-43f, -4.85077e+37f - path.lineTo(SkBits2Float(0xda1905ed), SkBits2Float(0x3c05fbfb)); // -1.0768e+16f, 0.00817775f - path.cubicTo(SkBits2Float(0x3c3c3c3c), SkBits2Float(0x3c3c3c3c), SkBits2Float(0x253c7f00), SkBits2Float(0xfa00d3fa), SkBits2Float(0x250025fe), SkBits2Float(0x00000006)); // 0.011489f, 0.011489f, 1.63494e-16f, -1.67228e+35f, 1.11151e-16f, 8.40779e-45f - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.quadTo(SkBits2Float(0x3c3c3c3c), SkBits2Float(0xfa253c3c), SkBits2Float(0xfefa00d3), SkBits2Float(0x25fad9df)); // 0.011489f, -2.14488e+35f, -1.66156e+38f, 4.35157e-16f - path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.close(); - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.lineTo(SkBits2Float(0x8dfefa00), SkBits2Float(0xf0f9fad9)); // -1.57141e-30f, -6.1892e+29f - path.cubicTo(SkBits2Float(0x20fe58f9), SkBits2Float(0x0525fbed), SkBits2Float(0x1905ffff), SkBits2Float(0x01f9f9f9), SkBits2Float(0xfbfe0ef9), SkBits2Float(0xfb212fff)); // 4.30882e-19f, 7.80453e-36f, 6.92764e-24f, 9.18268e-38f, -2.63829e+36f, -8.36933e+35f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp)2, filename); -} - -static void fuzz763_1a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.cubicTo(SkBits2Float(0x154be880), SkBits2Float(0x80000640), SkBits2Float(0x5559a419), SkBits2Float(0x59d55928), SkBits2Float(0x80045959), SkBits2Float(0x40154be8)); // 4.11789e-26f, -2.24208e-42f, 1.49562e+13f, 7.50652e+15f, -3.99394e-40f, 2.33276f - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.quadTo(SkBits2Float(0x5559a419), SkBits2Float(0x59d55928), SkBits2Float(0xbd595959), SkBits2Float(0x3f3f3f09)); // 1.49562e+13f, 7.50652e+15f, -0.0530637f, 0.747056f - path.moveTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0x3f3f3f3f)); // 0.747059f, 0.747059f - path.moveTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f - path.lineTo(SkBits2Float(0x09090909), SkBits2Float(0x3038d509)); // 1.6495e-33f, 6.72416e-10f - path.conicTo(SkBits2Float(0x5947ffff), SkBits2Float(0x40e88004), SkBits2Float(0x00002059), SkBits2Float(0x28555900), SkBits2Float(0x5959d559)); // 3.51844e+15f, 7.26563f, 1.16042e-41f, 1.18432e-14f, 3.83217e+15f - path.lineTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f - path.close(); - path.moveTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f - path.lineTo(SkBits2Float(0x38d57f4b), SkBits2Float(0x59597f4b)); // 0.000101803f, 3.82625e+15f - path.lineTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f - path.close(); - path.moveTo(SkBits2Float(0x384700ff), SkBits2Float(0x0108804b)); // 4.74462e-05f, 2.50713e-38f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp)0, filename); -} - -// crbug.com/627780 -static void fuzz763_3a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c)); // 1.50606e+13f, 1.43144e-13f -path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f -path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f -path.cubicTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6), SkBits2Float(0x272a812a), SkBits2Float(0x295b2d29), SkBits2Float(0x2a685568), SkBits2Float(0x68295b2d)); // 2.25206e-21f, 5.54035e+21f, 2.36623e-15f, 4.86669e-14f, 2.06354e-13f, 3.19905e+24f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321), SkBits2Float(0x7a6a4b77), SkBits2Float(0x3a214726)); // 2.49282e-13f, 4.78968e-34f, 1.99397e+36f, 3.04132e+35f, 0.000615226f -path.moveTo(SkBits2Float(0x8adf2028), SkBits2Float(0x3a219a3a)); // -2.14862e-32f, 0.000616464f -path.quadTo(SkBits2Float(0x3ab38e28), SkBits2Float(0x29283ac2), SkBits2Float(0x2be61d2a), SkBits2Float(0x812a4396)); // 0.0013699f, 3.73545e-14f, 1.63506e-12f, -3.12726e-38f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename); -} - -// crbug.com/627689 -static void fuzz763_5a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x38bd8610), SkBits2Float(0x00000000)); // 9.03719e-05f, 0 -path.conicTo(SkBits2Float(0x4183d871), SkBits2Float(0x41fea321), SkBits2Float(0xb700ff00), SkBits2Float(0x4240b8b8), SkBits2Float(0x3b058283)); // 16.4807f, 31.8297f, -7.68877e-06f, 48.1804f, 0.0020372f -path.lineTo(SkBits2Float(0x3a3a3ab8), SkBits2Float(0xb8b8b8b8)); // 0.000710409f, -8.80821e-05f -path.conicTo(SkBits2Float(0x3a455ec8), SkBits2Float(0xb8b8b8b3), SkBits2Float(0x38b2418d), SkBits2Float(0xb730d014), SkBits2Float(0x3f7ffff3)); // 0.000752908f, -8.80821e-05f, 8.49991e-05f, -1.05389e-05f, 0.999999f -path.quadTo(SkBits2Float(0x3a51246a), SkBits2Float(0xb6da45a3), SkBits2Float(0x38bc5c3c), SkBits2Float(0x00000000)); // 0.000797814f, -6.50501e-06f, 8.98172e-05f, 0 -path.lineTo(SkBits2Float(0x3a3a3ab8), SkBits2Float(0xb8b8b8b8)); // 0.000710409f, -8.80821e-05f -path.quadTo(SkBits2Float(0x39a32d2d), SkBits2Float(0x00000000), SkBits2Float(0xb8a13a00), SkBits2Float(0x00000000)); // 0.000311234f, 0, -7.68788e-05f, 0 -path.lineTo(SkBits2Float(0x3a3a3ab8), SkBits2Float(0xb8b8b8b8)); // 0.000710409f, -8.80821e-05f -path.quadTo(SkBits2Float(0x39ba814c), SkBits2Float(0xb838fed2), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0.00035573f, -4.41063e-05f, 0, 0 -path.lineTo(SkBits2Float(0x38bd8610), SkBits2Float(0x00000000)); // 9.03719e-05f, 0 -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -// crbug.com/627401 -static void fuzz763_2a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x3e484500), SkBits2Float(0x164f3a30), SkBits2Float(0x49484801), SkBits2Float(0x7d0100c8)); // 0.195576f, 1.67397e-25f, 820352, 1.07172e+37f -path.conicTo(SkBits2Float(0xff7f36fd), SkBits2Float(0x3e647d01), SkBits2Float(0x0c00f430), SkBits2Float(0x486b6448), SkBits2Float(0x00484848)); // -3.39239e+38f, 0.223133f, 9.93424e-32f, 241041, 6.63809e-39f -path.lineTo(SkBits2Float(0x4f4f557d), SkBits2Float(0x48480112)); // 3.47849e+09f, 204804 -path.lineTo(SkBits2Float(0xf40c01ff), SkBits2Float(0x45008000)); // -4.43702e+31f, 2056 -path.moveTo(SkBits2Float(0x4bfffa00), SkBits2Float(0x7d4ac859)); // 3.35514e+07f, 1.68465e+37f -path.conicTo(SkBits2Float(0x7d014f3e), SkBits2Float(0x00f4ff01), SkBits2Float(0x6b64480c), SkBits2Float(0x48484848), SkBits2Float(0x557d0100)); // 1.07426e+37f, 2.24993e-38f, 2.75975e+26f, 205089, 1.73863e+13f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -// crbug.com/627761 -static void fuzz763_2b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x212a8c55)); // 4.76191e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f -path.lineTo(SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21)); // 2.50338e-13f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a3a7bc0), SkBits2Float(0x4721ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28), SkBits2Float(0x4f9a3a8a)); // 5.63611e+25f, 41453.5f, 9.4495e-15f, 0.000617492f, 5.17506e+09f -path.lineTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f -path.close(); -path.moveTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f -path.cubicTo(SkBits2Float(0x273ac23a), SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6), SkBits2Float(0x272a812a), SkBits2Float(0x295b2d29), SkBits2Float(0x29685568)); // 2.5918e-15f, 2.25206e-21f, 5.54035e+21f, 2.36623e-15f, 4.86669e-14f, 5.15884e-14f -path.lineTo(SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321)); // 4.78968e-34f, 1.99397e+36f -path.lineTo(SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28)); // 9.4495e-15f, 0.000617492f -path.lineTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f -path.close(); -path.moveTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f -path.quadTo(SkBits2Float(0x8a4fc29a), SkBits2Float(0x3ab3283a), SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6)); // -1.00033e-32f, 0.00136686f, 2.25206e-21f, 300.343f -path.moveTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f -path.conicTo(SkBits2Float(0x1e2ab03a), SkBits2Float(0x2920213b), SkBits2Float(0x3b3ac527), SkBits2Float(0xc422333b), SkBits2Float(0x6c2a9f1f)); // 9.03617e-21f, 3.5556e-14f, 0.00284989f, -648.8f, 8.25075e+26f -path.quadTo(SkBits2Float(0xc25d2757), SkBits2Float(0x3a705921), SkBits2Float(0x2a105152), SkBits2Float(0x28d91210)); // -55.2884f, 0.000916855f, 1.2818e-13f, 2.40997e-14f -path.quadTo(SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21)); // 3.19905e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f -path.lineTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f -path.close(); -path.moveTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0xcb7bc003), SkBits2Float(0x47ed7a6a)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, -1.64987e+07f, 121589 -path.lineTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f -path.close(); -path.moveTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f -path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x2d8a3a21), SkBits2Float(0x5b682b68), SkBits2Float(0x5b292d55)); // -1.2117e+19f, 1.57146e-11f, 6.53499e+16f, 4.76191e+16f -path.lineTo(SkBits2Float(0x2a212a8c), SkBits2Float(0x0321081f)); // 1.43144e-13f, 4.7323e-37f -path.conicTo(SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x3a21477a)); // 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f, 0.000615231f -path.moveTo(SkBits2Float(0x21df2828), SkBits2Float(0x9a3a8a3a)); // 1.51217e-18f, -3.85756e-23f -path.quadTo(SkBits2Float(0x3ab38a28), SkBits2Float(0x28273ac2), SkBits2Float(0xe61d2a29), SkBits2Float(0x2a63962b)); // 0.00136978f, 9.2831e-15f, -1.85547e+23f, 2.02138e-13f -path.conicTo(SkBits2Float(0x2d29272a), SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x5b2d6829), SkBits2Float(0x212a8c55)); // 9.61523e-12f, 1.5954e+13f, 4.87407e+16f, 4.88097e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_2c(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x36344a4a)); // 0, 2.68653e-06f -path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x364a4a4a), SkBits2Float(0x364a4a4a), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0, 3.01436e-06f, 3.01436e-06f, 0, 0 -path.lineTo(SkBits2Float(0x364a4a4a), SkBits2Float(0x00000000)); // 3.01436e-06f, 0 -path.cubicTo(SkBits2Float(0x364a30f0), SkBits2Float(0x344ac7fb), SkBits2Float(0x3656d432), SkBits2Float(0x34cabb48), SkBits2Float(0x367031a9), SkBits2Float(0x351802f1)); // 3.01288e-06f, 1.88855e-07f, 3.2012e-06f, 3.77617e-07f, 3.57917e-06f, 5.66287e-07f -path.cubicTo(SkBits2Float(0x36a7b150), SkBits2Float(0x35ab09db), SkBits2Float(0x371874ed), SkBits2Float(0x3604f2c7), SkBits2Float(0x3784e0c7), SkBits2Float(0x36344a51)); // 4.99763e-06f, 1.27434e-06f, 9.08713e-06f, 1.98108e-06f, 1.58403e-05f, 2.68653e-06f -path.cubicTo(SkBits2Float(0x3743dc9a), SkBits2Float(0x36344a4f), SkBits2Float(0x36fbef33), SkBits2Float(0x36344a4e), SkBits2Float(0x36604a35), SkBits2Float(0x36344a4c)); // 1.16743e-05f, 2.68653e-06f, 7.50823e-06f, 2.68653e-06f, 3.34218e-06f, 2.68653e-06f -path.cubicTo(SkBits2Float(0x36531715), SkBits2Float(0x36344a4c), SkBits2Float(0x3645e3f5), SkBits2Float(0x36344a4b), SkBits2Float(0x3638b0d4), SkBits2Float(0x36344a4b)); // 3.14549e-06f, 2.68653e-06f, 2.9488e-06f, 2.68653e-06f, 2.75211e-06f, 2.68653e-06f -path.cubicTo(SkBits2Float(0x35f64120), SkBits2Float(0x36344a4b), SkBits2Float(0x35764124), SkBits2Float(0x36344a4a), SkBits2Float(0x00000000), SkBits2Float(0x36344a4a)); // 1.83474e-06f, 2.68653e-06f, 9.17369e-07f, 2.68653e-06f, 0, 2.68653e-06f -path.close(); - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.cubicTo(SkBits2Float(0x1931204a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a4a34), SkBits2Float(0x4a4a4a4a)); // 9.15721e-24f, 1.14845e-12f, 3.31014e+06f, 3.31014e+06f, 3.31432e+06f, 3.31432e+06f -path.moveTo(SkBits2Float(0x000010a1), SkBits2Float(0x19312000)); // 5.96533e-42f, 9.15715e-24f -path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa14a4a4a), SkBits2Float(0x08ff2ba1), SkBits2Float(0x08ff4a4a), SkBits2Float(0x4a344a4a)); // 3.31432e+06f, 3.31432e+06f, -6.85386e-19f, 1.53575e-33f, 1.53647e-33f, 2.95387e+06f -path.cubicTo(SkBits2Float(0x544a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4e4a08ff), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa1a181ff)); // 3.47532e+12f, 3.31432e+06f, 1.14845e-12f, 8.47397e+08f, 3.31432e+06f, -1.09442e-18f - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, kReverseDifference_SkPathOp, filename); -} - -static void fuzz763_6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f -path.cubicTo(SkBits2Float(0x68295b2d), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x68556829)); // 3.19905e+24f, 0, 0, 0, 0, 4.03114e+24f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f -path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x67d55b2a), SkBits2Float(0x67296a4b), SkBits2Float(0x67555b2a), SkBits2Float(0x677e1f70), SkBits2Float(0x66d55b2a)); // 0, 2.01509e+24f, 8.00041e+23f, 1.00755e+24f, 1.20006e+24f, 5.03773e+23f -path.cubicTo(SkBits2Float(0x678f0684), SkBits2Float(0x6684f008), SkBits2Float(0x6798f8ea), SkBits2Float(0x6625a942), SkBits2Float(0x67961914), SkBits2Float(0x65ce709a)); // 1.35084e+24f, 3.1389e+23f, 1.44478e+24f, 1.95578e+23f, 1.41764e+24f, 1.21861e+23f -path.cubicTo(SkBits2Float(0x679174f7), SkBits2Float(0x63199132), SkBits2Float(0x6756c79f), SkBits2Float(0x606478de), SkBits2Float(0x65682bcf), SkBits2Float(0x00000000)); // 1.3738e+24f, 2.83281e+21f, 1.01427e+24f, 6.58526e+19f, 6.85248e+22f, 0 -path.conicTo(SkBits2Float(0x68295b02), SkBits2Float(0x60f7f28b), SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f), SkBits2Float(0x42784f5a)); // 3.19903e+24f, 1.42932e+20f, 0, 5.14279e+25f, 62.0775f -path.close(); -path.moveTo(SkBits2Float(0x654d6d10), SkBits2Float(0x00000000)); // 6.06311e+22f, 0 -path.lineTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x00000000)); // 6.14991e+25f, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc0)); // 0, 6.14991e+25f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x3ac23a55), SkBits2Float(0x2a292827)); // 0.00148184f, 1.50241e-13f -path.lineTo(SkBits2Float(0x63962be6), SkBits2Float(0x272a812a)); // 5.54035e+21f, 2.36623e-15f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_7(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x0f2a312a), SkBits2Float(0xc0032108)); // 8.39112e-30f, -2.04889f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68345b2d), SkBits2Float(0xf0682955)); // 3.40683e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x295b2d2a), SkBits2Float(0x08685568), SkBits2Float(0x7bc00321)); // 5.76397e-19f, -5.27821e+28f, 4.86669e-14f, 6.99154e-34f, 1.99397e+36f -path.lineTo(SkBits2Float(0x68345b2d), SkBits2Float(0xf0682955)); // 3.40683e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68345b2d), SkBits2Float(0xf0682955)); // 3.40683e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.lineTo(SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a281a4f)); // 0.00105461f, -8.09385e-33f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x272a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 2.36623e-15f, 0.000649768f -path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f, 2.34747e-15f -path.conicTo(SkBits2Float(0xba1f203a), SkBits2Float(0xc422c538), SkBits2Float(0x215d5927), SkBits2Float(0x70ec2ac2), SkBits2Float(0x2a51523a)); // -0.000607017f, -651.082f, 7.49957e-19f, 5.84721e+29f, 1.85915e-13f -path.quadTo(SkBits2Float(0x633ad912), SkBits2Float(0x29c80927), SkBits2Float(0x272927b0), SkBits2Float(0x683a5b2d)); // 3.44674e+21f, 8.88337e-14f, 2.3475e-15f, 3.52017e+24f -path.lineTo(SkBits2Float(0x295b2d68), SkBits2Float(0x29685568)); // 4.86672e-14f, 5.15884e-14f -path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 1.89339e-13f -path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a688c5b), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x8c08555b), SkBits2Float(0x2a2a29ca)); // 5.73801e-19f, 2.06544e-13f, 3.19905e+24f, 9.6297e-12f, -1.05027e-31f, 1.51135e-13f -path.quadTo(SkBits2Float(0x68295b21), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21)); // 3.19904e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.close(); -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x5b2d6829), SkBits2Float(0x212a8c55), SkBits2Float(0xed7aba1f), SkBits2Float(0x2a212a8c)); // 6.14991e+25f, 4.88097e+16f, 5.7784e-19f, -4.84977e+27f, 1.43144e-13f -path.moveTo(SkBits2Float(0x2d212d08), SkBits2Float(0x5568295b)); // 9.16179e-12f, 1.5954e+13f -path.moveTo(SkBits2Float(0x5529685b), SkBits2Float(0x11295b68)); // 1.16416e+13f, 1.33599e-28f -path.conicTo(SkBits2Float(0x5b782968), SkBits2Float(0x3a292d55), SkBits2Float(0x2a8c555b), SkBits2Float(0x68295a2d), SkBits2Float(0x2d296855)); // 6.98513e+16f, 0.000645359f, 2.49282e-13f, 3.19897e+24f, 9.6297e-12f -path.moveTo(SkBits2Float(0x555b8c55), SkBits2Float(0x21682929)); // 1.50872e+13f, 7.86591e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0xac2d8ced), SkBits2Float(0x5b682968), SkBits2Float(0x5b292d55), SkBits2Float(0x212a8c55), SkBits2Float(0x081f282a)); // -2.4663e-12f, 6.53477e+16f, 4.76191e+16f, 5.7784e-19f, 4.78945e-34f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.close(); -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x03081f21), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x2147ed7a)); // 6.14991e+25f, 2.50338e-13f, 4.00025e-37f, 5.63611e+25f, 6.77381e-19f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.close(); -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.quadTo(SkBits2Float(0x2d28282a), SkBits2Float(0x5568295b), SkBits2Float(0x3a21df68), SkBits2Float(0x4f9a3a8a)); // 9.55861e-12f, 1.5954e+13f, 0.000617495f, 5.17506e+09f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.close(); -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.cubicTo(SkBits2Float(0x5568c23a), SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a), SkBits2Float(0x3a7bc003), SkBits2Float(0x294b2827)); // 1.59951e+13f, 4.87407e+16f, 5.7784e-19f, 4.61198e-19f, 0.00096035f, 4.51099e-14f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void kfuzz2(skiatest::Reporter* reporter, const char* filename) { - SkPath path1; - SkPath path; -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f -path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xf19e92c7), SkBits2Float(0xf17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0x60600100), SkBits2Float(0x0100ff60)); // -2.36118e+21f, -1.57043e+30f, -1.26726e+30f, -3.40177e+38f, 6.45647e+19f, 2.36931e-38f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f -path.lineTo(SkBits2Float(0x60601a1d), SkBits2Float(0x60606060)); // 6.4593e+19f, 6.46721e+19f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f -path.close(); -path.moveTo(SkBits2Float(0xe5e2f300), SkBits2Float(0xee244a40)); // -1.33967e+23f, -1.27113e+28f -path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f -path.close(); -path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f -path.lineTo(SkBits2Float(0xfafafafa), SkBits2Float(0xe30000fa)); // -6.51582e+35f, -2.36125e+21f -path.conicTo(SkBits2Float(0x92e592e5), SkBits2Float(0xfafafafb), SkBits2Float(0xc4fa0000), SkBits2Float(0x6060fafa), SkBits2Float(0x60606060)); // -1.44881e-27f, -6.51582e+35f, -2000, 6.48462e+19f, 6.46721e+19f -path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f -path.close(); -path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f -path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xf19e92c7), SkBits2Float(0xf17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0xfafafa00), SkBits2Float(0xfafafafa)); // -2.36118e+21f, -1.57043e+30f, -1.26726e+30f, -3.40177e+38f, -6.51572e+35f, -6.51582e+35f -path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f -path.close(); -path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f -path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xe39e92c7), SkBits2Float(0xf17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0xeed0ee9a), SkBits2Float(0x9a98ffca)); // -2.36118e+21f, -5.85032e+21f, -1.26726e+30f, -3.40177e+38f, -3.23307e+28f, -6.3279e-23f -path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f -path.close(); -SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, kXOR_SkPathOp, filename); -} - -static void fuzz763_10(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x68556829)); // 0, 4.03114e+24f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 6.14991e+25f, 0, 0, 6.14991e+25f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68556829)); // 0, 4.03114e+24f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x2a8c8f55)); // 4.87407e+16f, 2.49685e-13f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.conicTo(SkBits2Float(0x682d2fed), SkBits2Float(0x755b6829), SkBits2Float(0x5b292d2b), SkBits2Float(0xc92a8c55), SkBits2Float(0x081f2a21)); // 3.27141e+24f, 2.78131e+32f, 4.76189e+16f, -698565, 4.78968e-34f -path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.close(); -path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a29)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, 0.00096035f, 121588 -path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.close(); -path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.quadTo(SkBits2Float(0x6829682d), SkBits2Float(0x292d555b), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a29)); // 3.20001e+24f, 3.84878e-14f, 2.49282e-13f, 4.78969e-34f -path.conicTo(SkBits2Float(0x6a497b19), SkBits2Float(0x218ced7a), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x47ed3a7a)); // 6.08939e+25f, 9.54963e-19f, 4.7323e-37f, 5.63611e+25f, 121461 -path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.close(); -path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.quadTo(SkBits2Float(0x282a282a), SkBits2Float(0x8a3a21df), SkBits2Float(0x2728282a), SkBits2Float(0x8a3a2129)); // 9.4456e-15f, -8.96194e-33f, 2.33365e-15f, -8.96181e-33f -path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3a3ac2b3), SkBits2Float(0x2a292827), SkBits2Float(0x962be61d)); // -8.10388e-33f, 0.000712435f, 1.50241e-13f, -1.38859e-25f -path.lineTo(SkBits2Float(0x272a802a), SkBits2Float(0x2a8c2d29)); // 2.36617e-15f, 2.49003e-13f -path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.close(); -path.moveTo(SkBits2Float(0x4f9a3a29), SkBits2Float(0x3ab38a28)); // 5.17501e+09f, 0.00136978f -path.quadTo(SkBits2Float(0xc368305b), SkBits2Float(0x5b296855), SkBits2Float(0x2d8c5568), SkBits2Float(0x1f2a2172)); // -232.189f, 4.7684e+16f, 1.59541e-11f, 3.60266e-20f -path.lineTo(SkBits2Float(0x29c00321), SkBits2Float(0x5b4b7b13)); // 8.52706e-14f, 5.72747e+16f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_11(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x2a0f312a), SkBits2Float(0xc0032108)); // 1.2718e-13f, -2.04889f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7b21), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14984e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24f, 2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x295b2d2a), SkBits2Float(0x08685568), SkBits2Float(0x7bc00321)); // 5.76397e-19f, -5.27821e+28f, 4.86669e-14f, 6.99154e-34f, 1.99397e+36f -path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24f, 2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24f, 2.87402e+29f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.lineTo(SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a281a4f)); // 0.00105461f, -8.09385e-33f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x2a812a3b), SkBits2Float(0x2a552927)); // 2.25206e-21f, 300.343f, 2.29443e-13f, 1.89325e-13f -path.quadTo(SkBits2Float(0x3b1e2ab0), SkBits2Float(0x29272021), SkBits2Float(0x203a3b27), SkBits2Float(0x22c5381f)); // 0.00241343f, 3.71093e-14f, 1.57744e-19f, 5.34564e-18f -path.moveTo(SkBits2Float(0x5d27ec2a), SkBits2Float(0x705921c2)); // 7.56256e+17f, 2.68796e+29f -path.quadTo(SkBits2Float(0x102a5152), SkBits2Float(0x5b2dd912), SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 3.35892e-29f, 4.89338e+16f, 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032127)); // 3.60396e-20f, -2.0489f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0x2a8c684b), SkBits2Float(0xf05b272d), SkBits2Float(0x2a1f1555), SkBits2Float(0x21082a21), SkBits2Float(0x6a4b7b03)); // 3.4979e+24f, 2.49414e-13f, -2.71298e+29f, 1.41294e-13f, 4.61343e-19f, 6.14982e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -5.27821e+28f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x2a21211f)); // 4.85282e+16f, 1.43112e-13f -path.lineTo(SkBits2Float(0x03552a8c), SkBits2Float(0x6a4f7b28)); // 6.26439e-37f, 6.27073e+25f -path.conicTo(SkBits2Float(0x2347ed93), SkBits2Float(0x282a3a21), SkBits2Float(0x3adf2128), SkBits2Float(0x4f1a3a8a), SkBits2Float(0x3ab38a28)); // 1.08381e-17f, 9.4495e-15f, 0.00170234f, 2.58753e+09f, 0.00136978f -path.lineTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x262a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 5.91556e-16f, 0.000649768f -path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f, 2.34747e-15f -path.conicTo(SkBits2Float(0x371f203a), SkBits2Float(0xc52a22c4), SkBits2Float(0xc25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x5210513a)); // 9.48464e-06f, -2722.17f, -55.289f, 0.000916855f, 1.5496e+11f -path.cubicTo(SkBits2Float(0x63102ad9), SkBits2Float(0x29c80927), SkBits2Float(0x633a27b0), SkBits2Float(0x2909c827), SkBits2Float(0x272927b1), SkBits2Float(0x3a685b2d)); // 2.65942e+21f, 8.88337e-14f, 3.43395e+21f, 3.05937e-14f, 2.3475e-15f, 0.000886368f -path.moveTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24f, 5.15884e-14f -path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x5b2d2729)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 4.87382e+16f -path.quadTo(SkBits2Float(0x2d685568), SkBits2Float(0x5568295b), SkBits2Float(0x2a552d29), SkBits2Float(0x295b2d27)); // 1.32066e-11f, 1.5954e+13f, 1.89339e-13f, 4.86669e-14f -path.lineTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24f, 5.15884e-14f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_12(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a29082a)); // 0, 5.10868e+25f -path.conicTo(SkBits2Float(0x6a295ac3), SkBits2Float(0x61bb988e), SkBits2Float(0x6829682d), SkBits2Float(0x5f3ba76a), SkBits2Float(0x42730a87)); // 5.11843e+25f, 4.32567e+20f, 3.20001e+24f, 1.35219e+19f, 60.7603f -path.conicTo(SkBits2Float(0x67aedf99), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x3f801112)); // 1.65163e+24f, 0, 0, 0, 1.00052f -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 6.14991e+25f, 0, 0, 4.03114e+24f, 1.50617e+13f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f -path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x67d55b2a), SkBits2Float(0x67296a4b), SkBits2Float(0x67555b2a), SkBits2Float(0x677e1f70), SkBits2Float(0x66d55b2a)); // 0, 2.01509e+24f, 8.00041e+23f, 1.00755e+24f, 1.20006e+24f, 5.03773e+23f -path.cubicTo(SkBits2Float(0x678f0684), SkBits2Float(0x6684f008), SkBits2Float(0x6798f8ea), SkBits2Float(0x6625a942), SkBits2Float(0x67961914), SkBits2Float(0x65ce709a)); // 1.35084e+24f, 3.1389e+23f, 1.44478e+24f, 1.95578e+23f, 1.41764e+24f, 1.21861e+23f -path.cubicTo(SkBits2Float(0x679158b0), SkBits2Float(0x00000000), SkBits2Float(0x67531e34), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 1.37276e+24f, 0, 9.96976e+23f, 0, 0, 0 -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003), SkBits2Float(0xed237a6a), SkBits2Float(0x2d682967), SkBits2Float(0x2a8c555b)); // 4.61198e-19f, 1.64987e+07f, -3.16213e+27f, 1.31969e-11f, 2.49282e-13f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x3a6821df), SkBits2Float(0x2a8c3a8a)); // 0.000885514f, 2.49096e-13f -path.moveTo(SkBits2Float(0x29272a1d), SkBits2Float(0xb03a2a55)); // 3.7118e-14f, -6.77266e-10f -path.moveTo(SkBits2Float(0x20213b1e), SkBits2Float(0xc5272927)); // 1.36568e-19f, -2674.57f -path.quadTo(SkBits2Float(0xc422373b), SkBits2Float(0xec2a201f), SkBits2Float(0x21c25d27), SkBits2Float(0x523a7059)); // -648.863f, -8.22676e+26f, 1.31706e-18f, 2.00187e+11f -path.cubicTo(SkBits2Float(0x12102a10), SkBits2Float(0xe73a28d9), SkBits2Float(0xc8092763), SkBits2Float(0x2927b029), SkBits2Float(0x295b2d27), SkBits2Float(0x2d685568)); // 4.54902e-28f, -8.79114e+23f, -140446, 3.72342e-14f, 4.86669e-14f, 1.32066e-11f -path.moveTo(SkBits2Float(0x68556809), SkBits2Float(0x555b2d29)); // 4.03113e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a212a), SkBits2Float(0x2d032108)); // 3.60263e-20f, 7.45382e-12f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // 4.03114e+24f, 1.89339e-13f -path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a528c5b), SkBits2Float(0x284f5b2d), SkBits2Float(0x218aa621), SkBits2Float(0x3f2d2db3), SkBits2Float(0x68293a2a)); // 5.73801e-19f, 1.87004e-13f, 1.15106e-14f, 9.39522e-19f, 0.676479f, 3.19661e+24f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_13(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0x3adf2128), SkBits2Float(0x4f1a3a8a)); // 6.14991e+25f, 75739, 9.4495e-15f, 0.00170234f, 2.58753e+09f -path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.close(); -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x272a8128), SkBits2Float(0x3a2a5529), SkBits2Float(0x3b1e2ab0)); // 0.00148109f, 2.25206e-21f, 300.343f, 2.36623e-15f, 0.000649768f, 0.00241343f -path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.close(); -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.cubicTo(SkBits2Float(0x3b272927), SkBits2Float(0x381f203a), SkBits2Float(0x2ac422c5), SkBits2Float(0xc25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x2a105152)); // 0.00255067f, 3.79386e-05f, 3.48407e-13f, -55.289f, 0.000916855f, 1.2818e-13f -path.quadTo(SkBits2Float(0x633ad912), SkBits2Float(0x29c80927), SkBits2Float(0x272927b0), SkBits2Float(0x68295b2d)); // 3.44674e+21f, 8.88337e-14f, 2.3475e-15f, 3.19905e+24f -path.lineTo(SkBits2Float(0x295b2d68), SkBits2Float(0x29685568)); // 4.86672e-14f, 5.15884e-14f -path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 1.89339e-13f -path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a688c5b), SkBits2Float(0x6829292d), SkBits2Float(0x2d296855), SkBits2Float(0x8c08555b), SkBits2Float(0x2a2a291f)); // 5.73801e-19f, 2.06544e-13f, 3.19536e+24f, 9.6297e-12f, -1.05027e-31f, 1.51133e-13f -path.conicTo(SkBits2Float(0x68295b21), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321)); // 3.19904e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f, 1.99397e+36f -path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.close(); -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.lineTo(SkBits2Float(0x5b2d6829), SkBits2Float(0x212a8c55)); // 4.88097e+16f, 5.7784e-19f -path.conicTo(SkBits2Float(0x8ced7aba), SkBits2Float(0x3f2a212a), SkBits2Float(0x2d212d08), SkBits2Float(0x5568295b), SkBits2Float(0x29685b2d)); // -3.65895e-31f, 0.664569f, 9.16179e-12f, 1.5954e+13f, 5.15934e-14f -path.lineTo(SkBits2Float(0x68295b68), SkBits2Float(0x2d296855)); // 3.19906e+24f, 9.6297e-12f -path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x6aba7b03), SkBits2Float(0x2147ed7a)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, 1.12721e+26f, 6.77381e-19f -path.quadTo(SkBits2Float(0x6028282a), SkBits2Float(0x68292ddf), SkBits2Float(0x5b2d555b), SkBits2Float(0x68556829)); // 4.84679e+19f, 3.1957e+24f, 4.8789e+16f, 4.03114e+24f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_14(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0xf45b2d29)); // 4.03114e+24f, -6.94598e+31f -path.moveTo(SkBits2Float(0x1f2a302a), SkBits2Float(0xc8032108)); // 3.60387e-20f, -134276 -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf0db684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x302a5b25), SkBits2Float(0xf0685568)); // 3.4979e+24f, -5.43226e+29f, -1.64207e-31f, 5.76527e-19f, 6.19752e-10f, -2.87615e+29f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_15(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x212a8c55)); // 4.76191e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x2c6829c0), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a29)); // 5.77848e-19f, 4.7323e-37f, 3.29924e-12f, 2.49282e-13f, 4.78969e-34f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f -path.close(); -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0xdf218a28), SkBits2Float(0x4f1a3a3a)); // 6.14991e+25f, 75739, 9.4495e-15f, -1.16402e+19f, 2.58751e+09f -path.quadTo(SkBits2Float(0x3ab38a28), SkBits2Float(0x283ac221), SkBits2Float(0xe6432a29), SkBits2Float(0x2a96812b)); // 0.00136978f, 1.03672e-14f, -2.3041e+23f, 2.6735e-13f -path.lineTo(SkBits2Float(0x5529272a), SkBits2Float(0x1eb03a2a)); // 1.16241e+13f, 1.86588e-20f -path.conicTo(SkBits2Float(0x2a272021), SkBits2Float(0x3ac52729), SkBits2Float(0xc422313b), SkBits2Float(0xec2a201f), SkBits2Float(0x21c25d27)); // 1.48437e-13f, 0.00150416f, -648.769f, -8.22676e+26f, 1.31706e-18f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f -path.close(); -path.moveTo(SkBits2Float(0x1051523a), SkBits2Float(0xd912102a)); // 4.12813e-29f, -2.56957e+15f -path.close(); -path.moveTo(SkBits2Float(0x1051523a), SkBits2Float(0xd912102a)); // 4.12813e-29f, -2.56957e+15f -path.quadTo(SkBits2Float(0xc82763e7), SkBits2Float(0x2927b029), SkBits2Float(0x295b2d27), SkBits2Float(0x2d685568)); // -171408, 3.72342e-14f, 4.86669e-14f, 1.32066e-11f -path.moveTo(SkBits2Float(0x68556809), SkBits2Float(0x8c555b2d)); // 4.03113e+24f, -1.64364e-31f -path.moveTo(SkBits2Float(0x081f2a21), SkBits2Float(0x252d0321)); // 4.78968e-34f, 1.50064e-16f -path.moveTo(SkBits2Float(0x5568392a), SkBits2Float(0x5b2df068)); // 1.59583e+13f, 4.89595e+16f -path.quadTo(SkBits2Float(0x2a1f2a8c), SkBits2Float(0x21482a21), SkBits2Float(0x4b7bc003), SkBits2Float(0x8ced3a6a)); // 1.41368e-13f, 6.78184e-19f, 1.64987e+07f, -3.65508e-31f -path.moveTo(SkBits2Float(0x21481f21), SkBits2Float(0x4b7bc003)); // 6.78038e-19f, 1.64987e+07f -path.conicTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d155b2d), SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x2a8c8f55)); // 3.20982e+24f, 8.48991e-12f, 1.5954e+13f, 4.87407e+16f, 2.49685e-13f -path.lineTo(SkBits2Float(0x21481f21), SkBits2Float(0x4b7bc003)); // 6.78038e-19f, 1.64987e+07f -path.close(); -path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.conicTo(SkBits2Float(0x682d2fed), SkBits2Float(0x755b6829), SkBits2Float(0x5b292d2b), SkBits2Float(0xc92a8c55), SkBits2Float(0x081f2a21)); // 3.27141e+24f, 2.78131e+32f, 4.76189e+16f, -698565, 4.78968e-34f -path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.close(); -path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x212aed7a), SkBits2Float(0x0321081f), SkBits2Float(0x293a7bc0), SkBits2Float(0x2147ed7a)); // 6.14991e+25f, 5.79125e-19f, 4.7323e-37f, 4.14076e-14f, 6.77381e-19f -path.quadTo(SkBits2Float(0x6829682d), SkBits2Float(0x292d555b), SkBits2Float(0x292a8c55), SkBits2Float(0x21081f2a)); // 3.20001e+24f, 3.84878e-14f, 3.78693e-14f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x218ced7a), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x47ed3a7a)); // 6.14991e+25f, 9.54963e-19f, 4.7323e-37f, 5.63611e+25f, 121461 -path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.close(); -path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.quadTo(SkBits2Float(0x282a282a), SkBits2Float(0x8a3a21df), SkBits2Float(0x2728282a), SkBits2Float(0x8a3a21df)); // 9.4456e-15f, -8.96194e-33f, 2.33365e-15f, -8.96194e-33f -path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3a3ac2b3), SkBits2Float(0x2a292827), SkBits2Float(0x962be61d)); // -8.10388e-33f, 0.000712435f, 1.50241e-13f, -1.38859e-25f -path.lineTo(SkBits2Float(0x272a802a), SkBits2Float(0x2a8c2d29)); // 2.36617e-15f, 2.49003e-13f -path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f -path.close(); -path.moveTo(SkBits2Float(0x4f9a3a29), SkBits2Float(0x3ab38a28)); // 5.17501e+09f, 0.00136978f -path.quadTo(SkBits2Float(0xc368305b), SkBits2Float(0x5b296855), SkBits2Float(0x2d8c5568), SkBits2Float(0x1f2a2172)); // -232.189f, 4.7684e+16f, 1.59541e-11f, 3.60266e-20f -path.lineTo(SkBits2Float(0x29c00321), SkBits2Float(0x5b4b7b13)); // 8.52706e-14f, 5.72747e+16f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_16(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68372d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c552775), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.46012e+24f, -2.71613e+29f, -1.64208e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x68385b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.48239e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f -path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 1.31626e+28f, 4.7323e-37f, 6.14991e+25f, 75739 -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0x2c213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, 2.29121e-12f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x681aed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 2.92648e+24f, 1.46617e+13f, 9.01175e-21f -path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2769), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21512727)); // 2.22225e-15f, 0.000713936f, -732.486f, -1.90686e+27f, 7.08638e-19f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a322a), SkBits2Float(0xc0032108)); // 3.60404e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05bd24b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0xed4b7bc0)); // 4.06458e+24f, -2.72126e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, -3.93594e+27f -path.conicTo(SkBits2Float(0x212a8c6a), SkBits2Float(0x0329081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77841e-19f, 4.9674e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x555b6829), SkBits2Float(0x6c212a8c)); // 1.50775e+13f, 7.79352e+26f -path.conicTo(SkBits2Float(0x084b0321), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0x5bf05568), SkBits2Float(0x212a3a8c)); // 6.10918e-34f, 1.16348e+26f, 0.000209024f, 1.35296e+17f, 5.76757e-19f -path.lineTo(SkBits2Float(0x8c558c55), SkBits2Float(0x212a1f2a)); // -1.64512e-31f, 5.76395e-19f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_17(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f -path.moveTo(SkBits2Float(0x6835282d), SkBits2Float(0xf0682955)); // 3.42196e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 4.2514e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f -path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x254793ed)); // 2.49282e-13f, 5.76399e-19f, 4.7323e-37f, 6.14991e+25f, 1.73106e-16f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f -path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0x16c52a22), SkBits2Float(0x515d27ec)); // 2.22225e-15f, 0.000713932f, -732.486f, 3.18537e-25f, 5.93661e+10f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x2a212a1f)); // 2.49282e-13f, 1.43143e-13f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x2a1f08c0)); // -1.31678e-31f, 1.41251e-13f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x2a8cef55), SkBits2Float(0x68295b2d)); // 2.50351e-13f, 3.19905e+24f -path.conicTo(SkBits2Float(0x55086821), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x5b2c6829), SkBits2Float(0x21218c55), SkBits2Float(0x2a6c1f03)); // 9.3738e+12f, 6.14991e+25f, 4.85282e+16f, 5.47346e-19f, 2.09718e-13f -path.lineTo(SkBits2Float(0x2a8cef55), SkBits2Float(0x68295b2d)); // 2.50351e-13f, 3.19905e+24f -path.close(); -path.moveTo(SkBits2Float(0x2a8cef55), SkBits2Float(0x68295b2d)); // 2.50351e-13f, 3.19905e+24f -path.lineTo(SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a)); // 1.16348e+26f, 0.000209024f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_18(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f -path.moveTo(SkBits2Float(0x6835282d), SkBits2Float(0xf0682955)); // 3.42196e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 4.2514e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f -path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x254793ed)); // 2.49282e-13f, 5.76399e-19f, 4.7323e-37f, 6.14991e+25f, 1.73106e-16f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f -path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0x16c52a22), SkBits2Float(0x515d27ec)); // 2.22225e-15f, 0.000713932f, -732.486f, 3.18537e-25f, 5.93661e+10f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x2a212a1f)); // 2.49282e-13f, 1.43143e-13f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x2a1f08c0)); // -1.31678e-31f, 1.41251e-13f - -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x2a8c54ed), SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003), SkBits2Float(0x29ed846a), SkBits2Float(0x555b2d28)); // 2.49279e-13f, 4.61198e-19f, 1.64987e+07f, 1.05479e-13f, 1.50617e+13f -path.conicTo(SkBits2Float(0x68392d5b), SkBits2Float(0xf0682955), SkBits2Float(0x2a1f5b2d), SkBits2Float(0xef552a21), SkBits2Float(0x5b2d2a8c)); // 3.4979e+24f, -2.87402e+29f, 1.41537e-13f, -6.59712e+28f, 4.8742e+16f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_19(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003)); // 4.61198e-19f, 1.64987e+07f -path.lineTo(SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 9.43289e-15f, 1.61207e+25f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 4.2514e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f -path.moveTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x8c5bf055), SkBits2Float(0x2a1f2a55), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, -1.69435e-31f, 1.41367e-13f, 4.7362e-37f, 1.43189e+16f -path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2547937a)); // 2.49282e-13f, 5.76399e-19f, 4.7323e-37f, 6.14991e+25f, 1.73105e-16f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f -path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21515d27)); // 2.22225e-15f, 0.000713932f, -732.486f, -1.90686e+27f, 7.09352e-19f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x555b2c29), SkBits2Float(0x6c212a8c)); // 1.50614e+13f, 7.79352e+26f -path.conicTo(SkBits2Float(0x084b0321), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0xf05b5568), SkBits2Float(0x212a3a8c)); // 6.10918e-34f, 1.16348e+26f, 0.000209024f, -2.71522e+29f, 5.76757e-19f -path.conicTo(SkBits2Float(0x290321d9), SkBits2Float(0x555b2d68), SkBits2Float(0x2a8c558c), SkBits2Float(0x2abe2a1f), SkBits2Float(0x7bc00321)); // 2.91172e-14f, 1.50618e+13f, 2.49284e-13f, 3.378e-13f, 1.99397e+36f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x1f2128c0)); // -1.31678e-31f, 3.41268e-20f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_20(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2a8c552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 2.49281e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f -path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321182a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 1.31626e+28f, 4.73414e-37f, 6.14991e+25f, 75739 -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0x2c213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, 2.29121e-12f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f -path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2769), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x51282727)); // 2.22225e-15f, 0.000713936f, -732.486f, -1.90686e+27f, 4.51382e+10f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x8c555b2d)); // 4.03114e+24f, -1.64364e-31f -path.moveTo(SkBits2Float(0x081f2a31), SkBits2Float(0xc0032921)); // 4.78969e-34f, -2.04939f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05bd24b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0xed4b7bc0)); // 4.06458e+24f, -2.72126e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, -3.93594e+27f -path.conicTo(SkBits2Float(0x212a8c6a), SkBits2Float(0x4329081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 5.77841e-19f, 169.032f, 6.14991e+25f, 9.43289e-15f, 4.8745e+16f -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x3a210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 0.000614217f, 1.99729e+36f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x555b6829), SkBits2Float(0x6c212a8c)); // 1.50775e+13f, 7.79352e+26f -path.lineTo(SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556830)); // 4.88298e+16f, -2.64185e+29f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x0321d90a), SkBits2Float(0x555b2d68), SkBits2Float(0x2a8c558c), SkBits2Float(0x212a2a1f), SkBits2Float(0x4b7bc003)); // 4.75628e-37f, 1.50618e+13f, 2.49284e-13f, 5.7654e-19f, 1.64987e+07f -path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x212128c0)); // -1.31678e-31f, 5.46029e-19f -path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_21(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x6828c6f9), SkBits2Float(0x6614dc9e)); // 3.18811e+24f, 1.75745e+23f -path.cubicTo(SkBits2Float(0x68303469), SkBits2Float(0x661f92fc), SkBits2Float(0x6837d3c3), SkBits2Float(0x662b0eb2), SkBits2Float(0x683fa268), SkBits2Float(0x663759e1)); // 3.32841e+24f, 1.88392e+23f, 3.4724e+24f, 2.01949e+23f, 3.61987e+24f, 2.16463e+23f -path.cubicTo(SkBits2Float(0x68c4391f), SkBits2Float(0x672c5c9f), SkBits2Float(0x688b20ab), SkBits2Float(0x6804b825), SkBits2Float(0x681ddb5e), SkBits2Float(0x6838dc00)); // 7.4131e+24f, 8.13956e+23f, 5.25609e+24f, 2.507e+24f, 2.98183e+24f, 3.49189e+24f -path.lineTo(SkBits2Float(0x6828c6f9), SkBits2Float(0x6614dc9e)); // 3.18811e+24f, 1.75745e+23f -path.close(); -path.moveTo(SkBits2Float(0x68226c73), SkBits2Float(0x660bd15e)); // 3.0681e+24f, 1.65068e+23f -path.cubicTo(SkBits2Float(0x6823b0e1), SkBits2Float(0x660d990f), SkBits2Float(0x6824f6d5), SkBits2Float(0x660f668c), SkBits2Float(0x68263e4e), SkBits2Float(0x66113632)); // 3.09203e+24f, 1.67169e+23f, 3.11609e+24f, 1.69298e+23f, 3.14025e+24f, 1.71436e+23f -path.cubicTo(SkBits2Float(0x682715e4), SkBits2Float(0x6612676d), SkBits2Float(0x6827ee22), SkBits2Float(0x66139997), SkBits2Float(0x6828c709), SkBits2Float(0x6614cba5)); // 3.15616e+24f, 1.72843e+23f, 3.17211e+24f, 1.74255e+23f, 3.18812e+24f, 1.75667e+23f -path.lineTo(SkBits2Float(0x6828d720), SkBits2Float(0x6604a1a2)); // 3.1893e+24f, 1.56583e+23f -path.cubicTo(SkBits2Float(0x68270421), SkBits2Float(0x6601102c), SkBits2Float(0x68252b97), SkBits2Float(0x65fb1edd), SkBits2Float(0x68234ce5), SkBits2Float(0x65f4367f)); // 3.15485e+24f, 1.52371e+23f, 3.11998e+24f, 1.48235e+23f, 3.08466e+24f, 1.44158e+23f -path.conicTo(SkBits2Float(0x6822e012), SkBits2Float(0x6602acc5), SkBits2Float(0x68226c73), SkBits2Float(0x660bd15e), SkBits2Float(0x3f7ffa04)); // 3.07663e+24f, 1.54274e+23f, 3.0681e+24f, 1.65068e+23f, 0.999909f -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f -path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x68617414), SkBits2Float(0x66af1c42), SkBits2Float(0x68624f96), SkBits2Float(0x6757755b), SkBits2Float(0x685b93f2)); // 0, 4.25869e+24f, 4.13468e+23f, 4.27489e+24f, 1.01747e+24f, 4.14771e+24f -path.cubicTo(SkBits2Float(0x67a63a84), SkBits2Float(0x68fe1c37), SkBits2Float(0x67c05eed), SkBits2Float(0x69930962), SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 1.56998e+24f, 9.60001e+24f, 1.81689e+24f, 2.22196e+25f, 0, 5.14279e+25f -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 0, 6.14991e+25f -path.cubicTo(SkBits2Float(0x6a2c8798), SkBits2Float(0x68f7a144), SkBits2Float(0x6951f5ea), SkBits2Float(0x6796ad55), SkBits2Float(0x683fa268), SkBits2Float(0x663759e1)); // 5.21439e+25f, 9.35519e+24f, 1.58642e+25f, 1.4231e+24f, 3.61987e+24f, 2.16463e+23f -path.cubicTo(SkBits2Float(0x683871e3), SkBits2Float(0x66253b4f), SkBits2Float(0x6830da01), SkBits2Float(0x66144d3e), SkBits2Float(0x6828d720), SkBits2Float(0x6604a1a2)); // 3.48407e+24f, 1.95071e+23f, 3.34063e+24f, 1.75084e+23f, 3.1893e+24f, 1.56583e+23f -path.conicTo(SkBits2Float(0x68295b21), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x492bb324)); // 3.19904e+24f, 0, 0, 0, 703282 -path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x677b84f0), SkBits2Float(0x00000000), SkBits2Float(0x68226c73), SkBits2Float(0x660bd15e)); // 0, 0, 1.18777e+24f, 0, 3.0681e+24f, 1.65068e+23f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68156829)); // 0, 2.82222e+24f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f -path.lineTo(SkBits2Float(0x673918f3), SkBits2Float(0x681b0f5f)); // 8.74098e+23f, 2.929e+24f -path.lineTo(SkBits2Float(0x67391759), SkBits2Float(0x681b0fae)); // 8.74068e+23f, 2.92902e+24f -path.cubicTo(SkBits2Float(0x674384e7), SkBits2Float(0x682e2068), SkBits2Float(0x674db698), SkBits2Float(0x6843893b), SkBits2Float(0x6757755b), SkBits2Float(0x685b93f2)); // 9.23313e+23f, 3.28916e+24f, 9.71453e+23f, 3.69357e+24f, 1.01747e+24f, 4.14771e+24f -path.cubicTo(SkBits2Float(0x67a63484), SkBits2Float(0x68556bdd), SkBits2Float(0x67f18c5f), SkBits2Float(0x6848eb25), SkBits2Float(0x681ddb5e), SkBits2Float(0x6838dc00)); // 1.56976e+24f, 4.03142e+24f, 2.28136e+24f, 3.79524e+24f, 2.98183e+24f, 3.49189e+24f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename); -} - -static void fuzz763_22(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x68295b2d)); // 0, 3.19905e+24f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x6a3a7bc0), SkBits2Float(0x00000000)); // 5.63611e+25f, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a034b21)); // 0, 3.9681e+25f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68295b2d)); // 0, 3.19905e+24f -path.close(); -path.moveTo(SkBits2Float(0x6617da56), SkBits2Float(0x00000000)); // 1.79276e+23f, 0 -path.conicTo(SkBits2Float(0x5e704d09), SkBits2Float(0x5e3a4dfd), SkBits2Float(0x00000000), SkBits2Float(0x65eb62ef), SkBits2Float(0x430fa5e6)); // 4.32888e+18f, 3.35617e+18f, 0, 1.38948e+23f, 143.648f -path.conicTo(SkBits2Float(0x5e798b32), SkBits2Float(0x627a95c0), SkBits2Float(0x61f5014c), SkBits2Float(0x61fba0fd), SkBits2Float(0x40f8a1a1)); // 4.49538e+18f, 1.15562e+21f, 5.64943e+20f, 5.80217e+20f, 7.76973f -path.conicTo(SkBits2Float(0x62743d2d), SkBits2Float(0x5e49b862), SkBits2Float(0x6617da56), SkBits2Float(0x00000000), SkBits2Float(0x410ef54c)); // 1.12635e+21f, 3.63387e+18f, 1.79276e+23f, 0, 8.93489f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x4f9a3a8a), SkBits2Float(0xc28a0d28), SkBits2Float(0x273a3ab3), SkBits2Float(0x8b2a2928)); // 5.17506e+09f, -69.0257f, 2.58445e-15f, -3.27718e-32f -path.lineTo(SkBits2Float(0x63283ae6), SkBits2Float(0x27282a81)); // 3.1033e+21f, 2.33377e-15f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); -} - -static void fuzz763_23(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x03210c2a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.73276e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x29295b2d), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, 4.2514e-13f, 3.76046e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x8c5bf055), SkBits2Float(0x2a1f2a55), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, -1.69435e-31f, 1.41367e-13f, 4.7362e-37f, 1.43189e+16f -path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x08211f72), SkBits2Float(0x032a2a21), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2547937a)); // 2.49282e-13f, 4.84861e-34f, 5.00069e-37f, 6.14991e+25f, 1.73105e-16f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f -path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21515d27)); // 2.22225e-15f, 0.000713932f, -732.486f, -1.90686e+27f, 7.09352e-19f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x2a8c54ed), SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003), SkBits2Float(0x29ed846a), SkBits2Float(0x555b2d28)); // 2.49279e-13f, 4.61198e-19f, 1.64987e+07f, 1.05479e-13f, 1.50617e+13f -path.conicTo(SkBits2Float(0x68392d5b), SkBits2Float(0xf0682955), SkBits2Float(0x2a1f5b2d), SkBits2Float(0xef552a21), SkBits2Float(0x5b2d2a8c)); // 3.4979e+24f, -2.87402e+29f, 1.41537e-13f, -6.59712e+28f, 4.8742e+16f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_24(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0xededed02), SkBits2Float(0xedededed)); // -9.20431e+27f, -9.20445e+27f -path.close(); -path.moveTo(SkBits2Float(0xededed02), SkBits2Float(0xedededed)); // -9.20431e+27f, -9.20445e+27f -path.quadTo(SkBits2Float(0x9fb9c16e), SkBits2Float(0x27737375), SkBits2Float(0xb7c5ff00), SkBits2Float(0x00ff9908)); // -7.86706e-20f, 3.37856e-15f, -2.3603e-05f, 2.34729e-38f -path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.cubicTo(SkBits2Float(0x1616ecec), SkBits2Float(0x2c321616), SkBits2Float(0x3516c616), SkBits2Float(0x6e161616), SkBits2Float(0x4c416033), SkBits2Float(0xf6000000)); // 1.21917e-25f, 2.53076e-12f, 5.61676e-07f, 1.16124e+28f, 5.06923e+07f, -6.49037e+32f -path.quadTo(SkBits2Float(0x04007f41), SkBits2Float(0xecececec), SkBits2Float(0xecececec), SkBits2Float(0xecec41ec)); // 1.51048e-36f, -2.2914e+27f, -2.2914e+27f, -2.28494e+27f -path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.close(); -path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.quadTo(SkBits2Float(0x000000ec), SkBits2Float(0xececcc00), SkBits2Float(0x48ececec), SkBits2Float(0x0278806e)); // 3.30706e-43f, -2.29016e+27f, 485223, 1.8257e-37f -path.lineTo(SkBits2Float(0x72ececec), SkBits2Float(0xecec02ec)); // 9.38559e+30f, -2.28256e+27f -path.quadTo(SkBits2Float(0xec04007f), SkBits2Float(0xecececec), SkBits2Float(0xecececec), SkBits2Float(0xecec0400)); // -6.38322e+26f, -2.2914e+27f, -2.2914e+27f, -2.2826e+27f -path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.close(); -path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.quadTo(SkBits2Float(0x000040ec), SkBits2Float(0x3a333300), SkBits2Float(0xecec3333), SkBits2Float(0xececdbec)); // 2.32896e-41f, 0.000683591f, -2.28439e+27f, -2.29076e+27f -path.lineTo(SkBits2Float(0x3300007f), SkBits2Float(0x33d83333)); // 2.98028e-08f, 1.00676e-07f -path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.close(); -path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.quadTo(SkBits2Float(0x9e9ea900), SkBits2Float(0x33ececec), SkBits2Float(0xececec33), SkBits2Float(0xec336e6e)); // -1.67988e-20f, 1.10327e-07f, -2.29138e+27f, -8.67677e+26f -path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.close(); -path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.lineTo(SkBits2Float(0xedededed), SkBits2Float(0xedededed)); // -9.20445e+27f, -9.20445e+27f -path.lineTo(SkBits2Float(0xecececec), SkBits2Float(0xecececec)); // -2.2914e+27f, -2.2914e+27f -path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.close(); -path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.lineTo(SkBits2Float(0x01003300), SkBits2Float(0x33d83333)); // 2.35465e-38f, 1.00676e-07f -path.quadTo(SkBits2Float(0xecec3333), SkBits2Float(0x04eeedec), SkBits2Float(0xe0e0e0e0), SkBits2Float(0x9ee0e0e0)); // -2.28439e+27f, 5.6172e-36f, -1.29634e+20f, -2.38099e-20f -path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.close(); -path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f -path.cubicTo(SkBits2Float(0x299e9e9e), SkBits2Float(0xecececec), SkBits2Float(0xececb6ec), SkBits2Float(0xf0ececec), SkBits2Float(0x0000ecec), SkBits2Float(0x9ebe6e6e)); // 7.04413e-14f, -2.2914e+27f, -2.28936e+27f, -5.86599e+29f, 8.49916e-41f, -2.01627e-20f -path.cubicTo(SkBits2Float(0x9e9e9e9e), SkBits2Float(0xe8009e9e), SkBits2Float(0x9e9e9e9e), SkBits2Float(0xecec9e9e), SkBits2Float(0xec3333ec), SkBits2Float(0xececf0ec)); // -1.67945e-20f, -2.42956e+24f, -1.67945e-20f, -2.28844e+27f, -8.66572e+26f, -2.29155e+27f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz763_25(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 0, 6.14991e+25f -path.conicTo(SkBits2Float(0x653140d9), SkBits2Float(0x6a4b4f74), SkBits2Float(0x65906630), SkBits2Float(0x6a25a070), SkBits2Float(0x3f6728a2)); // 5.23159e+22f, 6.14468e+25f, 8.52382e+22f, 5.00576e+25f, 0.902964f -path.cubicTo(SkBits2Float(0x68295bc5), SkBits2Float(0x00000000), SkBits2Float(0x682958ff), SkBits2Float(0x00000000), SkBits2Float(0x68286829), SkBits2Float(0x00000000)); // 3.19909e+24f, 0, 3.19889e+24f, 0, 3.18112e+24f, 0 -path.lineTo(SkBits2Float(0x68555b29), SkBits2Float(0x00000000)); // 4.03018e+24f, 0 -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x682d2927), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x6829686f)); // 0, 3.27091e+24f, 0, 0, 3.20003e+24f -path.lineTo(SkBits2Float(0xdf218a28), SkBits2Float(0x00000000)); // -1.16402e+19f, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 0, 6.14991e+25f -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x6642c40c), SkBits2Float(0x00000000), SkBits2Float(0x65906630), SkBits2Float(0x6a25a070), SkBits2Float(0x3edcd74d)); // 2.29939e+23f, 0, 8.52382e+22f, 5.00576e+25f, 0.43133f -path.conicTo(SkBits2Float(0x68295afa), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x4277a57b)); // 3.19903e+24f, 0, 0, 0, 61.9116f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - - -static void fuzz763_26(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc003210a)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68372d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.46012e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x68385b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212121), SkBits2Float(0x5a4b7bc0)); // 3.48239e+24f, 1.51141e+13f, 1.41368e-13f, 4.73517e-37f, 1.43189e+16f -path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 1.31626e+28f, 4.7323e-37f, 6.14991e+25f, 75739 -path.lineTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0x2c213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, 2.29121e-12f -path.lineTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2127ed29)); // 2.25206e-21f, 300.343f, 0.000650423f, 5.68957e-19f -path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f -path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2769), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21512727)); // 2.22225e-15f, 0.000713936f, -732.486f, -1.90686e+27f, 7.08638e-19f -path.lineTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x5b2d5529)); // 4.03114e+24f, 4.87888e+16f -path.moveTo(SkBits2Float(0x1f2a322a), SkBits2Float(0xc0032108)); // 3.60404e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05bd24b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0xed4b7bc0)); // 4.06458e+24f, -2.72126e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, -3.93594e+27f -path.conicTo(SkBits2Float(0x212a8c6a), SkBits2Float(0x0329081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77841e-19f, 4.9674e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x555b1b29), SkBits2Float(0x6c212a8c)); // 1.50569e+13f, 7.79352e+26f -path.conicTo(SkBits2Float(0x084b0321), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0x8c5bf055), SkBits2Float(0x1f212a3a)); // 6.10918e-34f, 1.16348e+26f, 0.000209024f, -1.69435e-31f, 3.4128e-20f -path.conicTo(SkBits2Float(0x290321d9), SkBits2Float(0x555b2d68), SkBits2Float(0x2a8c558c), SkBits2Float(0x2a212a1f), SkBits2Float(0x7bc00321)); // 2.91172e-14f, 1.50618e+13f, 2.49284e-13f, 1.43143e-13f, 1.99397e+36f -path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x1f2128c0)); // -1.31678e-31f, 3.41268e-20f -path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_28(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68302d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6aa37bc0)); // 3.32789e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-37f, 9.88197e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2d28ed84), SkBits2Float(0x5b2d2955)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.60243e-12f, 4.87406e+16f -path.moveTo(SkBits2Float(0x6c395b2d), SkBits2Float(0xf0682955)); // 8.96327e+26f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef8c55), SkBits2Float(0x68295b2d), SkBits2Float(0x21086855), SkBits2Float(0x4b7bc003)); // 5.76397e-19f, 4.25523e-13f, 3.19905e+24f, 4.62167e-19f, 1.64987e+07f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.lineTo(SkBits2Float(0x8a283a28), SkBits2Float(0x284f1a3a)); // -8.09984e-33f, 1.14965e-14f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x272a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 2.36623e-15f, 0.000649768f -path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f, 2.34747e-15f -path.conicTo(SkBits2Float(0x381f203a), SkBits2Float(0x2ac422c5), SkBits2Float(0xc25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x2a105152)); // 3.79386e-05f, 3.48407e-13f, -55.289f, 0.000916855f, 1.2818e-13f -path.quadTo(SkBits2Float(0x633ad912), SkBits2Float(0x29c80927), SkBits2Float(0x272927b0), SkBits2Float(0x683a5b2d)); // 3.44674e+21f, 8.88337e-14f, 2.3475e-15f, 3.52017e+24f -path.lineTo(SkBits2Float(0x295b2d68), SkBits2Float(0x29685568)); // 4.86672e-14f, 5.15884e-14f -path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 1.89339e-13f -path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a688c5b), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x8c08555b), SkBits2Float(0x2a2a29ca)); // 5.73801e-19f, 2.06544e-13f, 3.19905e+24f, 9.6297e-12f, -1.05027e-31f, 1.51135e-13f -path.quadTo(SkBits2Float(0x68295b21), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21)); // 3.19904e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f -path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.close(); -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x5b2d6829), SkBits2Float(0x1f212a55), SkBits2Float(0x8ced7aba), SkBits2Float(0x3f2a212a)); // 6.14991e+25f, 4.88097e+16f, 3.41281e-20f, -3.65895e-31f, 0.664569f -path.lineTo(SkBits2Float(0x5b2d212d), SkBits2Float(0x2d556829)); // 4.87316e+16f, 1.21308e-11f -path.moveTo(SkBits2Float(0x68552968), SkBits2Float(0x5568295b)); // 4.02651e+24f, 1.5954e+13f -path.moveTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55)); // 4.87407e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x2147ed7a), SkBits2Float(0x28282a3a)); // 5.77848e-19f, 4.7323e-37f, 5.63611e+25f, 6.77381e-19f, 9.33503e-15f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_27(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x30309ab8), SkBits2Float(0x305b3030), SkBits2Float(0x00f53030), SkBits2Float(0x3a3a0000)); // 6.42483e-10f, 7.97402e-10f, 2.2517e-38f, 0.000709534f -path.quadTo(SkBits2Float(0xb8b8d5b8), SkBits2Float(0x0b0b0b03), SkBits2Float(0x0b0b0b0b), SkBits2Float(0x3a3a0b0b)); // -8.81361e-05f, 2.67787e-32f, 2.67787e-32f, 0.000709698f -path.quadTo(SkBits2Float(0xb8b8b8b8), SkBits2Float(0x0b1203b8), SkBits2Float(0x0b0b0b0b), SkBits2Float(0x3a3a2110)); // -8.80821e-05f, 2.81214e-32f, 2.67787e-32f, 0.000710026f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_29(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x743e0000)); // 0, 6.02134e+31f -path.cubicTo(SkBits2Float(0x74083cf1), SkBits2Float(0x74536e73), SkBits2Float(0x742ac4e4), SkBits2Float(0x7415f5be), SkBits2Float(0x7433ee3c), SkBits2Float(0x7405a69a)); // 4.31756e+31f, 6.70053e+31f, 5.41189e+31f, 4.75242e+31f, 5.70223e+31f, 4.23556e+31f -path.quadTo(SkBits2Float(0x74360ca0), SkBits2Float(0x7401e10c), SkBits2Float(0x7436a382), SkBits2Float(0x7401cc18)); // 5.76937e+31f, 4.11603e+31f, 5.78805e+31f, 4.11344e+31f -path.cubicTo(SkBits2Float(0x74374a91), SkBits2Float(0x7401ef19), SkBits2Float(0x74375c84), SkBits2Float(0x7404d9b9), SkBits2Float(0x7437868f), SkBits2Float(0x740bae8a)); // 5.80873e+31f, 4.11777e+31f, 5.81095e+31f, 4.2102e+31f, 5.81616e+31f, 4.42669e+31f -path.cubicTo(SkBits2Float(0x7437d6c1), SkBits2Float(0x7418b629), SkBits2Float(0x74387e9b), SkBits2Float(0x7433fbc5), SkBits2Float(0x743e2ff7), SkBits2Float(0x74655fa2)); // 5.82609e+31f, 4.83962e+31f, 5.84687e+31f, 5.7039e+31f, 6.02728e+31f, 7.26914e+31f -path.cubicTo(SkBits2Float(0x741ada75), SkBits2Float(0x74745717), SkBits2Float(0x73c106b4), SkBits2Float(0x74744e64), SkBits2Float(0x00000000), SkBits2Float(0x74744006)); // 4.9075e+31f, 7.74345e+31f, 3.05862e+31f, 7.74237e+31f, 0, 7.74059e+31f -path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x74746c7c), SkBits2Float(0x74244dce), SkBits2Float(0x7474733e), SkBits2Float(0x74400000), SkBits2Float(0x74747445)); // 0, 7.7461e+31f, 5.207e+31f, 7.74693e+31f, 6.08472e+31f, 7.74706e+31f -path.cubicTo(SkBits2Float(0x743f5854), SkBits2Float(0x746f3659), SkBits2Float(0x743ebe05), SkBits2Float(0x746a3017), SkBits2Float(0x743e2ff7), SkBits2Float(0x74655fa2)); // 6.06397e+31f, 7.58094e+31f, 6.04486e+31f, 7.42171e+31f, 6.02728e+31f, 7.26914e+31f -path.cubicTo(SkBits2Float(0x7447a582), SkBits2Float(0x74615dee), SkBits2Float(0x744f74f6), SkBits2Float(0x745c4903), SkBits2Float(0x7455e7e6), SkBits2Float(0x7455d751)); // 6.32705e+31f, 7.14216e+31f, 6.57457e+31f, 6.98112e+31f, 6.77895e+31f, 6.77689e+31f -path.cubicTo(SkBits2Float(0x74747474), SkBits2Float(0x743750a4), SkBits2Float(0x74747474), SkBits2Float(0x73f46f0d), SkBits2Float(0x74747474), SkBits2Float(0x00000000)); // 7.74708e+31f, 5.80948e+31f, 7.74708e+31f, 3.87321e+31f, 7.74708e+31f, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0xf0682955), SkBits2Float(0x211f5b2d)); // -2.87402e+29f, 5.3992e-19f -path.moveTo(SkBits2Float(0x2d2aff2d), SkBits2Float(0x74747474)); // 9.72004e-12f, 7.74708e+31f -path.cubicTo(SkBits2Float(0x7474748e), SkBits2Float(0x74747490), SkBits2Float(0x8c722174), SkBits2Float(0x181f0080), SkBits2Float(0x74c0e520), SkBits2Float(0x747d7463)); // 7.7471e+31f, 7.7471e+31f, -1.86531e-31f, 2.05505e-24f, 1.22262e+32f, 8.0323e+31f -path.cubicTo(SkBits2Float(0x7b005e4b), SkBits2Float(0xdf3a6a3a), SkBits2Float(0x2a3a2848), SkBits2Float(0x2d2d7821), SkBits2Float(0x8c55212d), SkBits2Float(0x2d2d2d24)); // 6.66526e+35f, -1.34326e+19f, 1.65341e-13f, 9.86059e-12f, -1.64189e-31f, 9.84393e-12f -path.conicTo(SkBits2Float(0xde28804c), SkBits2Float(0x28e03721), SkBits2Float(0x3329df28), SkBits2Float(0x2d291515), SkBits2Float(0x0568295b)); // -3.03545e+18f, 2.48929e-14f, 3.95513e-08f, 9.61122e-12f, 1.09162e-35f -path.conicTo(SkBits2Float(0x556a2d21), SkBits2Float(0x21088c2a), SkBits2Float(0x3a333303), SkBits2Float(0x5b293a8a), SkBits2Float(0x6855683b)); // 1.60925e+13f, 4.62641e-19f, 0.000683591f, 4.76336e+16f, 4.03115e+24f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_30(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x1f2108c0), SkBits2Float(0x4b7b0321)); // 3.41003e-20f, 1.64503e+07f -path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x2a4b7bc0), SkBits2Float(0x68295b2d)); // 2.49282e-13f, 1.31626e+28f, 4.7323e-37f, 1.8073e-13f, 3.19905e+24f -path.lineTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55)); // 4.87407e+16f, 5.7784e-19f -path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x4b7b28c0)); // 4.7323e-37f, 1.646e+07f -path.lineTo(SkBits2Float(0x2a8ced7a), SkBits2Float(0x2d081f21)); // 2.50338e-13f, 7.73762e-12f -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x69392d55), SkBits2Float(0x2d5b684b), SkBits2Float(0x8c5527f0), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 1.39916e+25f, 1.24719e-11f, -1.64209e-31f, 5.76395e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0xed7a6a1f), SkBits2Float(0x3a214793), SkBits2Float(0x3328282a), SkBits2Float(0x3a8a3adf)); // 5.77848e-19f, -4.84372e+27f, 0.000615233f, 3.91521e-08f, 0.00105461f -path.conicTo(SkBits2Float(0x4be80304), SkBits2Float(0xdcdcdc15), SkBits2Float(0xdcdcdcdc), SkBits2Float(0x71dcdcdc), SkBits2Float(0x6c107164)); // 3.04102e+07f, -4.97332e+17f, -4.97339e+17f, 2.18732e+30f, 6.98483e+26f -path.conicTo(SkBits2Float(0x6c0f1d6c), SkBits2Float(0x8e406c6e), SkBits2Float(0x6c6c0200), SkBits2Float(0x6c6ce46c), SkBits2Float(0x6c6c6c6c)); // 6.92061e+26f, -2.3718e-30f, 1.14126e+27f, 1.14554e+27f, 1.14327e+27f -path.lineTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.close(); -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.quadTo(SkBits2Float(0x3ab38a28), SkBits2Float(0x3ac22c21), SkBits2Float(0x6c401057), SkBits2Float(0x6d6d6b64)); // 0.00136978f, 0.00148142f, 9.28764e+26f, 4.59236e+27f -path.cubicTo(SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x286d6d6d), SkBits2Float(0x081d2a29), SkBits2Float(0x6d690321), SkBits2Float(0x6b6b026d)); // 4.59251e+27f, 4.59251e+27f, 1.31799e-14f, 4.7295e-34f, 4.50711e+27f, 2.84109e+26f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz763_31(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0xd72a8c55), SkBits2Float(0x61081f2a)); // -1.8752e+14f, 1.56938e+20f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0xdf3a2128), SkBits2Float(0x471ac575)); // 6.14991e+25f, 75739, 9.4495e-15f, -1.3412e+19f, 39621.5f -path.lineTo(SkBits2Float(0x28404040), SkBits2Float(0x552a298a)); // 1.06721e-14f, 1.16935e+13f -path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x80ed7a3a), SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828), SkBits2Float(0x4f1a3a3a)); // 6.14991e+25f, -2.18089e-38f, 1.65317e-13f, -1.16126e+19f, 2.58751e+09f -path.lineTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f -path.close(); -path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f -path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x432a2928), SkBits2Float(0x96812be6), SkBits2Float(0x272a1d2a), SkBits2Float(0x3a2a3529), SkBits2Float(0x3b1e2ab0)); // 0.00148109f, 170.161f, -2.08688e-25f, 2.3608e-15f, 0.000649291f, 0.00241343f -path.lineTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f -path.close(); -path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f -path.cubicTo(SkBits2Float(0xc5272927), SkBits2Float(0x22383b39), SkBits2Float(0x1051523a), SkBits2Float(0x2927b029), SkBits2Float(0x685b2d27), SkBits2Float(0x5b2d6855)); // -2674.57f, 2.4968e-18f, 4.12813e-29f, 3.72342e-14f, 4.14012e+24f, 4.88099e+16f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_33(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 7.66623e+30f, 7.66608e+30f -path.quadTo(SkBits2Float(0x724341bf), SkBits2Float(0x72433fc4), SkBits2Float(0x6d757575), SkBits2Float(0x6d6d6d6d)); // 3.86746e+30f, 3.86731e+30f, 4.74786e+27f, 4.59251e+27f -path.cubicTo(SkBits2Float(0x6d18b5e5), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6cbe03bd), SkBits2Float(0x6d4b455b), SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d20df31)); // 2.95385e+27f, 4.59251e+27f, 1.83771e+27f, 3.93183e+27f, 1.14323e+27f, 3.11171e+27f -path.conicTo(SkBits2Float(0x6c6c8b72), SkBits2Float(0x00000000), SkBits2Float(0x6c6c6c6c), SkBits2Float(0x00000000), SkBits2Float(0x400812df)); // 1.14386e+27f, 0, 1.14327e+27f, 0, 2.12615f -path.quadTo(SkBits2Float(0x72432acb), SkBits2Float(0x72432295), SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 3.86568e+30f, 3.86505e+30f, 7.66623e+30f, 7.66608e+30f -path.close(); -path.moveTo(SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 7.66623e+30f, 7.66608e+30f -path.cubicTo(SkBits2Float(0x74f97d76), SkBits2Float(0x74f97d90), SkBits2Float(0x75381628), SkBits2Float(0x7538182c), SkBits2Float(0x7538153b), SkBits2Float(0x75381835)); // 1.58133e+32f, 1.58133e+32f, 2.33357e+32f, 2.33367e+32f, 2.33353e+32f, 2.33368e+32f -path.cubicTo(SkBits2Float(0x7538144e), SkBits2Float(0x7538183f), SkBits2Float(0x74f9760f), SkBits2Float(0x74f97ddd), SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 2.33348e+32f, 2.33368e+32f, 1.58115e+32f, 1.58134e+32f, 7.66623e+30f, 7.66608e+30f -path.close(); -path.moveTo(SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d20df31)); // 1.14323e+27f, 3.11171e+27f -path.conicTo(SkBits2Float(0x6c6c55ae), SkBits2Float(0x6d80b520), SkBits2Float(0x6c6c1071), SkBits2Float(0x6e0f1d6c), SkBits2Float(0x3f96e656)); // 1.14284e+27f, 4.97913e+27f, 1.14154e+27f, 1.1073e+28f, 1.1789f -path.lineTo(SkBits2Float(0x6a674231), SkBits2Float(0x6c0c3394)); // 6.98936e+25f, 6.77973e+26f -path.cubicTo(SkBits2Float(0x6b12c63f), SkBits2Float(0x6c881439), SkBits2Float(0x6bba4ae5), SkBits2Float(0x6ced1e23), SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d20df31)); // 1.77439e+26f, 1.31608e+27f, 4.50428e+26f, 2.29326e+27f, 1.14323e+27f, 3.11171e+27f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x6c6b6ba7), SkBits2Float(0x886b6b6b)); // 1.13842e+27f, -7.0844e-34f -path.quadTo(SkBits2Float(0x0000206b), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d)); // 1.16294e-41f, 4.59251e+27f, 4.59251e+27f, 4.59251e+27f -path.conicTo(SkBits2Float(0x3e3e3e3e), SkBits2Float(0xafbcad20), SkBits2Float(0x78787878), SkBits2Float(0x78787829), SkBits2Float(0x78787878)); // 0.185784f, -3.432e-10f, 2.01583e+34f, 2.01582e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x95066b78)); // 2.01583e+34f, -2.71459e-26f -path.lineTo(SkBits2Float(0x6c6b6ba7), SkBits2Float(0x886b6b6b)); // 1.13842e+27f, -7.0844e-34f -path.quadTo(SkBits2Float(0x0000206b), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d)); // 1.16294e-41f, 4.59251e+27f, 4.59251e+27f, 4.59251e+27f -path.conicTo(SkBits2Float(0x3e3e3e3e), SkBits2Float(0xafbcad20), SkBits2Float(0x78787878), SkBits2Float(0x78787829), SkBits2Float(0x78787878)); // 0.185784f, -3.432e-10f, 2.01583e+34f, 2.01582e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x8787878f), SkBits2Float(0x87878787)); // -2.03922e-34f, -2.03922e-34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x6c105778), SkBits2Float(0x6d406b64)); // 6.97994e+26f, 3.72193e+27f -path.cubicTo(SkBits2Float(0x7575756d), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x6d6d7575), SkBits2Float(0x6d6d6d6d)); // 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 4.59312e+27f, 4.59251e+27f -path.cubicTo(SkBits2Float(0x6d696d6d), SkBits2Float(0x026d6d6d), SkBits2Float(0x80bc6b6b), SkBits2Float(0xaebcdfd0), SkBits2Float(0x7878bcac), SkBits2Float(0x78787878)); // 4.51514e+27f, 1.74434e-37f, -1.73036e-38f, -8.58901e-11f, 2.01799e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0xb4bcacbc), SkBits2Float(0xbcadbcbc)); // -3.51434e-07f, -0.0212082f -path.moveTo(SkBits2Float(0xa03aacbc), SkBits2Float(0x757575a0)); // -1.5812e-19f, 3.11157e+32f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_32(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.cubicTo(SkBits2Float(0xdedcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0x55dcdcdc), SkBits2Float(0x29407d7f)); // -7.95742e+18f, -4.97339e+17f, -4.97339e+17f, -4.97339e+17f, 3.03551e+13f, 4.27414e-14f -path.cubicTo(SkBits2Float(0x7b93ed4b), SkBits2Float(0x29521472), SkBits2Float(0xdfc83c28), SkBits2Float(0x1a3a834e), SkBits2Float(0x6855e84f), SkBits2Float(0xf2f22a80)); // 1.53616e+36f, 4.66471e-14f, -2.88569e+19f, 3.857e-23f, 4.0406e+24f, -9.59318e+30f -path.moveTo(SkBits2Float(0xe0f2f210), SkBits2Float(0xc3f2eef2)); // -1.40049e+20f, -485.867f -path.cubicTo(SkBits2Float(0x108ced7a), SkBits2Float(0x7bc00308), SkBits2Float(0x287a6a3a), SkBits2Float(0x242847ed), SkBits2Float(0x2bcb302a), SkBits2Float(0xf21003e8)); // 5.55862e-29f, 1.99396e+36f, 1.39008e-14f, 3.64901e-17f, 1.44374e-12f, -2.85252e+30f -path.moveTo(SkBits2Float(0x556c0010), SkBits2Float(0x002a8768)); // 1.62178e+13f, 3.90567e-39f -path.quadTo(SkBits2Float(0xf2f22021), SkBits2Float(0xf2f2f56e), SkBits2Float(0xf2f2f2f2), SkBits2Float(0xf22040d9)); // -9.59158e+30f, -9.62459e+30f, -9.6242e+30f, -3.17414e+30f -path.lineTo(SkBits2Float(0xc013f2f2), SkBits2Float(0x0000294d)); // -2.3117f, 1.48159e-41f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_34(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f -path.quadTo(SkBits2Float(0x63690f37), SkBits2Float(0x6d0a3d9b), SkBits2Float(0x00000000), SkBits2Float(0x6d3e3e3e)); // 4.29919e+21f, 2.67396e+27f, 0, 3.67984e+27f -path.conicTo(SkBits2Float(0x6b9253fc), SkBits2Float(0x6c956a8b), SkBits2Float(0x6c6ac798), SkBits2Float(0x692a5d27), SkBits2Float(0x3e56eb72)); // 3.538e+26f, 1.44506e+27f, 1.13532e+27f, 1.28723e+25f, 0.209883f -path.lineTo(SkBits2Float(0x6c6c586c), SkBits2Float(0x00000000)); // 1.1429e+27f, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x6c8c6c6c), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x6cc8e82a), SkBits2Float(0x5b684b68)); // 1.35809e+27f, 0, 0, 1.94305e+27f, 6.53851e+16f -path.lineTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f -path.close(); -path.moveTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f -path.quadTo(SkBits2Float(0x641ae35f), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 1.14287e+22f, 0, 0, 0 -path.lineTo(SkBits2Float(0x6c6c586c), SkBits2Float(0x00000000)); // 1.1429e+27f, 0 -path.conicTo(SkBits2Float(0x6c6ba1fc), SkBits2Float(0x688c9eb1), SkBits2Float(0x6c6ac798), SkBits2Float(0x692a5d27), SkBits2Float(0x3f7fec32)); // 1.13945e+27f, 5.31247e+24f, 1.13532e+27f, 1.28723e+25f, 0.999698f -path.lineTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x6c3e3e3e), SkBits2Float(0x586c79ff)); // 9.19959e+26f, 1.04003e+15f -path.quadTo(SkBits2Float(0x6c6c4a6c), SkBits2Float(0x6c6c6c6c), SkBits2Float(0xc83e6c6c), SkBits2Float(0x3e313e3e)); // 1.14263e+27f, 1.14327e+27f, -194994, 0.173089f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz763_36(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f -path.moveTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f -path.lineTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.conicTo(SkBits2Float(0x212a081f), SkBits2Float(0x4b7bc003), SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556839), SkBits2Float(0x2a8c555b)); // 5.7609e-19f, 1.64987e+07f, 4.88298e+16f, -2.64185e+29f, 2.49282e-13f -path.conicTo(SkBits2Float(0xf42a212a), SkBits2Float(0x4b7bc003), SkBits2Float(0x2aed7a39), SkBits2Float(0x2108c08c), SkBits2Float(0x7b03211f)); // -5.39162e+31f, 1.64987e+07f, 4.21845e-13f, 4.63334e-19f, 6.80863e+35f -path.lineTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f -path.close(); -path.moveTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f -path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x03210807), SkBits2Float(0x6a4b7b28), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 5.76399e-19f, 4.73229e-37f, 6.14984e+25f, 75739 -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x282a282a), SkBits2Float(0x8a3adf21), SkBits2Float(0x284f1a3a), SkBits2Float(0x213ab38a)); // 9.4456e-15f, -8.99754e-33f, 1.14965e-14f, 6.32569e-19f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a20002a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000610354f, 2.50336e-13f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0xed210830), SkBits2Float(0xc04b6a03), SkBits2Float(0x68297b27), SkBits2Float(0x55555b2d), SkBits2Float(0x2ab03a2a)); // -3.11481e+27f, -3.17835f, 3.20141e+24f, 1.46617e+13f, 3.13042e-13f -path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4341f20), SkBits2Float(0xecc52a22)); // 2.22225e-15f, 0.000713932f, -720.486f, -1.90686e+27f -path.cubicTo(SkBits2Float(0x5921c25d), SkBits2Float(0x29523a70), SkBits2Float(0x555b2d68), SkBits2Float(0x1f212a8c), SkBits2Float(0x0321d90a), SkBits2Float(0x5b2d6829)); // 2.8457e+15f, 4.66801e-14f, 1.50618e+13f, 3.41283e-20f, 4.75628e-37f, 4.88097e+16f -path.lineTo(SkBits2Float(0x1f2a2a8c), SkBits2Float(0x03210821)); // 3.60341e-20f, 4.7323e-37f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x2eed6a7a), SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28), SkBits2Float(0x4f1a3a8a), SkBits2Float(0x3ab38a28)); // 1.07964e-10f, 9.4495e-15f, 0.000617492f, 2.58753e+09f, 0.00136978f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0xe61d2a28), SkBits2Float(0x2a43962b), SkBits2Float(0x29272a81), SkBits2Float(0x2bb02a55)); // -1.85547e+23f, 1.73716e-13f, 3.71183e-14f, 1.25173e-12f -path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3ac52729), SkBits2Float(0xc4223b32), SkBits2Float(0x6c2a201f)); // 2.22225e-15f, 0.00150416f, -648.925f, 8.22676e+26f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_35(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x2aed2a8c), SkBits2Float(0x03210a1f)); // 4.21292e-13f, 4.73253e-37f -path.conicTo(SkBits2Float(0x0000007b), SkBits2Float(0x7474747f), SkBits2Float(0x74747474), SkBits2Float(0x747474c4), SkBits2Float(0x74747474)); // 1.7236e-43f, 7.74709e+31f, 7.74708e+31f, 7.74712e+31f, 7.74708e+31f -path.quadTo(SkBits2Float(0x74747474), SkBits2Float(0x74747474), SkBits2Float(0x20437474), SkBits2Float(0x43a52b02)); // 7.74708e+31f, 7.74708e+31f, 1.65557e-19f, 330.336f -path.moveTo(SkBits2Float(0x3a214781), SkBits2Float(0x2128282a)); // 0.000615232f, 5.69738e-19f -path.lineTo(SkBits2Float(0x4b7bd603), SkBits2Float(0x6cf33b6a)); // 1.65043e+07f, 2.3524e+27f -path.conicTo(SkBits2Float(0x35778caa), SkBits2Float(0x0000002a), SkBits2Float(0x74742164), SkBits2Float(0x2a3a7474), SkBits2Float(0x4cc22157)); // 9.22194e-07f, 5.88545e-44f, 7.7368e+31f, 1.65605e-13f, 1.0178e+08f -path.cubicTo(SkBits2Float(0x21479321), SkBits2Float(0x23434cc2), SkBits2Float(0x3a214793), SkBits2Float(0x2128282a), SkBits2Float(0x323adf81), SkBits2Float(0x77291a3a)); // 6.76185e-19f, 1.05872e-17f, 0.000615233f, 5.69738e-19f, 1.08774e-08f, 3.42981e+33f -path.conicTo(SkBits2Float(0x0000002a), SkBits2Float(0x7474743e), SkBits2Float(0x74747474), SkBits2Float(0x74746474), SkBits2Float(0x74747474)); // 5.88545e-44f, 7.74706e+31f, 7.74708e+31f, 7.7451e+31f, 7.74708e+31f -path.cubicTo(SkBits2Float(0x21e7fc06), SkBits2Float(0x2a212a59), SkBits2Float(0x0321081f), SkBits2Float(0x00002a35), SkBits2Float(0x74744000), SkBits2Float(0x2974e874)); // 1.57199e-18f, 1.43144e-13f, 4.7323e-37f, 1.5141e-41f, 7.74059e+31f, 5.43805e-14f -path.cubicTo(SkBits2Float(0x74647474), SkBits2Float(0x74747474), SkBits2Float(0x12ec7474), SkBits2Float(0x4cc22147), SkBits2Float(0x47932343), SkBits2Float(0x282a3a21)); // 7.24002e+31f, 7.74708e+31f, 1.49224e-27f, 1.0178e+08f, 75334.5f, 9.4495e-15f -path.lineTo(SkBits2Float(0x3a214781), SkBits2Float(0x2128282a)); // 0.000615232f, 5.69738e-19f -path.close(); -path.moveTo(SkBits2Float(0x3a214781), SkBits2Float(0x2128282a)); // 0.000615232f, 5.69738e-19f -path.conicTo(SkBits2Float(0x3a323adf), SkBits2Float(0x4977291a), SkBits2Float(0x0000002a), SkBits2Float(0x7474743e), SkBits2Float(0x74747474)); // 0.000679893f, 1.01237e+06f, 5.88545e-44f, 7.74706e+31f, 7.74708e+31f -path.cubicTo(SkBits2Float(0x74747464), SkBits2Float(0x74747474), SkBits2Float(0x21e7fc06), SkBits2Float(0x2a212a59), SkBits2Float(0x0321081f), SkBits2Float(0x00002a35)); // 7.74708e+31f, 7.74708e+31f, 1.57199e-18f, 1.43144e-13f, 4.7323e-37f, 1.5141e-41f -path.moveTo(SkBits2Float(0x74747440), SkBits2Float(0x742974e8)); // 7.74706e+31f, 5.3703e+31f -path.cubicTo(SkBits2Float(0x74746474), SkBits2Float(0x74747474), SkBits2Float(0xd912ec74), SkBits2Float(0x553a3728), SkBits2Float(0x29202a8c), SkBits2Float(0x5555201b)); // 7.7451e+31f, 7.74708e+31f, -2.58471e+15f, 1.27966e+13f, 3.5564e-14f, 1.46459e+13f -path.moveTo(SkBits2Float(0x31292768), SkBits2Float(0x212d2aff)); // 2.46151e-09f, 5.86716e-19f -path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x323adf81), SkBits2Float(0x77291a3a), SkBits2Float(0x00002a49)); // 5.69738e-19f, 1.08774e-08f, 3.42981e+33f, 1.51691e-41f -path.moveTo(SkBits2Float(0x7474743e), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f -path.cubicTo(SkBits2Float(0x74747464), SkBits2Float(0x74747474), SkBits2Float(0x21e7fc06), SkBits2Float(0x2a212a59), SkBits2Float(0x0321081f), SkBits2Float(0x00002a35)); // 7.74708e+31f, 7.74708e+31f, 1.57199e-18f, 1.43144e-13f, 4.7323e-37f, 1.5141e-41f -path.moveTo(SkBits2Float(0x74747440), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f -path.cubicTo(SkBits2Float(0x74747464), SkBits2Float(0x74747474), SkBits2Float(0x43747474), SkBits2Float(0xa52b0220), SkBits2Float(0x47812a43), SkBits2Float(0x282a3a21)); // 7.74708e+31f, 7.74708e+31f, 244.455f, -1.48326e-16f, 66132.5f, 9.4495e-15f -path.lineTo(SkBits2Float(0x74747440), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f -path.close(); -path.moveTo(SkBits2Float(0x74747440), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f -path.conicTo(SkBits2Float(0x3a323adf), SkBits2Float(0x19433b1a), SkBits2Float(0x5921e7fc), SkBits2Float(0x1f2a212a), SkBits2Float(0x35032108)); // 0.000679893f, 1.00932e-23f, 2.84828e+15f, 3.60263e-20f, 4.88494e-07f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_37(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x5568392a), SkBits2Float(0x5b2d3368)); // 1.59583e+13f, 4.87517e+16f -path.conicTo(SkBits2Float(0x5b2d555b), SkBits2Float(0x68275b2d), SkBits2Float(0x21685527), SkBits2Float(0x0321082a), SkBits2Float(0x6ab485c0)); // 4.8789e+16f, 3.16127e+24f, 7.87174e-19f, 4.7323e-37f, 1.09119e+26f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 4.8745e+16f -path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2a8cef2a), SkBits2Float(0x682d2953), SkBits2Float(0xee682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 2.50349e-13f, 3.27093e+24f, -1.79601e+28f, 1.64988e+07f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.conicTo(SkBits2Float(0x4b03213b), SkBits2Float(0xc07b2a08), SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556830), SkBits2Float(0x2a8c555b)); // 8.59372e+06f, -3.92444f, 4.88298e+16f, -2.64185e+29f, 2.49282e-13f -path.conicTo(SkBits2Float(0x0321212a), SkBits2Float(0x4b7bd2c0), SkBits2Float(0xed7ac039), SkBits2Float(0x2f218c08), SkBits2Float(0x1f037b2a)); // 4.73517e-37f, 1.65035e+07f, -4.85023e+27f, 1.46926e-10f, 2.78422e-20f -path.lineTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f -path.close(); -path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f -path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x721f2a5b), SkBits2Float(0x212a8c55), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7b28), SkBits2Float(0x4793ed7a)); // 3.1526e+30f, 5.7784e-19f, 4.7323e-37f, 6.14984e+25f, 75739 -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x28282a2a), SkBits2Float(0x2c682921), SkBits2Float(0x8c555bf6), SkBits2Float(0x6d03de30)); // 9.33502e-15f, 3.2992e-12f, -1.64366e-31f, 2.5507e+27f -path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x081f2a21)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 4.78968e-34f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0xdf93ed7a), SkBits2Float(0x1a3a803a), SkBits2Float(0xb38a294f), SkBits2Float(0x3ac2213a)); // 6.14991e+25f, -2.13186e+19f, 3.85675e-23f, -6.43364e-08f, 0.00148109f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0xe62b291d), SkBits2Float(0x2a812a43), SkBits2Float(0x8ced093a), SkBits2Float(0xb38a5c5c), SkBits2Float(0x3ac2213a)); // -2.02071e+23f, 2.29443e-13f, -3.65212e-31f, -6.44293e-08f, 0.00148109f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.lineTo(SkBits2Float(0x8ced293a), SkBits2Float(0x5c5c5c5c)); // -3.65404e-31f, 2.48104e+17f -path.moveTo(SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003)); // 4.61198e-19f, 1.64987e+07f -path.lineTo(SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 9.43289e-15f, 4.8745e+16f -path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5a)); // 3.50084e+24f, -2.87489e+29f -path.lineTo(SkBits2Float(0x682d2952), SkBits2Float(0xee682103)); // 3.27093e+24f, -1.79601e+28f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x2a3b0355)); // 4.85282e+16f, 1.66101e-13f -path.lineTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5a)); // 3.50084e+24f, -2.87489e+29f -path.close(); -path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5a)); // 3.50084e+24f, -2.87489e+29f -path.conicTo(SkBits2Float(0x084b218c), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0x5bf05568), SkBits2Float(0x1f2a8c55)); // 6.11275e-34f, 1.16348e+26f, 0.000209024f, 1.35296e+17f, 3.6115e-20f - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.cubicTo(SkBits2Float(0xbcb4bcac), SkBits2Float(0x000029ff), SkBits2Float(0x010000bc), SkBits2Float(0x00bcbc00), SkBits2Float(0xbebcbcbc), SkBits2Float(0xb6aebcae)); // -0.0220626f, 1.50654e-41f, 2.35104e-38f, 1.73325e-38f, -0.368627f, -5.20757e-06f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_38(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0x5b292d11), SkBits2Float(0x212a8c55), SkBits2Float(0x555b2d2d), SkBits2Float(0x52525268)); // 6.53477e+16f, 4.76188e+16f, 5.7784e-19f, 1.50617e+13f, 2.25831e+11f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52525272), SkBits2Float(0x2ac05252), SkBits2Float(0x727fb721)); // 4.80216e+30f, 2.25832e+11f, 3.41632e-13f, 5.06496e+30f -path.lineTo(SkBits2Float(0x73727322), SkBits2Float(0x555b2d29)); // 1.92088e+31f, 1.50617e+13f -path.lineTo(SkBits2Float(0xab2a212e), SkBits2Float(0x7a27872a)); // -6.04422e-13f, 2.17464e+35f -path.moveTo(SkBits2Float(0x25fffefb), SkBits2Float(0x7bc00321)); // 4.44082e-16f, 1.99397e+36f -path.quadTo(SkBits2Float(0x52524852), SkBits2Float(0x72525228), SkBits2Float(0x72727272), SkBits2Float(0x3a727272)); // 2.25789e+11f, 4.16584e+30f, 4.80216e+30f, 0.000924862f -path.lineTo(SkBits2Float(0x25fffefb), SkBits2Float(0x7bc00321)); // 4.44082e-16f, 1.99397e+36f -path.close(); -path.moveTo(SkBits2Float(0x25fffefb), SkBits2Float(0x7bc00321)); // 4.44082e-16f, 1.99397e+36f -path.quadTo(SkBits2Float(0x2a292827), SkBits2Float(0x962b0080), SkBits2Float(0x5252752a), SkBits2Float(0x72725252)); // 1.50241e-13f, -1.38134e-25f, 2.25977e+11f, 4.79967e+30f -path.quadTo(SkBits2Float(0x72725252), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.79967e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda000072), SkBits2Float(0x52525ada), SkBits2Float(0x52525252)); // 4.80215e+30f, -9.00732e+15f, 2.25867e+11f, 2.25831e+11f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525272), SkBits2Float(0x72525248), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16584e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada), SkBits2Float(0x52525252)); // 4.80215e+30f, -9.04113e+15f, 2.25867e+11f, 2.25831e+11f -path.quadTo(SkBits2Float(0x86727272), SkBits2Float(0x5252528d), SkBits2Float(0x72525252), SkBits2Float(0x72727227)); // -4.55992e-35f, 2.25832e+11f, 4.16585e+30f, 4.80214e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x29217272), SkBits2Float(0xc003211c), SkBits2Float(0x556a4b7b)); // 4.80216e+30f, 3.58484e-14f, -2.0489f, 1.61006e+13f -path.moveTo(SkBits2Float(0x72557272), SkBits2Float(0x00727272)); // 4.22775e+30f, 1.05103e-38f -path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f -path.close(); -path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x3a727272), SkBits2Float(0x28273ac2), SkBits2Float(0x00802a29)); // 4.80216e+30f, 0.000924862f, 9.2831e-15f, 1.17701e-38f -path.lineTo(SkBits2Float(0x52752a96), SkBits2Float(0x72525252)); // 2.63245e+11f, 4.16585e+30f -path.quadTo(SkBits2Float(0x72525272), SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x72727272)); // 4.16586e+30f, 2.25966e+11f, 2.25831e+11f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11f, 2.25831e+11f -path.lineTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f -path.close(); -path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525272), SkBits2Float(0x72525248), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16584e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada), SkBits2Float(0x72525252)); // 4.80215e+30f, -9.04113e+15f, 2.25867e+11f, 4.16585e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x72727252), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada)); // 4.80216e+30f, 4.80215e+30f, -9.04113e+15f, 2.25867e+11f -path.lineTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f -path.close(); -path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f -path.quadTo(SkBits2Float(0x86727272), SkBits2Float(0x5252528d), SkBits2Float(0x72525252), SkBits2Float(0x72727227)); // -4.55992e-35f, 2.25832e+11f, 4.16585e+30f, 4.80214e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x29217272), SkBits2Float(0xc003211c), SkBits2Float(0x556a4b7b)); // 4.80216e+30f, 3.58484e-14f, -2.0489f, 1.61006e+13f -path.moveTo(SkBits2Float(0x72557272), SkBits2Float(0x00727272)); // 4.22775e+30f, 1.05103e-38f -path.moveTo(SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 2.34994e+11f, 2.25831e+11f -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada), SkBits2Float(0x52525252)); // 4.80215e+30f, -9.04113e+15f, 2.25867e+11f, 2.25831e+11f -path.quadTo(SkBits2Float(0x52525272), SkBits2Float(0x3b3b0052), SkBits2Float(0x5b2d553a), SkBits2Float(0x68556829)); // 2.25832e+11f, 0.00285341f, 4.87889e+16f, 4.03114e+24f - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x52528c55), SkBits2Float(0x29215252)); // 2.26074e+11f, 3.58206e-14f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_41(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x7a057c72), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x055f0089)); // 1.73275e+35f, 4.80216e+30f, 4.34505e+30f, 1.04855e-35f -path.quadTo(SkBits2Float(0x00057272), SkBits2Float(0x72ff0000), SkBits2Float(0xba405e72), SkBits2Float(0x031b0074)); // 5.00233e-40f, 1.01016e+31f, -0.000733829f, 4.55509e-37f -path.lineTo(SkBits2Float(0x664af700), SkBits2Float(0x56397d39)); // 2.39619e+23f, 5.09869e+13f -path.quadTo(SkBits2Float(0x7a057273), SkBits2Float(0x057300e4), SkBits2Float(0x257c0c9f), SkBits2Float(0x72400006)); // 1.73224e+35f, 1.1426e-35f, 2.18618e-16f, 3.80295e+30f -path.quadTo(SkBits2Float(0xba5b5e72), SkBits2Float(0x030000ff), SkBits2Float(0x74ba00e8), SkBits2Float(0xe8ec4000)); // -0.000836826f, 3.7617e-37f, 1.17894e+32f, -8.92527e+24f -path.moveTo(SkBits2Float(0x39724aff), SkBits2Float(0x7200397d)); // 0.000231069f, 2.53975e+30f -path.quadTo(SkBits2Float(0x827a0572), SkBits2Float(0x08727272), SkBits2Float(0x08080808), SkBits2Float(0x08080808)); // -1.83687e-37f, 7.29588e-34f, 4.09355e-34f, 4.09355e-34f -path.lineTo(SkBits2Float(0x08080808), SkBits2Float(0x08080808)); // 4.09355e-34f, 4.09355e-34f -path.lineTo(SkBits2Float(0x08080808), SkBits2Float(0x08080808)); // 4.09355e-34f, 4.09355e-34f -path.conicTo(SkBits2Float(0x72728c08), SkBits2Float(0x5b5e7272), SkBits2Float(0x000074ba), SkBits2Float(0x03f8e300), SkBits2Float(0x5aff00e8)); // 4.80414e+30f, 6.26133e+16f, 4.18736e-41f, 1.46282e-36f, 3.58886e+16f -path.quadTo(SkBits2Float(0x00800039), SkBits2Float(0x72100039), SkBits2Float(0x727a0572), SkBits2Float(0x7a727272)); // 1.1755e-38f, 2.85223e+30f, 4.95218e+30f, 3.14714e+35f -path.lineTo(SkBits2Float(0x7272727a), SkBits2Float(0xdb5e6472)); // 4.80216e+30f, -6.25979e+16f -path.moveTo(SkBits2Float(0x440039fc), SkBits2Float(0x0000f647)); // 512.906f, 8.83477e-41f -path.lineTo(SkBits2Float(0x666d0100), SkBits2Float(0x726efe62)); // 2.79805e+23f, 4.73376e+30f -path.lineTo(SkBits2Float(0x440039fc), SkBits2Float(0x0000f647)); // 512.906f, 8.83477e-41f -path.close(); -path.moveTo(SkBits2Float(0x440039fc), SkBits2Float(0x0000f647)); // 512.906f, 8.83477e-41f -path.conicTo(SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x475afc16), SkBits2Float(0x170100ad), SkBits2Float(0x01008000)); // 4.80216e+30f, -3.47604e+31f, 56060.1f, 4.1683e-25f, 2.36017e-38f -path.quadTo(SkBits2Float(0x72057272), SkBits2Float(0x8c7a3472), SkBits2Float(0x72727272), SkBits2Float(0x00f6475e)); // 2.64319e+30f, -1.92751e-31f, 4.80216e+30f, 2.26171e-38f -path.moveTo(SkBits2Float(0x6d106d43), SkBits2Float(0x6efe6266)); // 2.79362e+27f, 3.93641e+28f -path.quadTo(SkBits2Float(0x72727a05), SkBits2Float(0xba5b7272), SkBits2Float(0x03000074), SkBits2Float(0x5aff00e8)); // 4.80274e+30f, -0.000837124f, 3.76163e-37f, 3.58886e+16f -path.quadTo(SkBits2Float(0x00da0039), SkBits2Float(0x72100039), SkBits2Float(0x727a0572), SkBits2Float(0x7a727272)); // 2.00202e-38f, 2.85223e+30f, 4.95218e+30f, 3.14714e+35f -path.lineTo(SkBits2Float(0x7272727a), SkBits2Float(0xdb5e6472)); // 4.80216e+30f, -6.25979e+16f -path.lineTo(SkBits2Float(0xfc5b97fc), SkBits2Float(0x47440039)); // -4.56078e+36f, 50176.2f -path.lineTo(SkBits2Float(0x00710000), SkBits2Float(0x62766d01)); // 1.03774e-38f, 1.13644e+21f -path.quadTo(SkBits2Float(0x7a05726e), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16)); // 1.73224e+35f, 4.80216e+30f, -3.47604e+31f, 3.58785e+06f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_40(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x10190004), SkBits2Float(0x7272727a)); // 3.01739e-29f, 4.80216e+30f -path.quadTo(SkBits2Float(0xf3db5e64), SkBits2Float(0x5b97fc16), SkBits2Float(0x000039fc), SkBits2Float(0x01008000)); // -3.47604e+31f, 8.55598e+16f, 2.08009e-41f, 2.36017e-38f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x41720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 15.1251f -path.lineTo(SkBits2Float(0x63636363), SkBits2Float(0x63606363)); // 4.19457e+21f, 4.13923e+21f -path.lineTo(SkBits2Float(0x01000000), SkBits2Float(0x10010004)); // 2.35099e-38f, 2.54408e-29f -path.conicTo(SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16), SkBits2Float(0x0000d07d), SkBits2Float(0x01008000)); // 4.80216e+30f, -3.47604e+31f, 3.58785e+06f, 7.47915e-41f, 2.36017e-38f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x63720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 4.46415e+21f -path.lineTo(SkBits2Float(0x63636363), SkBits2Float(0x63606363)); // 4.19457e+21f, 4.13923e+21f -path.lineTo(SkBits2Float(0x72000000), SkBits2Float(0x5b5e72b4)); // 2.5353e+30f, 6.26136e+16f -path.quadTo(SkBits2Float(0x05720089), SkBits2Float(0x05727272), SkBits2Float(0x7272727a), SkBits2Float(0x5b5e7272)); // 1.13789e-35f, 1.13998e-35f, 4.80216e+30f, 6.26133e+16f -path.cubicTo(SkBits2Float(0x03000074), SkBits2Float(0x4aff00e8), SkBits2Float(0x397d3972), SkBits2Float(0x01727200), SkBits2Float(0x72727a00), SkBits2Float(0x5e8d7272)); // 3.76163e-37f, 8.35596e+06f, 0.000241494f, 4.45302e-38f, 4.80274e+30f, 5.09617e+18f -path.moveTo(SkBits2Float(0x72008972), SkBits2Float(0x458fe705)); // 2.54594e+30f, 4604.88f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0xe8727272), SkBits2Float(0xba5b5e03), SkBits2Float(0x03000074)); // 1.73224e+35f, -4.5797e+24f, -0.00083682f, 3.76163e-37f -path.lineTo(SkBits2Float(0xf3dbff00), SkBits2Float(0x00397d16)); // -3.48598e+31f, 5.2795e-39f -path.cubicTo(SkBits2Float(0x7a101900), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x0197fc16), SkBits2Float(0x200c2010), SkBits2Float(0x20203620)); // 1.87049e+35f, 4.80216e+30f, -3.47604e+31f, 5.58304e-38f, 1.18691e-19f, 1.35704e-19f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz763_39(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x7a057c72), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x055f0089)); // 1.73275e+35f, 4.80216e+30f, 4.34505e+30f, 1.04855e-35f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0xba405e72), SkBits2Float(0x03000074)); // 1.73224e+35f, 4.80216e+30f, -0.000733829f, 3.76163e-37f -path.lineTo(SkBits2Float(0x664aff00), SkBits2Float(0x56397d39)); // 2.39655e+23f, 5.09869e+13f -path.quadTo(SkBits2Float(0x7a057273), SkBits2Float(0x057300ff), SkBits2Float(0x257c0c9f), SkBits2Float(0x72787257)); // 1.73224e+35f, 1.1426e-35f, 2.18618e-16f, 4.92099e+30f -path.quadTo(SkBits2Float(0xba5b5e72), SkBits2Float(0x03000093), SkBits2Float(0x74ba00e8), SkBits2Float(0xe8ecff00)); // -0.000836826f, 3.76165e-37f, 1.17894e+32f, -8.95346e+24f -path.moveTo(SkBits2Float(0x39724aff), SkBits2Float(0x7200397d)); // 0.000231069f, 2.53975e+30f -path.quadTo(SkBits2Float(0x827a0572), SkBits2Float(0x72727272), SkBits2Float(0x724adf00), SkBits2Float(0x00397d39)); // -1.83687e-37f, 4.80216e+30f, 4.01828e+30f, 5.27954e-39f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x16f3abab), SkBits2Float(0xfc5b97fc), SkBits2Float(0x47440039)); // 1.73224e+35f, 3.93671e-25f, -4.56078e+36f, 50176.2f -path.lineTo(SkBits2Float(0x00710000), SkBits2Float(0x62767201)); // 1.03774e-38f, 1.13653e+21f -path.quadTo(SkBits2Float(0x7a05726e), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16)); // 1.73224e+35f, 4.80216e+30f, -3.47604e+31f, 3.58785e+06f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - - -static void fuzz763_42(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x05720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 1.13789e-35f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0xba405e72), SkBits2Float(0x03000074)); // 1.73224e+35f, 4.80216e+30f, -0.000733829f, 3.76163e-37f -path.lineTo(SkBits2Float(0x724aff00), SkBits2Float(0x56397d39)); // 4.02075e+30f, 5.09869e+13f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0xfa8d00ff), SkBits2Float(0x25727272), SkBits2Float(0x7272727a)); // 1.73224e+35f, -3.66067e+35f, 2.10289e-16f, 4.80216e+30f -path.quadTo(SkBits2Float(0xba5b5e72), SkBits2Float(0x03000093), SkBits2Float(0x74ba00e8), SkBits2Float(0xe8e0ff00)); // -0.000836826f, 3.76165e-37f, 1.17894e+32f, -8.50011e+24f -path.conicTo(SkBits2Float(0x39724aff), SkBits2Float(0x7200397d), SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x4aff0072)); // 0.000231069f, 2.53975e+30f, 1.73224e+35f, 4.80216e+30f, 8.3559e+06f -path.quadTo(SkBits2Float(0x00397d39), SkBits2Float(0x05727272), SkBits2Float(0x7272727a), SkBits2Float(0x385e7272)); // 5.27954e-39f, 1.13998e-35f, 4.80216e+30f, 5.30355e-05f -path.quadTo(SkBits2Float(0x057200ff), SkBits2Float(0x25727272), SkBits2Float(0x7272727a), SkBits2Float(0x5b5e7272)); // 1.1379e-35f, 2.10289e-16f, 4.80216e+30f, 6.26133e+16f -path.cubicTo(SkBits2Float(0x03000074), SkBits2Float(0x4aff00e8), SkBits2Float(0x397d3972), SkBits2Float(0x01000400), SkBits2Float(0x72727a10), SkBits2Float(0x5e647272)); // 3.76163e-37f, 8.35596e+06f, 0.000241494f, 2.35128e-38f, 4.80275e+30f, 4.11534e+18f -path.quadTo(SkBits2Float(0x2b2d16f3), SkBits2Float(0x0039fc4d), SkBits2Float(0x68800000), SkBits2Float(0x0100fafa)); // 6.14938e-13f, 5.32513e-39f, 4.8357e+24f, 2.369e-38f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x63720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 4.46415e+21f -path.lineTo(SkBits2Float(0x63636363), SkBits2Float(0x63606363)); // 4.19457e+21f, 4.13923e+21f -path.lineTo(SkBits2Float(0x72720000), SkBits2Float(0xff725b5e)); // 4.7933e+30f, -3.22148e+38f -path.moveTo(SkBits2Float(0x72720572), SkBits2Float(0x5b5e2572)); // 4.79373e+30f, 6.25286e+16f -path.quadTo(SkBits2Float(0x05720089), SkBits2Float(0x25727272), SkBits2Float(0x72728c7a), SkBits2Float(0x5b5e7272)); // 1.13789e-35f, 2.10289e-16f, 4.80417e+30f, 6.26133e+16f -path.cubicTo(SkBits2Float(0x03000074), SkBits2Float(0x4aff00e8), SkBits2Float(0x397d3972), SkBits2Float(0x01000400), SkBits2Float(0x72727a10), SkBits2Float(0x5e827272)); // 3.76163e-37f, 8.35596e+06f, 0.000241494f, 2.35128e-38f, 4.80275e+30f, 4.69985e+18f -path.quadTo(SkBits2Float(0x97fc16f3), SkBits2Float(0x0039fc5b), SkBits2Float(0x00f6472e), SkBits2Float(0x01008000)); // -1.62909e-24f, 5.32515e-39f, 2.26171e-38f, 2.36017e-38f -path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16)); // 1.73224e+35f, 4.80216e+30f, -3.47604e+31f, 3.58785e+06f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_43(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x5c386c3a), SkBits2Float(0x4e691a3e)); // 2.07642e+17f, 9.77703e+08f -path.cubicTo(SkBits2Float(0x6f69f9f5), SkBits2Float(0x18ff8791), SkBits2Float(0x2492263c), SkBits2Float(0xbc6fdb48), SkBits2Float(0xc2f82107), SkBits2Float(0x729a18e1)); // 7.24122e+28f, 6.60528e-24f, 6.33822e-17f, -0.0146397f, -124.065f, 6.10442e+30f -path.cubicTo(SkBits2Float(0x07d729d1), SkBits2Float(0xdea6db48), SkBits2Float(0xcd1dfb88), SkBits2Float(0x90826769), SkBits2Float(0x1c20e5a4), SkBits2Float(0xa4c3ba9b)); // 3.23742e-34f, -6.01164e+18f, -1.65657e+08f, -5.14353e-29f, 5.32364e-22f, -8.48839e-17f -path.moveTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f -path.close(); -path.moveTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f -path.cubicTo(SkBits2Float(0xdeea1d6e), SkBits2Float(0xc7774804), SkBits2Float(0x27cf0dcf), SkBits2Float(0x6ae8b99f), SkBits2Float(0x24ac3260), SkBits2Float(0x062fa93c)); // -8.43488e+18f, -63304, 5.7469e-15f, 1.40674e+26f, 7.46784e-17f, 3.30382e-35f -path.lineTo(SkBits2Float(0x438a0b9c), SkBits2Float(0x60a1d2c8)); // 276.091f, 9.32848e+19f -path.quadTo(SkBits2Float(0xe13fb902), SkBits2Float(0x07ee536f), SkBits2Float(0x971d8ac1), SkBits2Float(0x2f9f174b)); // -2.21041e+20f, 3.58593e-34f, -5.09046e-25f, 2.89385e-10f -path.lineTo(SkBits2Float(0x0f2cf5d8), SkBits2Float(0xe271654c)); // 8.5276e-30f, -1.11324e+21f -path.lineTo(SkBits2Float(0xe6cf24d2), SkBits2Float(0xd9537742)); // -4.89105e+23f, -3.72015e+15f -path.cubicTo(SkBits2Float(0x1aaaee04), SkBits2Float(0x9e3b804c), SkBits2Float(0x84cba87d), SkBits2Float(0x4e0e8ccc), SkBits2Float(0x2aec611a), SkBits2Float(0x7ae4b639)); // 7.06949e-23f, -9.92623e-21f, -4.78798e-36f, 5.97898e+08f, 4.19894e-13f, 5.9377e+35f -path.conicTo(SkBits2Float(0x73357921), SkBits2Float(0x6f163021), SkBits2Float(0x70ea542c), SkBits2Float(0xe008f404), SkBits2Float(0x1f6c5e52)); // 1.43778e+31f, 4.64809e+28f, 5.8017e+29f, -3.94741e+19f, 5.0053e-20f -path.lineTo(SkBits2Float(0xda45ad4e), SkBits2Float(0xedce4a04)); // -1.39103e+16f, -7.98042e+27f -path.lineTo(SkBits2Float(0xac0e45da), SkBits2Float(0x8f632841)); // -2.02182e-12f, -1.11997e-29f -path.lineTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f -path.close(); -path.moveTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f -path.quadTo(SkBits2Float(0xf35c4ad5), SkBits2Float(0x0692f251), SkBits2Float(0x69632126), SkBits2Float(0xb927af67)); // -1.74534e+31f, 5.52751e-35f, 1.71614e+25f, -0.000159917f -path.moveTo(SkBits2Float(0x6534bff9), SkBits2Float(0x434a9986)); // 5.3348e+22f, 202.6f -path.quadTo(SkBits2Float(0x37c603e5), SkBits2Float(0xa0683953), SkBits2Float(0x751915e4), SkBits2Float(0x831c911a)); // 2.36053e-05f, -1.96701e-19f, 1.94059e+32f, -4.60108e-37f -path.cubicTo(SkBits2Float(0xba4f10f1), SkBits2Float(0x5a7571df), SkBits2Float(0x4ec67459), SkBits2Float(0x33c58827), SkBits2Float(0x10b78ccb), SkBits2Float(0xedbd2748)); // -0.000789895f, 1.72716e+16f, 1.66476e+09f, 9.19829e-08f, 7.23977e-29f, -7.31752e+27f -path.cubicTo(SkBits2Float(0x6d06f06a), SkBits2Float(0xe30465cf), SkBits2Float(0xc5458fe7), SkBits2Float(0xca488dc4), SkBits2Float(0x38f9021c), SkBits2Float(0x3e8d58db)); // 2.6101e+27f, -2.44231e+21f, -3160.99f, -3.28587e+06f, 0.000118736f, 0.276069f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_44(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x7c223bab), SkBits2Float(0x7cf35966)); // 3.36945e+36f, 1.01083e+37f -path.quadTo(SkBits2Float(0x00000000), SkBits2Float(0x7ccaca6d), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 8.4236e+36f, 0, 0 -path.lineTo(SkBits2Float(0x7d7d7d7d), SkBits2Float(0x00000000)); // 2.10591e+37f, 0 -path.quadTo(SkBits2Float(0x7ccacab0), SkBits2Float(0x7d1817f4), SkBits2Float(0x7c223bab), SkBits2Float(0x7cf35966)); // 8.42364e+36f, 1.26354e+37f, 3.36945e+36f, 1.01083e+37f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x109d0000), SkBits2Float(0xff7bc000)); // 6.19256e-29f, -3.34633e+38f -path.conicTo(SkBits2Float(0x979797ed), SkBits2Float(0x3a214797), SkBits2Float(0x28aa217a), SkBits2Float(0x01007272), SkBits2Float(0x00000072)); // -9.7965e-25f, 0.000615233f, 1.88883e-14f, 2.3592e-38f, 1.59748e-43f -path.quadTo(SkBits2Float(0x72728302), SkBits2Float(0x8b727272), SkBits2Float(0x72727272), SkBits2Float(0xc00308f6)); // 4.80344e+30f, -4.66936e-32f, 4.80216e+30f, -2.04742f -path.conicTo(SkBits2Float(0x7f52753a), SkBits2Float(0x8072ffff), SkBits2Float(0x67af2103), SkBits2Float(0x7d2a6847), SkBits2Float(0x7d7d7d7d)); // 2.79747e+38f, -1.05611e-38f, 1.65405e+24f, 1.41569e+37f, 2.10591e+37f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); -} - -static void fuzz763_45(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.cubicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a303030), SkBits2Float(0x7a303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 2.28705e+35f, 2.28705e+35f, 6.40969e-10f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x74303030), SkBits2Float(0x74303030), SkBits2Float(0x30303030), SkBits2Float(0x74303030)); // 6.40969e-10f, 5.58363e+31f, 5.58363e+31f, 6.40969e-10f, 5.58363e+31f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f -path.moveTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.moveTo(SkBits2Float(0x77773030), SkBits2Float(0x30303030)); // 5.01357e+33f, 6.40969e-10f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a743030), SkBits2Float(0x74303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 3.16974e+35f, 5.58363e+31f, 6.40969e-10f -path.lineTo(SkBits2Float(0x77773030), SkBits2Float(0x30303030)); // 5.01357e+33f, 6.40969e-10f -path.close(); -path.moveTo(SkBits2Float(0x77773030), SkBits2Float(0x30303030)); // 5.01357e+33f, 6.40969e-10f -path.lineTo(SkBits2Float(0x7f303030), SkBits2Float(0x7a303030)); // 2.34194e+38f, 2.28705e+35f -path.conicTo(SkBits2Float(0x77303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0xf9303030), SkBits2Float(0x7a303030)); // 3.57352e+33f, 6.40969e-10f, 6.40969e-10f, -5.71764e+34f, 2.28705e+35f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f -path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f -path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 2.28705e+35f, 6.40969e-10f -path.cubicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 2.28705e+35f, 6.40969e-10f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f -path.moveTo(SkBits2Float(0x77303030), SkBits2Float(0xff303030)); // 3.57352e+33f, -2.34194e+38f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7f773030), SkBits2Float(0x7a7a3030), SkBits2Float(0x7a303030)); // 6.40969e-10f, 6.40969e-10f, 3.2857e+38f, 3.24763e+35f, 2.28705e+35f -path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x77303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 3.57352e+33f, 6.40969e-10f -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7b303030), SkBits2Float(0x73303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 9.14822e+35f, 1.39591e+31f, 6.40969e-10f -path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a7a3030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 3.24763e+35f - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); -} - -static void fuzz763_46(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.conicTo(SkBits2Float(0x44444444), SkBits2Float(0x44444444), SkBits2Float(0x44263030), SkBits2Float(0x44304430), SkBits2Float(0x4c444430)); // 785.067f, 785.067f, 664.753f, 705.065f, 5.145e+07f -path.moveTo(SkBits2Float(0x44444444), SkBits2Float(0x44444444)); // 785.067f, 785.067f -path.cubicTo(SkBits2Float(0x30303030), SkBits2Float(0x44444444), SkBits2Float(0x30303030), SkBits2Float(0x44444444), SkBits2Float(0x44444444), SkBits2Float(0x4444444c)); // 6.40969e-10f, 785.067f, 6.40969e-10f, 785.067f, 785.067f, 785.067f - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); -} - -static void fuzz763_47(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.cubicTo(SkBits2Float(0x7272728e), SkBits2Float(0x52527272), SkBits2Float(0x2d555252), SkBits2Float(0x68556829), SkBits2Float(0x555b2d29), SkBits2Float(0x2a212a8c)); // 4.80217e+30f, 2.25966e+11f, 1.21259e-11f, 4.03114e+24f, 1.50617e+13f, 1.43144e-13f -path.conicTo(SkBits2Float(0x00296808), SkBits2Float(0x00000002), SkBits2Float(0x52525252), SkBits2Float(0x72007272), SkBits2Float(0x52527272)); // 3.80257e-39f, 2.8026e-45f, 2.25831e+11f, 2.54416e+30f, 2.25966e+11f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x2a212a8c), SkBits2Float(0x7272081f)); // 1.43144e-13f, 4.79393e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x5974fa80), SkBits2Float(0x00747474), SkBits2Float(0x59585264)); // 4.80216e+30f, 4.30971e+15f, 1.06947e-38f, 3.80557e+15f -path.cubicTo(SkBits2Float(0x64007474), SkBits2Float(0x088c5852), SkBits2Float(0x80808021), SkBits2Float(0x8c808080), SkBits2Float(0x80802108), SkBits2Float(0x80808080)); // 9.4783e+21f, 8.44671e-34f, -1.18009e-38f, -1.97989e-31f, -1.17668e-38f, -1.1801e-38f -path.quadTo(SkBits2Float(0x80807d80), SkBits2Float(0x80808080), SkBits2Float(0xff7f0000), SkBits2Float(0x80808080)); // -1.18e-38f, -1.1801e-38f, -3.38953e+38f, -1.1801e-38f -path.quadTo(SkBits2Float(0x80808080), SkBits2Float(0x80808080), SkBits2Float(0xed842b00), SkBits2Float(0x7252ff6d)); // -1.1801e-38f, -1.1801e-38f, -5.113e+27f, 4.17924e+30f -path.quadTo(SkBits2Float(0x72577200), SkBits2Float(0x55525352), SkBits2Float(0x2a212a8c), SkBits2Float(0x7272081f)); // 4.26733e+30f, 1.44535e+13f, 1.43144e-13f, 4.79393e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x6f740080), SkBits2Float(0x8c556874), SkBits2Float(0x2982ffff)); // 4.80216e+30f, 7.55149e+28f, -1.64404e-31f, 5.81757e-14f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz763_48(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0xed0081bc), SkBits2Float(0x1b2d8040)); // -2.48568e+27f, 1.43517e-22f -path.moveTo(SkBits2Float(0x74747403), SkBits2Float(0x29747474)); // 7.74703e+31f, 5.42799e-14f -path.close(); -path.moveTo(SkBits2Float(0x74747403), SkBits2Float(0x29747474)); // 7.74703e+31f, 5.42799e-14f -path.conicTo(SkBits2Float(0x662d5576), SkBits2Float(0x2d804066), SkBits2Float(0x8068291b), SkBits2Float(0x740315ff), SkBits2Float(0x74747474)); // 2.04636e+23f, 1.45805e-11f, -9.56564e-39f, 4.15428e+31f, 7.74708e+31f -path.cubicTo(SkBits2Float(0x762d0529), SkBits2Float(0x72525252), SkBits2Float(0x007b7272), SkBits2Float(0x525adada), SkBits2Float(0x52525252), SkBits2Float(0x52727252)); // 8.77316e+32f, 4.16585e+30f, 1.13368e-38f, 2.34994e+11f, 2.25831e+11f, 2.60325e+11f -path.lineTo(SkBits2Float(0x74747403), SkBits2Float(0x29747474)); // 7.74703e+31f, 5.42799e-14f -path.close(); -path.moveTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f -path.close(); -path.moveTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f -path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52524872), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.2579e+11f, 4.16585e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0x80406666), SkBits2Float(0x68291b2d), SkBits2Float(0x0315ff80)); // 4.80215e+30f, -5.91421e-39f, 3.19432e+24f, 4.40805e-37f -path.cubicTo(SkBits2Float(0x74747474), SkBits2Float(0x7b722974), SkBits2Float(0x5adada00), SkBits2Float(0x52525252), SkBits2Float(0x72720052), SkBits2Float(0x72727272)); // 7.74708e+31f, 1.25738e+36f, 3.08006e+16f, 2.25831e+11f, 4.79333e+30f, 4.80216e+30f -path.lineTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f -path.close(); -path.moveTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f -path.quadTo(SkBits2Float(0x72727227), SkBits2Float(0x72727272), SkBits2Float(0x74727272), SkBits2Float(0x55747421)); // 4.80214e+30f, 4.80216e+30f, 7.68345e+31f, 1.67987e+13f -path.lineTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f -path.close(); -path.moveTo(SkBits2Float(0x724b0000), SkBits2Float(0x00725f72)); // 4.02083e+30f, 1.05035e-38f -path.lineTo(SkBits2Float(0x52525252), SkBits2Float(0x72725252)); // 2.25831e+11f, 4.79967e+30f -path.quadTo(SkBits2Float(0x26727272), SkBits2Float(0x0303a525), SkBits2Float(0x52005c03), SkBits2Float(0x72525252)); // 8.41157e-16f, 3.8687e-37f, 1.37825e+11f, 4.16585e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x1ff07255), SkBits2Float(0x2a8c5572), SkBits2Float(0x21082a21)); // 4.80216e+30f, 1.01833e-19f, 2.49283e-13f, 4.61343e-19f -path.lineTo(SkBits2Float(0x2a2a3a21), SkBits2Float(0x29212828)); // 1.51192e-13f, 3.5784e-14f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - -static void fuzz763_49(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x78303030), SkBits2Float(0x78787881), SkBits2Float(0x78787878), SkBits2Float(0x30303030)); // 6.40969e-10f, 1.42941e+34f, 2.01583e+34f, 2.01583e+34f, 6.40969e-10f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f -path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x78787878), SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 6.40969e-10f, 2.01583e+34f, 2.01583e+34f, 2.01583e+34f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x7878788d)); // 2.01583e+34f, 2.01584e+34f -path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x30303030)); // 2.01583e+34f, 6.40969e-10f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); -} - -static void fuzz763_50(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x70621ede), SkBits2Float(0x00000000)); // 2.79924e+29f, 0 -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x74fc5b97), SkBits2Float(0x7d458fe4)); // 0, 0, 0, 1.59951e+32f, 1.64128e+37f -path.lineTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+29f, 0 -path.lineTo(SkBits2Float(0x70621ede), SkBits2Float(0x00000000)); // 2.79924e+29f, 0 -path.close(); -path.moveTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+29f, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+29f, 0 -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); -} - -static void fuzz763_51(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x868b5aae), SkBits2Float(0x626c45ab), SkBits2Float(0xefea1ffe), SkBits2Float(0x0029fc76)); // -5.24192e-35f, 1.08961e+21f, -1.44916e+29f, 3.85582e-39f -path.moveTo(SkBits2Float(0xfacbff01), SkBits2Float(0x56fc5b97)); // -5.29604e+35f, 1.38735e+14f -path.cubicTo(SkBits2Float(0x7d4559c9), SkBits2Float(0xad801c39), SkBits2Float(0xfbe2091a), SkBits2Float(0x7268e394), SkBits2Float(0x7c800079), SkBits2Float(0xa1d75590)); // 1.63953e+37f, -1.45644e-11f, -2.34729e+36f, 4.61284e+30f, 5.31699e+36f, -1.45916e-18f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz763_52(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x29ff4bae), SkBits2Float(0xa1d75590), SkBits2Float(0x9fd6f6c3), SkBits2Float(0x70621ede)); // 1.13374e-13f, -1.45916e-18f, -9.10408e-20f, 2.79924e+29f -path.quadTo(SkBits2Float(0x57a839d3), SkBits2Float(0x1a80d34b), SkBits2Float(0x0147a31b), SkBits2Float(0xff7fffff)); // 3.69933e+14f, 5.32809e-23f, 3.66675e-38f, -3.40282e+38f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f -path.conicTo(SkBits2Float(0x75757568), SkBits2Float(0x7575755e), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75756575)); // 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11077e+32f -path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f -path.close(); -path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f -path.conicTo(SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75917575), SkBits2Float(0x75757575)); // 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.68782e+32f, 3.11156e+32f -path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f -path.close(); -path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f -path.conicTo(SkBits2Float(0x75757575), SkBits2Float(0x7575758f), SkBits2Float(0x7f757575), SkBits2Float(0x75757575), SkBits2Float(0x75757575)); // 3.11156e+32f, 3.11157e+32f, 3.26271e+38f, 3.11156e+32f, 3.11156e+32f -path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - -static void fuzz763_53(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.moveTo(SkBits2Float(0x7644b829), SkBits2Float(0x00000000)); // 9.97486e+32f, 0 -path.lineTo(SkBits2Float(0x74fc5b97), SkBits2Float(0x77df944a)); // 1.59951e+32f, 9.06945e+33f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xf8fbe3ff)); // 0, -4.08716e+34f -path.lineTo(SkBits2Float(0x7644b829), SkBits2Float(0x00000000)); // 9.97486e+32f, 0 -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x45ab86ae), SkBits2Float(0xd6d6626c), SkBits2Float(0xd6d6d6d6), SkBits2Float(0x7644d6d6)); // 5488.83f, -1.17859e+14f, -1.18109e+14f, 9.98093e+32f -path.moveTo(SkBits2Float(0xd6d6d6d6), SkBits2Float(0xd6d6d6d6)); // -1.18109e+14f, -1.18109e+14f -path.cubicTo(SkBits2Float(0xd6d6d6d6), SkBits2Float(0x64fed6d6), SkBits2Float(0x7644ef40), SkBits2Float(0x290877fc), SkBits2Float(0x447644b8), SkBits2Float(0x80fafc76)); // -1.18109e+14f, 3.76076e+22f, 9.98577e+32f, 3.03021e-14f, 985.074f, -2.30494e-38f -path.conicTo(SkBits2Float(0x87808080), SkBits2Float(0x764400ae), SkBits2Float(0x764400fc), SkBits2Float(0x450080fc), SkBits2Float(0x3636366c)); // -1.93348e-34f, 9.93852e+32f, 9.93858e+32f, 2056.06f, 2.71518e-06f -path.lineTo(SkBits2Float(0xd6d6d6d6), SkBits2Float(0xd6d6d6d6)); // -1.18109e+14f, -1.18109e+14f -path.close(); -path.moveTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+28f, 2.46288e+16f -path.conicTo(SkBits2Float(0x7644626c), SkBits2Float(0x088912fc), SkBits2Float(0xae8744ef), SkBits2Float(0x76571f5a), SkBits2Float(0x45ab86fc)); // 9.95788e+32f, 8.24985e-34f, -6.15133e-11f, 1.0908e+33f, 5488.87f -path.conicTo(SkBits2Float(0x4064fe62), SkBits2Float(0x290877ef), SkBits2Float(0x780080b8), SkBits2Float(0x553c7644), SkBits2Float(0x644eae87)); // 3.57803f, 3.03021e-14f, 1.04254e+34f, 1.2951e+13f, 1.52504e+22f -path.lineTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+28f, 2.46288e+16f -path.close(); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -// hangs 654939 -static void fuzz763_54(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0xb3b32d11), SkBits2Float(0xb3b3b3b3), SkBits2Float(0x5b29b3b3), SkBits2Float(0x212a8c55)); // 6.53477e+16f, -8.34353e-08f, -8.36802e-08f, 4.77669e+16f, 5.7784e-19f -path.conicTo(SkBits2Float(0x68555b2d), SkBits2Float(0x28296869), SkBits2Float(0x5b252a08), SkBits2Float(0x5d68392a), SkBits2Float(0x29282780)); // 4.03018e+24f, 9.40402e-15f, 4.64896e+16f, 1.04584e+18f, 3.73378e-14f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.cubicTo(SkBits2Float(0x52727272), SkBits2Float(0x72727252), SkBits2Float(0x525252c7), SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255)); // 2.60326e+11f, 4.80215e+30f, 2.25833e+11f, 4.79967e+30f, 4.80216e+30f, 4.80215e+30f -path.quadTo(SkBits2Float(0xd7da0000), SkBits2Float(0x5252525a), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // -4.79387e+14f, 2.25831e+11f, 4.16585e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x48525252), SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255)); // 215369, 4.79967e+30f, 4.80216e+30f, 4.80215e+30f -path.quadTo(SkBits2Float(0xdada007b), SkBits2Float(0x5252525a), SkBits2Float(0x72675252), SkBits2Float(0x72727272)); // -3.0681e+16f, 2.25831e+11f, 4.5818e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x52525252), SkBits2Float(0x27725252), SkBits2Float(0x72727272), SkBits2Float(0x72727272)); // 2.25831e+11f, 3.36289e-15f, 4.80216e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x1c292172), SkBits2Float(0x7bc00321), SkBits2Float(0x9aaaaaaa), SkBits2Float(0x8c556a4b)); // 5.59606e-22f, 1.99397e+36f, -7.05861e-23f, -1.64409e-31f -path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11f, 2.25831e+11f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.quadTo(SkBits2Float(0x72725570), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.79991e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0x555bb672), SkBits2Float(0x29686968), SkBits2Float(0x252a081f)); // 4.80215e+30f, 1.50985e+13f, 5.16058e-14f, 1.47479e-16f -path.moveTo(SkBits2Float(0x5d68392a), SkBits2Float(0x01002780)); // 1.04584e+18f, 2.35382e-38f -path.moveTo(SkBits2Float(0x72727200), SkBits2Float(0x72725252)); // 4.80212e+30f, 4.79967e+30f -path.quadTo(SkBits2Float(0x5adada00), SkBits2Float(0xa5252652), SkBits2Float(0x727272ad), SkBits2Float(0xda007b72)); // 3.08006e+16f, -1.43245e-16f, 4.80218e+30f, -9.04113e+15f -path.lineTo(SkBits2Float(0x5252525a), SkBits2Float(0x72525252)); // 2.25831e+11f, 4.16585e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x27725252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25831e+11f, 3.36289e-15f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x74217472), SkBits2Float(0x005b5574), SkBits2Float(0x72680000)); // 4.80216e+30f, 5.11671e+31f, 8.38768e-39f, 4.59523e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x007b7272), SkBits2Float(0x525adada)); // 4.80216e+30f, 2.25831e+11f, 1.13368e-38f, 2.34994e+11f -path.lineTo(SkBits2Float(0x72727200), SkBits2Float(0x72725252)); // 4.80212e+30f, 4.79967e+30f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); -} - - -// afl crash -static void fuzz763_55(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e+13f -path.lineTo(SkBits2Float(0x55555568), SkBits2Float(0x55555555)); // 1.46602e+13f, 1.46602e+13f -path.lineTo(SkBits2Float(0x98989898), SkBits2Float(0x55989898)); // -3.94452e-24f, 2.09726e+13f -path.lineTo(SkBits2Float(0xf6f65555), SkBits2Float(0x101006f6)); // -2.49812e+33f, 2.84044e-29f -path.quadTo(SkBits2Float(0xdca33f10), SkBits2Float(0xf6f6f6f6), SkBits2Float(0xf621f6f6), SkBits2Float(0xf70ff6f6)); // -3.67598e+17f, -2.50452e+33f, -8.21259e+32f, -2.91995e+33f -path.lineTo(SkBits2Float(0x9400f6f6), SkBits2Float(0x10530000)); // -6.51105e-27f, 4.16124e-29f -path.quadTo(SkBits2Float(0x0f101010), SkBits2Float(0x00101010), SkBits2Float(0xf610f720), SkBits2Float(0xf6f6f6f6)); // 7.10284e-30f, 1.47513e-39f, -7.35062e+32f, -2.50452e+33f -path.lineTo(SkBits2Float(0x105352f6), SkBits2Float(0x1cf6ff10)); // 4.16763e-29f, 1.63448e-21f -path.lineTo(SkBits2Float(0xf6f6220a), SkBits2Float(0x003700f6)); // -2.49608e+33f, 5.0513e-39f -path.cubicTo(SkBits2Float(0x0000001e), SkBits2Float(0x00fff4f6), SkBits2Float(0xff101064), SkBits2Float(0xf6b6ac7f), SkBits2Float(0xf6f629f6), SkBits2Float(0x10f6f6f6)); // 4.2039e-44f, 2.35059e-38f, -1.91494e+38f, -1.85253e+33f, -2.4964e+33f, 9.74104e-29f -path.quadTo(SkBits2Float(0x10101007), SkBits2Float(0x10f7fd10), SkBits2Float(0xf6f6f6f6), SkBits2Float(0xf6f645e0)); // 2.84113e-29f, 9.78142e-29f, -2.50452e+33f, -2.4975e+33f -path.lineTo(SkBits2Float(0xed9ef6f6), SkBits2Float(0x53535353)); // -6.14965e+27f, 9.07636e+11f -path.lineTo(SkBits2Float(0x53006cf6), SkBits2Float(0x53295353)); // 5.51584e+11f, 7.27247e+11f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e+13f -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e+13f -path.lineTo(SkBits2Float(0xf6f6f6f6), SkBits2Float(0x5353d9f6)); // -2.50452e+33f, 9.09895e+11f - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); -} - -// 656149 -static void fuzz763_56(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0xb3b32d11), SkBits2Float(0xb3b3b3b3), SkBits2Float(0x5b29b3b3), SkBits2Float(0x72725255)); // 6.53477e+16f, -8.34353e-08f, -8.36802e-08f, 4.77669e+16f, 4.79967e+30f -path.quadTo(SkBits2Float(0x525252c7), SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255)); // 2.25833e+11f, 4.79967e+30f, 4.80216e+30f, 4.80215e+30f -path.quadTo(SkBits2Float(0xd7da0000), SkBits2Float(0x5adada00), SkBits2Float(0x52525252), SkBits2Float(0x00005252)); // -4.79387e+14f, 3.08006e+16f, 2.25831e+11f, 2.9531e-41f -path.conicTo(SkBits2Float(0xadada525), SkBits2Float(0x52525ab4), SkBits2Float(0x52525252), SkBits2Float(0x72727272), SkBits2Float(0x52527272)); // -1.97412e-11f, 2.25866e+11f, 2.25831e+11f, 4.80216e+30f, 2.25966e+11f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255), SkBits2Float(0xda007b72)); // 4.79967e+30f, 4.80216e+30f, 4.80215e+30f, -9.04113e+15f -path.lineTo(SkBits2Float(0x5252525a), SkBits2Float(0x72525252)); // 2.25831e+11f, 4.16585e+30f -path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x27725252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25831e+11f, 3.36289e-15f, 4.80216e+30f -path.lineTo(SkBits2Float(0x7bc00321), SkBits2Float(0x9aaaaaaa)); // 1.99397e+36f, -7.05861e-23f -path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11f, 2.25831e+11f -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.close(); -path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f -path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x26525ada), SkBits2Float(0x72ada525)); // 4.80215e+30f, -9.04113e+15f, 7.29815e-16f, 6.87879e+30f -path.quadTo(SkBits2Float(0x007b7272), SkBits2Float(0x525adada), SkBits2Float(0x52525252), SkBits2Float(0x72727252)); // 1.13368e-38f, 2.34994e+11f, 2.25831e+11f, 4.80215e+30f -path.quadTo(SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x72722772), SkBits2Float(0x72727272)); // 2.25966e+11f, 2.25831e+11f, 4.79636e+30f, 4.80216e+30f -path.quadTo(SkBits2Float(0x74727272), SkBits2Float(0x55747421), SkBits2Float(0x0000005b), SkBits2Float(0x72727268)); // 7.68345e+31f, 1.67987e+13f, 1.27518e-43f, 4.80216e+30f -path.quadTo(SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x72727272), SkBits2Float(0x72557272)); // 2.25966e+11f, 2.25831e+11f, 4.80216e+30f, 4.22775e+30f -path.quadTo(SkBits2Float(0x5adada72), SkBits2Float(0x52525252), SkBits2Float(0x72725252), SkBits2Float(0x72727272)); // 3.08009e+16f, 2.25831e+11f, 4.79967e+30f, 4.80216e+30f - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - -static void fuzz763_57(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x68546829), SkBits2Float(0x555b2d29)); // 4.01225e+24f, 1.50617e+13f -path.moveTo(SkBits2Float(0x1f2a322a), SkBits2Float(0x4b7b2108)); // 3.60404e-20f, 1.6458e+07f -path.lineTo(SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 9.43289e-15f, 4.8745e+16f -path.moveTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24f, -2.87586e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2a8cef2a), SkBits2Float(0x682d2953), SkBits2Float(0xce682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 2.50349e-13f, 3.27093e+24f, -9.73619e+08f, 1.64988e+07f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x3b2a8c55)); // 4.85282e+16f, 0.00260236f -path.lineTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24f, -2.87586e+29f -path.close(); -path.moveTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24f, -2.87586e+29f -path.conicTo(SkBits2Float(0xd2c00321), SkBits2Float(0xc0394b7b), SkBits2Float(0x8c08ed7a), SkBits2Float(0x211f2f2a), SkBits2Float(0x704b7b03)); // -4.12343e+11f, -2.89523f, -1.05485e-31f, 5.39337e-19f, 2.51897e+29f -path.cubicTo(SkBits2Float(0x2d6829ed), SkBits2Float(0x5b2d555b), SkBits2Float(0x68275b2d), SkBits2Float(0x21685527), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 1.3197e-11f, 4.8789e+16f, 3.16127e+24f, 7.87174e-19f, 4.7323e-37f, 6.14991e+25f -path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 4.8745e+16f -path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f -path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x228cef2a), SkBits2Float(0x682d2953), SkBits2Float(0xee682103), SkBits2Float(0x287bc055)); // 5.76397e-19f, 3.82003e-18f, 3.27093e+24f, -1.79601e+28f, 1.3975e-14f -path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f -path.conicTo(SkBits2Float(0x4b03213b), SkBits2Float(0xc07b2a08), SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556830), SkBits2Float(0x2a8c555b)); // 8.59372e+06f, -3.92444f, 4.88298e+16f, -2.64185e+29f, 2.49282e-13f -path.conicTo(SkBits2Float(0x0321212a), SkBits2Float(0x4b7bd2c0), SkBits2Float(0xed7ac039), SkBits2Float(0x2f2a8c08), SkBits2Float(0x7b03211f)); // 4.73517e-37f, 1.65035e+07f, -4.85023e+27f, 1.55112e-10f, 6.80863e+35f -path.lineTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f -path.close(); -path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f -path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.conicTo(SkBits2Float(0x721f2a5b), SkBits2Float(0x212a8c55), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7b28), SkBits2Float(0x4797ed7a)); // 3.1526e+30f, 5.7784e-19f, 4.7323e-37f, 6.14984e+25f, 77787 -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.quadTo(SkBits2Float(0x2828102a), SkBits2Float(0x2c682921), SkBits2Float(0x8c555bf6), SkBits2Float(0x6d03de30)); // 9.32938e-15f, 3.2992e-12f, -1.64366e-31f, 2.5507e+27f -path.cubicTo(SkBits2Float(0x683f2d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x211f2a21)); // 3.61123e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 5.39271e-19f -path.lineTo(SkBits2Float(0x3a803adf), SkBits2Float(0x8a294f1a)); // 0.000978317f, -8.15193e-33f -path.quadTo(SkBits2Float(0x291d9628), SkBits2Float(0x2a43e62b), SkBits2Float(0x093a2a81), SkBits2Float(0x5c5c8ced)); // 3.49912e-14f, 1.73993e-13f, 2.24089e-33f, 2.48318e+17f -path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.close(); -path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f -path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x291d9628), SkBits2Float(0x2a43e62b), SkBits2Float(0x293a2a81), SkBits2Float(0x5c5c8ced), SkBits2Float(0x5c5c6e5c)); // 0.00148109f, 3.49912e-14f, 1.73993e-13f, 4.13372e-14f, 2.48318e+17f, 2.48183e+17f -path.lineTo(SkBits2Float(0x1f212a8c), SkBits2Float(0xc0032108)); // 3.41283e-20f, -2.04889f -path.lineTo(SkBits2Float(0xed847b4b), SkBits2Float(0x2d552829)); // -5.12513e+27f, 1.21166e-11f -path.conicTo(SkBits2Float(0x552d5b5b), SkBits2Float(0x3b5a6839), SkBits2Float(0x5b2df068), SkBits2Float(0x2a212a1f), SkBits2Float(0x532a8cef)); // 1.1913e+13f, 0.00333263f, 4.89595e+16f, 1.43143e-13f, 7.32509e+11f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); -} - + testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+
+static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0;
+static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
+static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
+
+#define TEST(name) { name, #name }
+
+static struct TestDesc tests[] = {
+ TEST(android1),
+ TEST(bug5240),
+ TEST(circlesOp4),
+ TEST(loop17),
+ TEST(cubicOp158),
+ TEST(loops_i1),
+ TEST(loops_i2),
+ TEST(loops_i3),
+ TEST(loops_i4),
+ TEST(loops_i5),
+ TEST(loops_i6),
+ TEST(cubics_d3),
+ TEST(cubics_o),
+ TEST(cubics_d2),
+ TEST(cubics_d),
+ TEST(dean2),
+ TEST(fuzzX_392),
+ TEST(crbug_526025),
+ TEST(fuzz38),
+ TEST(cubics44d),
+ TEST(cubics45u),
+ TEST(loops61i),
+ TEST(loops62i),
+ TEST(loops63i),
+ TEST(loops58iAsQuads),
+ TEST(cubics41d),
+ TEST(loops59iasQuads),
+ TEST(loops59i),
+ TEST(loops44i),
+ TEST(loops45i),
+ TEST(loops46i),
+ TEST(loops47i),
+ TEST(loops48i),
+ TEST(loops49i),
+ TEST(loops50i),
+ TEST(loops51i),
+ TEST(loops52i),
+ TEST(loops53i),
+ TEST(loops54i),
+ TEST(loops55i),
+ TEST(loops56i),
+ TEST(loops57i),
+ TEST(loops58i),
+ TEST(loops33iMod),
+ TEST(loops33iAsQuads),
+ TEST(loops33i),
+ TEST(loops40i),
+ TEST(loops40iAsQuads),
+ TEST(loops39i),
+ TEST(loops38i),
+ TEST(loops37i),
+ TEST(loops36i),
+ TEST(loops35i),
+ TEST(loops34i),
+ TEST(loops32i),
+ TEST(loops31i),
+ TEST(loops30i),
+ TEST(loops29i),
+ TEST(loops28i),
+ TEST(loops27i),
+ TEST(loops26i),
+ TEST(loops25i),
+ TEST(loops24i),
+ TEST(loops23i),
+ TEST(loops22i),
+ TEST(loops21i),
+ TEST(loops20i),
+ TEST(cubics20d),
+ TEST(cubics6d),
+ TEST(cubics7d),
+ TEST(cubics8d),
+ TEST(cubics9d),
+ TEST(cubics10u),
+ TEST(cubics11i),
+ TEST(cubics12d),
+ TEST(cubics13d),
+ TEST(cubics14d),
+ TEST(cubics15d),
+ TEST(cubics16i),
+ TEST(cubics17d),
+ TEST(cubics18d),
+ TEST(cubics19d),
+ TEST(cubicOp157),
+ TEST(cubicOp142),
+ TEST(loops4i),
+ TEST(quadRect1),
+ TEST(quadRect2),
+ TEST(quadRect3),
+ TEST(quadRect4),
+ TEST(quadRect5),
+ TEST(quadRect6),
+ TEST(cubicOp141),
+ TEST(cubicOp58d),
+ TEST(loops5i),
+ TEST(cubicOp140),
+ TEST(cubicOp139),
+ TEST(cubics138),
+ TEST(cubics137),
+ TEST(cubicOp136a),
+ TEST(cubicOp136),
+ TEST(cubicOp135),
+ TEST(cubicOp134),
+ TEST(cubicOp133),
+ TEST(loop12),
+ TEST(cubicOp132),
+ TEST(loop11),
+ TEST(loop10),
+ TEST(circlesOp3),
+ TEST(loop9),
+ TEST(loop8),
+ TEST(rects5),
+ TEST(loop7),
+ TEST(cubicOp130a),
+ TEST(rRect1x),
+ TEST(circlesOp2),
+ TEST(circlesOp1),
+ TEST(cubicOp131),
+ TEST(cubicOp130),
+ TEST(cubicOp129),
+ TEST(cubicOp128),
+ TEST(cubicOp127),
+ TEST(cubicOp126),
+ TEST(cubicOp125),
+ TEST(cubicOp124),
+ TEST(loop6),
+ TEST(loop5),
+ TEST(cubicOp123),
+ TEST(cubicOp122),
+ TEST(cubicOp121),
+ TEST(cubicOp120),
+ TEST(cubicOp119),
+ TEST(loop4),
+ TEST(loop3),
+ TEST(loop2),
+ TEST(loop1asQuad),
+ TEST(loop1),
+ TEST(issue3517),
+ TEST(cubicOp118),
+ TEST(cubicOp117),
+ TEST(cubicOp116),
+ TEST(testRect2),
+ TEST(testRect1),
+ TEST(cubicOp115),
+ TEST(issue2753),
+ TEST(cubicOp114),
+ TEST(issue2808),
+ TEST(cubicOp114asQuad),
+ TEST(rects4),
+ TEST(rects3),
+ TEST(rects2),
+ TEST(rects1),
+ TEST(issue2540),
+ TEST(issue2504),
+ TEST(kari1),
+ TEST(quadOp10i),
+ TEST(cubicOp113),
+ TEST(skpcarrot_is24),
+ TEST(issue1417),
+ TEST(cubicOp112),
+ TEST(skpadspert_net23),
+ TEST(skpadspert_de11),
+ TEST(findFirst1),
+ TEST(xOp2i),
+ TEST(xOp3i),
+ TEST(xOp1u),
+ TEST(xOp1i),
+ TEST(cubicOp111),
+ TEST(cubicOp110),
+ TEST(cubicOp109),
+ TEST(cubicOp108),
+ TEST(cubicOp107),
+ TEST(cubicOp106),
+ TEST(cubicOp105),
+ TEST(cubicOp104),
+ TEST(cubicOp103),
+ TEST(cubicOp102),
+ TEST(cubicOp101),
+ TEST(cubicOp100),
+ TEST(cubicOp99),
+ TEST(issue1435),
+ TEST(cubicOp98x),
+ TEST(cubicOp97x),
+ TEST(skpcarpetplanet_ru22),
+ TEST(cubicOp96d),
+ TEST(cubicOp95u),
+ TEST(skpadbox_lt15),
+ TEST(skpagentxsites_com55),
+ TEST(skpadventistmission_org572),
+ TEST(skpadoption_org196),
+ TEST(skpbambootheme_com12),
+ TEST(skpbakosoft_com10),
+ TEST(skpakmmos_ru100),
+ TEST(skpbangalorenest_com4),
+ TEST(skpbingoentertainment_net189),
+ TEST(skpbestred_ru37),
+ TEST(skpbenzoteh_ru152),
+ TEST(skpcamcorder_kz21),
+ TEST(skpcaffelavazzait_com_ua21),
+ TEST(skpcarrefour_ro62),
+ TEST(skpcavablar_net563),
+ TEST(skpinsomnia_gr72),
+ TEST(skpadbox_lt8),
+ TEST(skpact_com43),
+ TEST(skpacesoftech_com47),
+ TEST(skpabcspark_ca103),
+ TEST(cubicOp94u),
+ TEST(cubicOp93d),
+ TEST(cubicOp92i),
+ TEST(skpadithya_putr4_blogspot_com551),
+ TEST(skpadindex_de4),
+ TEST(skpaiaigames_com870),
+ TEST(skpaaalgarve_org53),
+ TEST(skpkkiste_to716),
+ TEST(cubicOp91u),
+ TEST(cubicOp90u),
+ TEST(cubicOp89u),
+ TEST(cubicOp88u),
+ TEST(cubicOp87u),
+ TEST(cubicOp86i),
+ TEST(loopEdge2),
+ TEST(loopEdge1),
+ TEST(rectOp3x),
+ TEST(rectOp2i),
+ TEST(rectOp1i),
+ TEST(issue1418b),
+ TEST(cubicOp85i),
+ TEST(issue1418),
+ TEST(skpkkiste_to98),
+ TEST(skpahrefs_com29),
+ TEST(cubicOp85d),
+ TEST(skpahrefs_com88),
+ TEST(skphealth_com76),
+ TEST(skpancestry_com1),
+ TEST(skpbyte_com1),
+ TEST(skpeldorado_com_ua1),
+ TEST(skp96prezzi1),
+ TEST(skpClip2),
+ TEST(skpClip1),
+ TEST(cubicOp84d),
+ TEST(cubicOp83i),
+ TEST(cubicOp82i),
+ TEST(cubicOp81d),
+ TEST(cubicOp80i),
+ TEST(cubicOp79u),
+ TEST(cubicOp78u),
+ TEST(cubicOp77i),
+ TEST(cubicOp76u),
+ TEST(cubicOp75d),
+ TEST(cubicOp74d),
+ TEST(cubicOp73d),
+ TEST(cubicOp72i),
+ TEST(cubicOp71d),
+ TEST(skp5),
+ TEST(skp4),
+ TEST(skp3),
+ TEST(skp2),
+ TEST(skp1),
+ TEST(rRect1),
+ TEST(cubicOp70d),
+ TEST(cubicOp69d),
+ TEST(cubicOp68u),
+ TEST(cubicOp67u),
+ TEST(cubicOp66u),
+ TEST(rectOp1d),
+ TEST(cubicOp65d),
+ TEST(cubicOp64d),
+ TEST(cubicOp63d),
+ TEST(cubicOp62d),
+ TEST(cubicOp61d),
+ TEST(cubicOp60d),
+ TEST(cubicOp59d),
+ TEST(cubicOp57d),
+ TEST(cubicOp56d),
+ TEST(cubicOp55d),
+ TEST(cubicOp54d),
+ TEST(cubicOp53d),
+ TEST(cubicOp52d),
+ TEST(cubicOp51d),
+ TEST(cubicOp50d),
+ TEST(cubicOp49d),
+ TEST(cubicOp48d),
+ TEST(cubicOp47d),
+ TEST(cubicOp46d),
+ TEST(cubicOp45d),
+ TEST(cubicOp44d),
+ TEST(cubicOp43d),
+ TEST(cubicOp42d),
+ TEST(cubicOp41i),
+ TEST(cubicOp40d),
+ TEST(cubicOp39d),
+ TEST(cubicOp38d),
+ TEST(cubicOp37d),
+ TEST(cubicOp36u),
+ TEST(cubicOp35d),
+ TEST(cubicOp34d),
+ TEST(cubicOp33i),
+ TEST(cubicOp32d),
+ TEST(cubicOp31d),
+ TEST(cubicOp31x),
+ TEST(cubicOp31u),
+ TEST(cubicOp30d),
+ TEST(cubicOp29d),
+ TEST(cubicOp28u),
+ TEST(cubicOp27d),
+ TEST(cubicOp26d),
+ TEST(cubicOp25i),
+ TEST(testOp8d),
+ TEST(testDiff1),
+ TEST(testIntersect1),
+ TEST(testUnion1),
+ TEST(testXor1),
+ TEST(testDiff2),
+ TEST(testIntersect2),
+ TEST(testUnion2),
+ TEST(testXor2),
+ TEST(testOp1d),
+ TEST(testOp2d),
+ TEST(testOp3d),
+ TEST(testOp1u),
+ TEST(testOp4d),
+ TEST(testOp5d),
+ TEST(testOp6d),
+ TEST(testOp7d),
+ TEST(testOp2u),
+
+ TEST(cubicOp24d),
+ TEST(cubicOp23d),
+ TEST(cubicOp22d),
+ TEST(cubicOp21d),
+ TEST(cubicOp20d),
+ TEST(cubicOp19i),
+ TEST(cubicOp18d),
+ TEST(cubicOp17d),
+ TEST(cubicOp16d),
+ TEST(cubicOp15d),
+ TEST(cubicOp14d),
+ TEST(cubicOp13d),
+ TEST(cubicOp12d),
+ TEST(cubicOp11d),
+ TEST(cubicOp10d),
+ TEST(cubicOp1i),
+ TEST(cubicOp9d),
+ TEST(quadOp9d),
+ TEST(lineOp9d),
+ TEST(cubicOp8d),
+ TEST(cubicOp7d),
+ TEST(cubicOp6d),
+ TEST(cubicOp5d),
+ TEST(cubicOp3d),
+ TEST(cubicOp2d),
+ TEST(cubicOp1d),
+};
+
+static const size_t testCount = SK_ARRAY_COUNT(tests);
+
+static struct TestDesc subTests[] = {
+ TEST(loops47i),
+ TEST(loops61i),
+ TEST(loops62i),
+ TEST(issue3517),
+};
+
+static const size_t subTestCount = SK_ARRAY_COUNT(subTests);
+
+static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = nullptr;
+
+static bool runSubTests = false;
+static bool runSubTestsFirst = true;
+static bool runReverse = false;
+
+DEF_TEST(PathOpsOp, reporter) {
+#if DEBUG_SHOW_TEST_NAME
+ strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH);
+#endif
+ if (runSubTests && runSubTestsFirst) {
+ RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse);
+ }
+ RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runReverse);
+ if (runSubTests && !runSubTestsFirst) {
+ RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse);
+ }
+}
+
+static void fuzz535151(skiatest::Reporter* reporter, const char* filename) {
+ SkPath one;
+ one.setFillType(SkPath::kWinding_FillType);
+ SkPath two;
+ two.setFillType(SkPath::kWinding_FillType);
+ two.moveTo(0, 0);
+ two.lineTo(0, 50);
+ two.lineTo(4.29497e+09f, 50);
+ SkPath dummy;
+ testPathOpFuzz(reporter, one, two, kIntersect_SkPathOp, filename);
+}
+
+static void bufferOverflow(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0,0, 300,170141183460469231731687303715884105728.f);
+ SkPath pathB;
+ pathB.addRect(0,0, 300,16);
+ testPathOpFuzz(reporter, path, pathB, kUnion_SkPathOp, filename);
+}
+
+// m 100,0 60,170 -160,-110 200,0 -170,11000000000 z
+static void fuzz433(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1, path2;
+ path1.moveTo(100,0);
+ path1.lineTo(60,170);
+ path1.lineTo(-160,-110);
+ path1.lineTo(200,0);
+ path1.lineTo(-170,11000000000.0f);
+ path1.close();
+
+ path2.moveTo(100 + 20,0 + 20);
+ path2.lineTo(60 + 20,170 + 20);
+ path2.lineTo(-160 + 20,-110 + 20);
+ path2.lineTo(200 + 20,0 + 20);
+ path2.lineTo(-170 + 20,11000000000.0f + 20);
+ path2.close();
+
+ testPathOpFuzz(reporter, path1, path2, kIntersect_SkPathOp, filename);
+}
+
+static void fuzz433b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1, path2;
+ path1.setFillType(SkPath::kEvenOdd_FillType);
+ path1.moveTo(140, 40);
+ path1.lineTo(200, 210);
+ path1.lineTo(40, 100);
+ path1.lineTo(240, 100);
+ path1.lineTo(70, 1.1e+10f);
+ path1.lineTo(140, 40);
+ path1.close();
+
+ path1.setFillType(SkPath::kWinding_FillType);
+ path2.moveTo(190, 60);
+ path2.lineTo(250, 230);
+ path2.lineTo(90, 120);
+ path2.lineTo(290, 120);
+ path2.lineTo(120, 1.1e+10f);
+ path2.lineTo(190, 60);
+ path2.close();
+
+ testPathOpFuzz(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void fuzz487a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42633333));
+path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc));
+path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41a3ffff));
+path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a));
+path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a));
+path.cubicTo(SkBits2Float(0x429c6668), SkBits2Float(0x425d999a), SkBits2Float(0x4279999c), SkBits2Float(0x42886667), SkBits2Float(0x42673335), SkBits2Float(0x42ab0000));
+path.lineTo(SkBits2Float(0x41c0ccd0), SkBits2Float(0x42990000));
+path.cubicTo(SkBits2Float(0x41b33336), SkBits2Float(0x42a5999a), SkBits2Float(0x41ac0003), SkBits2Float(0x42b2cccd), SkBits2Float(0x41ac0003), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4261999c), SkBits2Float(0x434d3333), SkBits2Float(0x4364e667), SkBits2Float(0x4346b333), SkBits2Float(0x4364e667), SkBits2Float(0x43400000));
+path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x42a20000), SkBits2Float(0x43016667), SkBits2Float(0x4287cccd), SkBits2Float(0x42ea999a), SkBits2Float(0x4273999a));
+path.lineTo(SkBits2Float(0x4306cccd), SkBits2Float(0x41f5999a));
+path.cubicTo(SkBits2Float(0x42f76667), SkBits2Float(0x41c26667), SkBits2Float(0x42dd999a), SkBits2Float(0x41a4cccd), SkBits2Float(0x42c23334), SkBits2Float(0x41a4cccd));
+path.lineTo(SkBits2Float(0x42c23334), SkBits2Float(0x425e0000));
+path.cubicTo(SkBits2Float(0x42a43334), SkBits2Float(0x425e0000), SkBits2Float(0x428a0001), SkBits2Float(0x427ecccd), SkBits2Float(0x42780002), SkBits2Float(0x4297999a));
+path.lineTo(SkBits2Float(0x41fccccd), SkBits2Float(0x42693333));
+path.cubicTo(SkBits2Float(0x41c9999a), SkBits2Float(0x428acccd), SkBits2Float(0x41ac0000), SkBits2Float(0x42a4999a), SkBits2Float(0x41ac0000), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4261999a), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4261999a), SkBits2Float(0x42de0000), SkBits2Float(0x42813333), SkBits2Float(0x42f83333), SkBits2Float(0x42996666), SkBits2Float(0x4303199a));
+path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x431cb334));
+path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd));
+path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd));
+path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd));
+path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334));
+path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43080000));
+path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz487b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42633333));
+path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc));
+path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41a3ffff));
+path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a));
+path.lineTo(SkBits2Float(0x42c20001), SkBits2Float(0x425d999a));
+path.cubicTo(SkBits2Float(0x429c6668), SkBits2Float(0x425d999a), SkBits2Float(0x4279999c), SkBits2Float(0x42886667), SkBits2Float(0x42673335), SkBits2Float(0x42ab0000));
+path.lineTo(SkBits2Float(0x41c0ccd0), SkBits2Float(0x42990000));
+path.cubicTo(SkBits2Float(0x41b33336), SkBits2Float(0x42a5999a), SkBits2Float(0x41ac0003), SkBits2Float(0x42b2cccd), SkBits2Float(0x41ac0003), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4261999c), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4261999c), SkBits2Float(0x434d3333), SkBits2Float(0x4364e667), SkBits2Float(0x4346b333), SkBits2Float(0x4364e667), SkBits2Float(0x43400000));
+path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x42a20000), SkBits2Float(0x43016667), SkBits2Float(0x4287cccd), SkBits2Float(0x42ea999a), SkBits2Float(0x4273999a));
+path.lineTo(SkBits2Float(0x4306cccd), SkBits2Float(0x41f5999a));
+path.cubicTo(SkBits2Float(0x42f76667), SkBits2Float(0x41c26667), SkBits2Float(0x42dd999a), SkBits2Float(0x41a4cccd), SkBits2Float(0x42c23334), SkBits2Float(0x41a4cccd));
+path.lineTo(SkBits2Float(0x42c23334), SkBits2Float(0x425e0000));
+path.cubicTo(SkBits2Float(0x42a43334), SkBits2Float(0x425e0000), SkBits2Float(0x428a0001), SkBits2Float(0x427ecccd), SkBits2Float(0x42780002), SkBits2Float(0x4297999a));
+path.lineTo(SkBits2Float(0x41fccccd), SkBits2Float(0x42693333));
+path.cubicTo(SkBits2Float(0x41c9999a), SkBits2Float(0x428acccd), SkBits2Float(0x41ac0000), SkBits2Float(0x42a4999a), SkBits2Float(0x41ac0000), SkBits2Float(0x42c00000));
+path.lineTo(SkBits2Float(0x4261999a), SkBits2Float(0x42c00000));
+path.cubicTo(SkBits2Float(0x4261999a), SkBits2Float(0x42de0000), SkBits2Float(0x42813333), SkBits2Float(0x42f83333), SkBits2Float(0x42996666), SkBits2Float(0x4303199a));
+path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x431cb334));
+path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd));
+path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd));
+path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd));
+path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334));
+path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43080000));
+path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000));
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz714(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x430c0000), SkBits2Float(0x42200000));
+path.lineTo(SkBits2Float(0x43480000), SkBits2Float(0x43520000));
+path.lineTo(SkBits2Float(0x42200000), SkBits2Float(0x42c80000));
+path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x42c80000)); // 2.22222e+022f
+path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x43520000)); // 2.22222e+022f
+path.lineTo(SkBits2Float(0x430c0000), SkBits2Float(0x42200000));
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x43200000), SkBits2Float(0x42700000));
+path.lineTo(SkBits2Float(0x435c0000), SkBits2Float(0x43660000));
+path.lineTo(SkBits2Float(0x42700000), SkBits2Float(0x42f00000));
+path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x42f00000)); // 2.22222e+022f
+path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x43660000)); // 2.22222e+022f
+path.lineTo(SkBits2Float(0x43200000), SkBits2Float(0x42700000));
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x7f800000), SkBits2Float(0x7f800000));
+path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000));
+path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000));
+path.quadTo(SkBits2Float(0xffc00000), SkBits2Float(0x7f800000), SkBits2Float(0xffc00000), SkBits2Float(0x7f800000));
+path.quadTo(SkBits2Float(0xff000001), SkBits2Float(0x7f800000), SkBits2Float(0xff000001), SkBits2Float(0x7f800000));
+path.quadTo(SkBits2Float(0xff000001), SkBits2Float(0xffc00000), SkBits2Float(0xffc00000), SkBits2Float(0xffc00000));
+path.quadTo(SkBits2Float(0xffc00000), SkBits2Float(0xff000001), SkBits2Float(0x7f800000), SkBits2Float(0xff000001));
+path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0xff000001), SkBits2Float(0x7f800000), SkBits2Float(0xffc00000));
+path.quadTo(SkBits2Float(0x7f800000), SkBits2Float(0xffc00000), SkBits2Float(0x7f800000), SkBits2Float(0x7f800000));
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+
+static void fuzz753_91(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x42910000), SkBits2Float(0x00000000)); // 72.5f, 0
+path.lineTo(SkBits2Float(0x42166668), SkBits2Float(0x00000000)); // 37.6f, 0
+path.cubicTo(SkBits2Float(0x42166668), SkBits2Float(0xc1966668), SkBits2Float(0x41c66668), SkBits2Float(0xc20a6666), SkBits2Float(0x40f00010), SkBits2Float(0xc21ccccd)); // 37.6f, -18.8f, 24.8f, -34.6f, 7.50001f, -39.2f
+path.lineTo(SkBits2Float(0x41840004), SkBits2Float(0xc291cccd)); // 16.5f, -72.9f
+path.lineTo(SkBits2Float(0x42fb6668), SkBits2Float(0x42c73334)); // 125.7f, 99.6f
+path.lineTo(SkBits2Float(0x43646668), SkBits2Float(0x43880ccd)); // 228.4f, 272.1f
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x428bf702), SkBits2Float(0xcf223cbf)); // 69.9824f, -2.72189e+09f
+path.lineTo(SkBits2Float(0x42112d68), SkBits2Float(0xcf223cbf)); // 36.2943f, -2.72189e+09f
+path.cubicTo(SkBits2Float(0x4220d9fc), SkBits2Float(0xcf223cc0), SkBits2Float(0x420ee118), SkBits2Float(0xcf223cc0), SkBits2Float(0x41cef2f8), SkBits2Float(0xcf223cc0)); // 40.2129f, -2.72189e+09f, 35.7198f, -2.72189e+09f, 25.8686f, -2.72189e+09f
+path.lineTo(SkBits2Float(0x424a99e0), SkBits2Float(0xcf223cc0)); // 50.6503f, -2.72189e+09f
+path.cubicTo(SkBits2Float(0x42266e32), SkBits2Float(0xcf223cc0), SkBits2Float(0x41f0fa20), SkBits2Float(0xcf223cc0), SkBits2Float(0x41872ed4), SkBits2Float(0xcf223cc0)); // 41.6076f, -2.72189e+09f, 30.1221f, -2.72189e+09f, 16.8979f, -2.72189e+09f
+path.lineTo(SkBits2Float(0x40f8fbe0), SkBits2Float(0xcf223cc0)); // 7.78075f, -2.72189e+09f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void bug597926_0(skiatest::Reporter* reporter, const char* filename) {
+SkPath path;
+path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x43b38000), SkBits2Float(0x433e0000)); // 359, 190
+path.lineTo(SkBits2Float(0x40c00000), SkBits2Float(0x449ce000)); // 6, 1255
+path.cubicTo(SkBits2Float(0x438c0000), SkBits2Float(0x4497a000), SkBits2Float(0x43e40000), SkBits2Float(0x44750000), SkBits2Float(0x41000000), SkBits2Float(0x44aa2000)); // 280, 1213, 456, 980, 8, 1361
+path.moveTo(SkBits2Float(0x43290000), SkBits2Float(0x4431c000)); // 169, 711
+path.lineTo(SkBits2Float(0xd987d6ba), SkBits2Float(0xd93d0ad4)); // -4.7794e+15f, -3.32567e+15f
+path.conicTo(SkBits2Float(0x43cc8000), SkBits2Float(0x445b8000), SkBits2Float(0xd888b096), SkBits2Float(0xd9a1ebfa), SkBits2Float(0x3ebcb199)); // 409, 878, -1.20234e+15f, -5.69712e+15f, 0.368542f
+path.cubicTo(SkBits2Float(0x43c00000), SkBits2Float(0x443a8000), SkBits2Float(0x42380000), SkBits2Float(0x4421c000), SkBits2Float(0x42500000), SkBits2Float(0x448ca000)); // 384, 746, 46, 647, 52, 1125
+path.quadTo(SkBits2Float(0x43948000), SkBits2Float(0x42ac0000), SkBits2Float(0x43880000), SkBits2Float(0x4487e000)); // 297, 86, 272, 1087
+SkPath path1(path);
+path.reset();
+path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0xc51d735c), SkBits2Float(0xc49db029)); // -2519.21f, -1261.51f
+path.cubicTo(SkBits2Float(0xc51d1dbd), SkBits2Float(0xc49d7a3f), SkBits2Float(0xc51c524a), SkBits2Float(0xc49d1610), SkBits2Float(0xc51d1a96), SkBits2Float(0xc49d86a6)); // -2513.86f, -1259.82f, -2501.14f, -1256.69f, -2513.66f, -1260.21f
+path.cubicTo(SkBits2Float(0xc51cd471), SkBits2Float(0xc49d54d0), SkBits2Float(0xc51c2e51), SkBits2Float(0xc49d0081), SkBits2Float(0xc51d197b), SkBits2Float(0xc49d7927)); // -2509.28f, -1258.65f, -2498.89f, -1256.02f, -2513.59f, -1259.79f
+path.quadTo(SkBits2Float(0xc51bf7eb), SkBits2Float(0xc49cf010), SkBits2Float(0xc51ba866), SkBits2Float(0xc49cb9e6)); // -2495.49f, -1255.5f, -2490.52f, -1253.81f
+path.cubicTo(SkBits2Float(0xc51bac0d), SkBits2Float(0xc49cc50e), SkBits2Float(0xc51c29eb), SkBits2Float(0xc49cfb01), SkBits2Float(0xc51c5bca), SkBits2Float(0xc49d1fa6)); // -2490.75f, -1254.16f, -2498.62f, -1255.84f, -2501.74f, -1256.99f
+SkPath path2(path);
+testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename);
+}
+
+static void fuzz1450_0(skiatest::Reporter* reporter, const char* filename) {
+SkPath path;
+path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0xcf000000)); // 360, -2.14748e+09f
+path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcf000000), SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffe), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, -2.14748e+09f, 1.07374e+09f, -1.07374e+09f, 0.707107f
+path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0x43800001), SkBits2Float(0x43348000), SkBits2Float(0x43800001), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, 256, 180.5f, 256, 0.707107f
+SkPath path1(path);
+path.reset();
+path.moveTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140
+path.conicTo(SkBits2Float(0x43b40005), SkBits2Float(0x458a945d), SkBits2Float(0x45610000), SkBits2Float(0x458a945d), SkBits2Float(0x3f3504f3)); // 360, 4434.55f, 3600, 4434.55f, 0.707107f
+path.conicTo(SkBits2Float(0x45d5bfff), SkBits2Float(0x458a945d), SkBits2Float(0x45d5bfff), SkBits2Float(0x45816000), SkBits2Float(0x3f3504f3)); // 6840, 4434.55f, 6840, 4140, 0.707107f
+path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512
+path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16
+path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x44800000)); // 360, 1024
+path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140
+path.close();
+SkPath path2(path);
+testPathOpFuzz(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void fuzz1450_1(skiatest::Reporter* reporter, const char* filename) {
+SkPath path;
+path.setFillType(SkPath::kEvenOdd_FillType);
+path.moveTo(SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffe)); // 1.07374e+09f, -1.07374e+09f
+path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0xcf000000), SkBits2Float(0x43b40000), SkBits2Float(0xcf000000), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, -2.14748e+09f, 360, -2.14748e+09f, 0.707107f
+path.lineTo(SkBits2Float(0x43348000), SkBits2Float(0x43800001)); // 180.5f, 256
+path.lineTo(SkBits2Float(0x42000000), SkBits2Float(0x41800000)); // 32, 16
+path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x44000000)); // 100, 512
+path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f
+path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x44800000)); // 360, 1024
+path.lineTo(SkBits2Float(0x43b40000), SkBits2Float(0x45816000)); // 360, 4140
+path.conicTo(SkBits2Float(0x43b40005), SkBits2Float(0x458a945d), SkBits2Float(0x45610000), SkBits2Float(0x458a945d), SkBits2Float(0x3f3504f3)); // 360, 4434.55f, 3600, 4434.55f, 0.707107f
+path.conicTo(SkBits2Float(0x45d5bfff), SkBits2Float(0x458a945d), SkBits2Float(0x45d5bfff), SkBits2Float(0x45816000), SkBits2Float(0x3f3504f3)); // 6840, 4434.55f, 6840, 4140, 0.707107f
+path.lineTo(SkBits2Float(0x43553abd), SkBits2Float(0x440f3cbd)); // 213.229f, 572.949f
+path.lineTo(SkBits2Float(0x43348000), SkBits2Float(0x43800001)); // 180.5f, 256
+path.conicTo(SkBits2Float(0x4e800002), SkBits2Float(0x43800001), SkBits2Float(0x4e800002), SkBits2Float(0xce7ffffe), SkBits2Float(0x3f3504f4)); // 1.07374e+09f, 256, 1.07374e+09f, -1.07374e+09f, 0.707107f
+path.close();
+SkPath path1(path);
+path.reset();
+path.moveTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321
+path.lineTo(SkBits2Float(0x45d5c000), SkBits2Float(0x43870000)); // 6840, 270
+path.lineTo(SkBits2Float(0xd0a00000), SkBits2Float(0x4cbebc20)); // -2.14748e+10f, 1e+08
+path.lineTo(SkBits2Float(0x451f7000), SkBits2Float(0x42800000)); // 2551, 64
+path.lineTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321
+path.close();
+SkPath path2(path);
+testPathOpFuzz(reporter, path1, path2, kUnion_SkPathOp, filename);
+}
+
+static void fuzz763_9(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321), SkBits2Float(0xed7a6a4b), SkBits2Float(0x1f212a8c)); // 2.49282e-13f, 4.78968e-34f, 1.99397e+36f, -4.84373e+27f, 3.41283e-20f
+path.lineTo(SkBits2Float(0x7bc00321), SkBits2Float(0xed7a6a4b)); // 1.99397e+36f, -4.84373e+27f
+path.lineTo(SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28)); // 9.4495e-15f, 0.000617492f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3), SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6)); // -8.10388e-33f, 0.00148185f, 2.25206e-21f, 5.54035e+21f
+path.moveTo(SkBits2Float(0x29272a81), SkBits2Float(0x2ab03a55)); // 3.71183e-14f, 3.13044e-13f
+path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3a214729), SkBits2Float(0xdf28282a), SkBits2Float(0x8a2f2121)); // 2.22225e-15f, 0.000615227f, -1.2117e+19f, -8.43217e-33f
+path.quadTo(SkBits2Float(0x373b3a27), SkBits2Float(0x201fc4c1), SkBits2Float(0x27576c2a), SkBits2Float(0x5921c25d)); // 1.11596e-05f, 1.35329e-19f, 2.98959e-15f, 2.8457e+15f
+path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3a214729), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21)); // 2.22225e-15f, 0.000615227f, -1.2117e+19f, 0.00105459f
+path.cubicTo(SkBits2Float(0x373b3ac5), SkBits2Float(0x201fc422), SkBits2Float(0x523a702a), SkBits2Float(0x27576c51), SkBits2Float(0x5921c25d), SkBits2Float(0x51523a70)); // 1.11598e-05f, 1.35327e-19f, 2.00186e+11f, 2.9896e-15f, 2.8457e+15f, 5.64327e+10f
+path.quadTo(SkBits2Float(0xd912102a), SkBits2Float(0x284f9a28), SkBits2Float(0xb38a1f30), SkBits2Float(0x3a3ac23a)); // -2.56957e+15f, 1.15242e-14f, -6.4318e-08f, 0.000712428f
+path.lineTo(SkBits2Float(0xc809272a), SkBits2Float(0x29b02829)); // -140445, 7.82294e-14f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename);
+}
+
+
+static void fuzz763_4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x555b3a2d), SkBits2Float(0x2a212a8c)); // 1.50652e+13f, 1.43144e-13f
+path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f
+path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac2b33a)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148544f
+path.cubicTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6), SkBits2Float(0x295b2d2a), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c275b)); // 2.25206e-21f, 5.54035e+21f, 4.86669e-14f, 3.19905e+24f, 9.6297e-12f, 2.48963e-13f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f
+path.lineTo(SkBits2Float(0x2a212a8c), SkBits2Float(0x2a21081f)); // 1.43144e-13f, 1.43025e-13f
+path.conicTo(SkBits2Float(0xde6a4b7b), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a6a)); // -4.22068e+18f, 2.50338e-13f, 4.61198e-19f, 0.00096035f, 121589
+path.lineTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f
+path.close();
+path.moveTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f
+path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f
+path.lineTo(SkBits2Float(0x2928088c), SkBits2Float(0x2be61d2a)); // 3.73109e-14f, 1.63506e-12f
+path.conicTo(SkBits2Float(0x2a812a63), SkBits2Float(0x2d292a27), SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x552d6829)); // 2.29444e-13f, 9.6159e-12f, 1.5954e+13f, 4.87407e+16f, 1.19164e+13f
+path.conicTo(SkBits2Float(0x395b2d5b), SkBits2Float(0x68552768), SkBits2Float(0x555b2df0), SkBits2Float(0x1f722a8c), SkBits2Float(0x082a212a)); // 0.000209024f, 4.02636e+24f, 1.50619e+13f, 5.12807e-20f, 5.11965e-34f
+path.lineTo(SkBits2Float(0x55685b1f), SkBits2Float(0x5b2d2968)); // 1.59674e+13f, 4.87407e+16f
+path.close();
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2147ed7a), SkBits2Float(0x28282a3a), SkBits2Float(0x21df212a), SkBits2Float(0x033a8a3a)); // 6.14991e+25f, 6.77381e-19f, 9.33503e-15f, 1.51198e-18f, 5.48192e-37f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename);
+}
+
+static void fuzz763_3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c)); // 1.50606e+13f, 1.43144e-13f
+path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x295b2d1f), SkBits2Float(0x29685568)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.86669e-14f, 5.15884e-14f
+path.conicTo(SkBits2Float(0x8c28295b), SkBits2Float(0x1f21212a), SkBits2Float(0xc0032a08), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced)); // -1.29547e-31f, 3.41205e-20f, -2.04944f, 3.04132e+35f, 5.77848e-19f
+path.moveTo(SkBits2Float(0x25682929), SkBits2Float(0x212a8c5b)); // 2.01367e-16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4a7bc0)); // 4.7323e-37f, 6.11969e+25f
+path.conicTo(SkBits2Float(0x032108ed), SkBits2Float(0x283a7bc0), SkBits2Float(0x47ed7a6a), SkBits2Float(0x282a3a21), SkBits2Float(0x3a21ff28)); // 4.73239e-37f, 1.03519e-14f, 121589, 9.4495e-15f, 0.000617968f
+path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3), SkBits2Float(0x2a292827), SkBits2Float(0x962be61d)); // -8.10388e-33f, 0.00148185f, 1.50241e-13f, -1.38859e-25f
+path.lineTo(SkBits2Float(0x295b2d2a), SkBits2Float(0x2d296868)); // 4.86669e-14f, 9.62972e-12f
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x898ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a6a)); // 6.14991e+25f, -3.39271e-33f, 4.61198e-19f, 0.00096035f, 121589
+path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.close();
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0xb38a281a), SkBits2Float(0x29283ac2)); // -1.2117e+19f, 0.00105459f, -6.43342e-08f, 3.73545e-14f
+path.moveTo(SkBits2Float(0x962be61d), SkBits2Float(0x432a2927)); // -1.38859e-25f, 170.161f
+path.conicTo(SkBits2Float(0x3a2a552a), SkBits2Float(0x3b1e2ab0), SkBits2Float(0x29272021), SkBits2Float(0x3b3ac527), SkBits2Float(0x1fc42236)); // 0.000649768f, 0.00241343f, 3.71093e-14f, 0.00284989f, 8.30658e-20f
+path.cubicTo(SkBits2Float(0x27576c2a), SkBits2Float(0x5921c25d), SkBits2Float(0x51503a70), SkBits2Float(0x12102a10), SkBits2Float(0x633a28d9), SkBits2Float(0x29c80927)); // 2.98959e-15f, 2.8457e+15f, 5.58959e+10f, 4.54902e-28f, 3.43404e+21f, 8.88337e-14f
+path.lineTo(SkBits2Float(0x272927b0), SkBits2Float(0x5b392929)); // 2.3475e-15f, 5.21181e+16f
+path.moveTo(SkBits2Float(0x3a1127b4), SkBits2Float(0x2921ee3b)); // 0.000553723f, 3.59558e-14f
+path.cubicTo(SkBits2Float(0x5e215d3b), SkBits2Float(0x7828ee3a), SkBits2Float(0x8e28b03b), SkBits2Float(0x50783be8), SkBits2Float(0x9e0b8a3a), SkBits2Float(0x555b2d68)); // 2.90688e+18f, 1.37053e+34f, -2.07925e-30f, 1.66587e+10f, -7.38718e-21f, 1.50618e+13f
+path.moveTo(SkBits2Float(0x21081f3f), SkBits2Float(0x9fd4e62a)); // 4.61199e-19f, -9.01663e-20f
+path.cubicTo(SkBits2Float(0x3a293a2a), SkBits2Float(0x0e3bf0c5), SkBits2Float(0x3b29d42a), SkBits2Float(0x0f217265), SkBits2Float(0x2d5d2921), SkBits2Float(0x5568295b)); // 0.000645551f, 2.31655e-30f, 0.00259138f, 7.95994e-30f, 1.25715e-11f, 1.5954e+13f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename);
+}
+
+static void fuzz763_5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f
+path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b79), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f
+path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f
+path.cubicTo(SkBits2Float(0xe62a2928), SkBits2Float(0x2a63962b), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x001f2a21)); // -2.0089e+23f, 2.02138e-13f, 3.19905e+24f, 9.6297e-12f, 2.49282e-13f, 2.86201e-39f
+path.lineTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f
+path.close();
+path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a6a)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, 0.00096035f, 121589
+path.lineTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f
+path.close();
+path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x2a2a8c55)); // 4.76191e+16f, 1.51477e-13f
+path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3b21), SkBits2Float(0x28ee4f9a), SkBits2Float(0x68293b78)); // -1.2117e+19f, 0.00105462f, 2.64578e-14f, 3.19671e+24f
+path.lineTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x5b2d8c55)); // 4.87407e+16f, 4.88495e+16f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c)); // 1.50606e+13f, 1.43144e-13f
+path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f
+path.lineTo(SkBits2Float(0x081f2ad7), SkBits2Float(0x7bc00321)); // 4.78977e-34f, 1.99397e+36f
+path.moveTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f
+path.quadTo(SkBits2Float(0x4f1a3a8a), SkBits2Float(0x3ab38a28), SkBits2Float(0x29283ac2), SkBits2Float(0x962be62a)); // 2.58753e+09f, 0.00136978f, 3.73545e-14f, -1.38859e-25f
+path.cubicTo(SkBits2Float(0x272a812a), SkBits2Float(0x3a2a5529), SkBits2Float(0x3b1e2ab0), SkBits2Float(0x29272021), SkBits2Float(0x3b3ac527), SkBits2Float(0x1fc42237)); // 2.36623e-15f, 0.000649768f, 0.00241343f, 3.71093e-14f, 0.00284989f, 8.30658e-20f
+path.cubicTo(SkBits2Float(0x27576c2a), SkBits2Float(0x5921c25d), SkBits2Float(0x51523a70), SkBits2Float(0x12102a10), SkBits2Float(0x633a28d9), SkBits2Float(0x29c80927)); // 2.98959e-15f, 2.8457e+15f, 5.64327e+10f, 4.54902e-28f, 3.43404e+21f, 8.88337e-14f
+path.lineTo(SkBits2Float(0x29292727), SkBits2Float(0x21475b3b)); // 3.75595e-14f, 6.75446e-19f
+path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f
+path.cubicTo(SkBits2Float(0x682d2928), SkBits2Float(0x555b6829), SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 3.27091e+24f, 1.50775e+13f, 1.50606e+13f, 1.43144e-13f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x295b2ded), SkBits2Float(0x29685568), SkBits2Float(0x8c555b2d), SkBits2Float(0xe61d2a2a), SkBits2Float(0x2a63962b)); // 4.86676e-14f, 5.15884e-14f, -1.64364e-31f, -1.85547e+23f, 2.02138e-13f
+path.conicTo(SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a), SkBits2Float(0x4b7bc003)); // 1.5954e+13f, 4.87407e+16f, 5.7784e-19f, 4.61198e-19f, 1.64987e+07f
+path.lineTo(SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21)); // 2.50338e-13f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a3a7bc0), SkBits2Float(0x2147ed7a), SkBits2Float(0x28282a3a), SkBits2Float(0x8a3a21df), SkBits2Float(0x27b42a3a)); // 5.63611e+25f, 6.77381e-19f, 9.33503e-15f, -8.96194e-33f, 5.00058e-15f
+path.conicTo(SkBits2Float(0x2921217d), SkBits2Float(0x5e3a3b35), SkBits2Float(0x7828ee3a), SkBits2Float(0x8e28b03b), SkBits2Float(0x783be82a)); // 3.57782e-14f, 3.35484e+18f, 1.37053e+34f, -2.07925e-30f, 1.52448e+34f
+path.conicTo(SkBits2Float(0x8e0b8a3a), SkBits2Float(0x279fd4e6), SkBits2Float(0x7a293a2a), SkBits2Float(0x2a0ef0c5), SkBits2Float(0x653b29d4)); // -1.71996e-30f, 4.43622e-15f, 2.19669e+35f, 1.26957e-13f, 5.52409e+22f
+path.quadTo(SkBits2Float(0x29210f21), SkBits2Float(0x282a085d), SkBits2Float(0xc2ab2127), SkBits2Float(0xa6800028)); // 3.57623e-14f, 9.43871e-15f, -85.5648f, -8.88183e-16f
+path.lineTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f
+path.close();
+path.moveTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f
+path.quadTo(SkBits2Float(0x216a2770), SkBits2Float(0x2ab73b28), SkBits2Float(0x4b28f427), SkBits2Float(0x283b5b28)); // 7.93345e-19f, 3.25484e-13f, 1.10726e+07f, 1.04004e-14f
+path.lineTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f
+path.close();
+path.moveTo(SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828)); // 1.65317e-13f, -1.16126e+19f
+path.conicTo(SkBits2Float(0xf86d273b), SkBits2Float(0x27e523e3), SkBits2Float(0x2927e0f5), SkBits2Float(0x2ac0e729), SkBits2Float(0x6b492128)); // -1.92402e+34f, 6.35992e-15f, 3.72766e-14f, 3.42665e-13f, 2.43151e+26f
+path.cubicTo(SkBits2Float(0x2f273927), SkBits2Float(0xa83a2c21), SkBits2Float(0xd7122121), SkBits2Float(0x21212921), SkBits2Float(0x3be3db3a), SkBits2Float(0xa9deb63b)); // 1.52089e-10f, -1.03346e-14f, -1.60671e+14f, 5.46034e-19f, 0.00695362f, -9.89039e-14f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename);
+}
+
+// crbug.com/626164
+static void fuzz763_1c(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.cubicTo(SkBits2Float(0x1931204a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a4a34), SkBits2Float(0x4a4a4a4a)); // 9.15721e-24f, 1.14845e-12f, 3.31014e+06f, 3.31014e+06f, 3.31432e+06f, 3.31432e+06f
+ path.moveTo(SkBits2Float(0x000010a1), SkBits2Float(0x19312000)); // 5.96533e-42f, 9.15715e-24f
+ path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa14a4a4a), SkBits2Float(0x08ff2ba1), SkBits2Float(0x08ff4a4a), SkBits2Float(0x4a344a4a)); // 3.31432e+06f, 3.31432e+06f, -6.85386e-19f, 1.53575e-33f, 1.53647e-33f, 2.95387e+06f
+ path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4e4a08ff), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa1a181ff)); // 3.31432e+06f, 3.31432e+06f, 1.14845e-12f, 8.47397e+08f, 3.31432e+06f, -1.09442e-18f
+
+ SkPath path2(path);
+ SkPath dummy;
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp)4, filename);
+}
+
+// crbug.com/626186
+static void fuzz763_1b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.cubicTo(SkBits2Float(0x0000ff07), SkBits2Float(0xf9f9ff00), SkBits2Float(0xfe0ef9f4), SkBits2Float(0xd9b105fb), SkBits2Float(0x000000f9), SkBits2Float(0xfe11f901)); // 9.14866e-41f, -1.62257e+35f, -4.75121e+37f, -6.22846e+15f, 3.48923e-43f, -4.85077e+37f
+ path.lineTo(SkBits2Float(0xda1905ed), SkBits2Float(0x3c05fbfb)); // -1.0768e+16f, 0.00817775f
+ path.cubicTo(SkBits2Float(0x3c3c3c3c), SkBits2Float(0x3c3c3c3c), SkBits2Float(0x253c7f00), SkBits2Float(0xfa00d3fa), SkBits2Float(0x250025fe), SkBits2Float(0x00000006)); // 0.011489f, 0.011489f, 1.63494e-16f, -1.67228e+35f, 1.11151e-16f, 8.40779e-45f
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.quadTo(SkBits2Float(0x3c3c3c3c), SkBits2Float(0xfa253c3c), SkBits2Float(0xfefa00d3), SkBits2Float(0x25fad9df)); // 0.011489f, -2.14488e+35f, -1.66156e+38f, 4.35157e-16f
+ path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.close();
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.lineTo(SkBits2Float(0x8dfefa00), SkBits2Float(0xf0f9fad9)); // -1.57141e-30f, -6.1892e+29f
+ path.cubicTo(SkBits2Float(0x20fe58f9), SkBits2Float(0x0525fbed), SkBits2Float(0x1905ffff), SkBits2Float(0x01f9f9f9), SkBits2Float(0xfbfe0ef9), SkBits2Float(0xfb212fff)); // 4.30882e-19f, 7.80453e-36f, 6.92764e-24f, 9.18268e-38f, -2.63829e+36f, -8.36933e+35f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp)2, filename);
+}
+
+static void fuzz763_1a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.cubicTo(SkBits2Float(0x154be880), SkBits2Float(0x80000640), SkBits2Float(0x5559a419), SkBits2Float(0x59d55928), SkBits2Float(0x80045959), SkBits2Float(0x40154be8)); // 4.11789e-26f, -2.24208e-42f, 1.49562e+13f, 7.50652e+15f, -3.99394e-40f, 2.33276f
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.quadTo(SkBits2Float(0x5559a419), SkBits2Float(0x59d55928), SkBits2Float(0xbd595959), SkBits2Float(0x3f3f3f09)); // 1.49562e+13f, 7.50652e+15f, -0.0530637f, 0.747056f
+ path.moveTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0x3f3f3f3f)); // 0.747059f, 0.747059f
+ path.moveTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f
+ path.lineTo(SkBits2Float(0x09090909), SkBits2Float(0x3038d509)); // 1.6495e-33f, 6.72416e-10f
+ path.conicTo(SkBits2Float(0x5947ffff), SkBits2Float(0x40e88004), SkBits2Float(0x00002059), SkBits2Float(0x28555900), SkBits2Float(0x5959d559)); // 3.51844e+15f, 7.26563f, 1.16042e-41f, 1.18432e-14f, 3.83217e+15f
+ path.lineTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f
+ path.close();
+ path.moveTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f
+ path.lineTo(SkBits2Float(0x38d57f4b), SkBits2Float(0x59597f4b)); // 0.000101803f, 3.82625e+15f
+ path.lineTo(SkBits2Float(0x3f3f3f3f), SkBits2Float(0xff3f3f3f)); // 0.747059f, -2.54211e+38f
+ path.close();
+ path.moveTo(SkBits2Float(0x384700ff), SkBits2Float(0x0108804b)); // 4.74462e-05f, 2.50713e-38f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp)0, filename);
+}
+
+// crbug.com/627780
+static void fuzz763_3a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x555b292d), SkBits2Float(0x2a212a8c)); // 1.50606e+13f, 1.43144e-13f
+path.conicTo(SkBits2Float(0xc0032108), SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0)); // -2.04889f, 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f
+path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f
+path.cubicTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6), SkBits2Float(0x272a812a), SkBits2Float(0x295b2d29), SkBits2Float(0x2a685568), SkBits2Float(0x68295b2d)); // 2.25206e-21f, 5.54035e+21f, 2.36623e-15f, 4.86669e-14f, 2.06354e-13f, 3.19905e+24f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321), SkBits2Float(0x7a6a4b77), SkBits2Float(0x3a214726)); // 2.49282e-13f, 4.78968e-34f, 1.99397e+36f, 3.04132e+35f, 0.000615226f
+path.moveTo(SkBits2Float(0x8adf2028), SkBits2Float(0x3a219a3a)); // -2.14862e-32f, 0.000616464f
+path.quadTo(SkBits2Float(0x3ab38e28), SkBits2Float(0x29283ac2), SkBits2Float(0x2be61d2a), SkBits2Float(0x812a4396)); // 0.0013699f, 3.73545e-14f, 1.63506e-12f, -3.12726e-38f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename);
+}
+
+// crbug.com/627689
+static void fuzz763_5a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x38bd8610), SkBits2Float(0x00000000)); // 9.03719e-05f, 0
+path.conicTo(SkBits2Float(0x4183d871), SkBits2Float(0x41fea321), SkBits2Float(0xb700ff00), SkBits2Float(0x4240b8b8), SkBits2Float(0x3b058283)); // 16.4807f, 31.8297f, -7.68877e-06f, 48.1804f, 0.0020372f
+path.lineTo(SkBits2Float(0x3a3a3ab8), SkBits2Float(0xb8b8b8b8)); // 0.000710409f, -8.80821e-05f
+path.conicTo(SkBits2Float(0x3a455ec8), SkBits2Float(0xb8b8b8b3), SkBits2Float(0x38b2418d), SkBits2Float(0xb730d014), SkBits2Float(0x3f7ffff3)); // 0.000752908f, -8.80821e-05f, 8.49991e-05f, -1.05389e-05f, 0.999999f
+path.quadTo(SkBits2Float(0x3a51246a), SkBits2Float(0xb6da45a3), SkBits2Float(0x38bc5c3c), SkBits2Float(0x00000000)); // 0.000797814f, -6.50501e-06f, 8.98172e-05f, 0
+path.lineTo(SkBits2Float(0x3a3a3ab8), SkBits2Float(0xb8b8b8b8)); // 0.000710409f, -8.80821e-05f
+path.quadTo(SkBits2Float(0x39a32d2d), SkBits2Float(0x00000000), SkBits2Float(0xb8a13a00), SkBits2Float(0x00000000)); // 0.000311234f, 0, -7.68788e-05f, 0
+path.lineTo(SkBits2Float(0x3a3a3ab8), SkBits2Float(0xb8b8b8b8)); // 0.000710409f, -8.80821e-05f
+path.quadTo(SkBits2Float(0x39ba814c), SkBits2Float(0xb838fed2), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0.00035573f, -4.41063e-05f, 0, 0
+path.lineTo(SkBits2Float(0x38bd8610), SkBits2Float(0x00000000)); // 9.03719e-05f, 0
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+// crbug.com/627401
+static void fuzz763_2a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x3e484500), SkBits2Float(0x164f3a30), SkBits2Float(0x49484801), SkBits2Float(0x7d0100c8)); // 0.195576f, 1.67397e-25f, 820352, 1.07172e+37f
+path.conicTo(SkBits2Float(0xff7f36fd), SkBits2Float(0x3e647d01), SkBits2Float(0x0c00f430), SkBits2Float(0x486b6448), SkBits2Float(0x00484848)); // -3.39239e+38f, 0.223133f, 9.93424e-32f, 241041, 6.63809e-39f
+path.lineTo(SkBits2Float(0x4f4f557d), SkBits2Float(0x48480112)); // 3.47849e+09f, 204804
+path.lineTo(SkBits2Float(0xf40c01ff), SkBits2Float(0x45008000)); // -4.43702e+31f, 2056
+path.moveTo(SkBits2Float(0x4bfffa00), SkBits2Float(0x7d4ac859)); // 3.35514e+07f, 1.68465e+37f
+path.conicTo(SkBits2Float(0x7d014f3e), SkBits2Float(0x00f4ff01), SkBits2Float(0x6b64480c), SkBits2Float(0x48484848), SkBits2Float(0x557d0100)); // 1.07426e+37f, 2.24993e-38f, 2.75975e+26f, 205089, 1.73863e+13f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+// crbug.com/627761
+static void fuzz763_2b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x212a8c55)); // 4.76191e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f
+path.lineTo(SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21)); // 2.50338e-13f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a3a7bc0), SkBits2Float(0x4721ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28), SkBits2Float(0x4f9a3a8a)); // 5.63611e+25f, 41453.5f, 9.4495e-15f, 0.000617492f, 5.17506e+09f
+path.lineTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f
+path.close();
+path.moveTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f
+path.cubicTo(SkBits2Float(0x273ac23a), SkBits2Float(0x1d2a2928), SkBits2Float(0x63962be6), SkBits2Float(0x272a812a), SkBits2Float(0x295b2d29), SkBits2Float(0x29685568)); // 2.5918e-15f, 2.25206e-21f, 5.54035e+21f, 2.36623e-15f, 4.86669e-14f, 5.15884e-14f
+path.lineTo(SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321)); // 4.78968e-34f, 1.99397e+36f
+path.lineTo(SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28)); // 9.4495e-15f, 0.000617492f
+path.lineTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f
+path.close();
+path.moveTo(SkBits2Float(0x3b21081f), SkBits2Float(0x4b7bc003)); // 0.00245715f, 1.64987e+07f
+path.quadTo(SkBits2Float(0x8a4fc29a), SkBits2Float(0x3ab3283a), SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6)); // -1.00033e-32f, 0.00136686f, 2.25206e-21f, 300.343f
+path.moveTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f
+path.conicTo(SkBits2Float(0x1e2ab03a), SkBits2Float(0x2920213b), SkBits2Float(0x3b3ac527), SkBits2Float(0xc422333b), SkBits2Float(0x6c2a9f1f)); // 9.03617e-21f, 3.5556e-14f, 0.00284989f, -648.8f, 8.25075e+26f
+path.quadTo(SkBits2Float(0xc25d2757), SkBits2Float(0x3a705921), SkBits2Float(0x2a105152), SkBits2Float(0x28d91210)); // -55.2884f, 0.000916855f, 1.2818e-13f, 2.40997e-14f
+path.quadTo(SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21)); // 3.19905e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f
+path.lineTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f
+path.close();
+path.moveTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0xcb7bc003), SkBits2Float(0x47ed7a6a)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, -1.64987e+07f, 121589
+path.lineTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f
+path.close();
+path.moveTo(SkBits2Float(0x5b2d2a81), SkBits2Float(0x29276829)); // 4.87419e+16f, 3.71718e-14f
+path.quadTo(SkBits2Float(0xdf28282a), SkBits2Float(0x2d8a3a21), SkBits2Float(0x5b682b68), SkBits2Float(0x5b292d55)); // -1.2117e+19f, 1.57146e-11f, 6.53499e+16f, 4.76191e+16f
+path.lineTo(SkBits2Float(0x2a212a8c), SkBits2Float(0x0321081f)); // 1.43144e-13f, 4.7323e-37f
+path.conicTo(SkBits2Float(0x7a6a4b7b), SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x3a21477a)); // 3.04132e+35f, 5.77848e-19f, 4.7323e-37f, 5.63611e+25f, 0.000615231f
+path.moveTo(SkBits2Float(0x21df2828), SkBits2Float(0x9a3a8a3a)); // 1.51217e-18f, -3.85756e-23f
+path.quadTo(SkBits2Float(0x3ab38a28), SkBits2Float(0x28273ac2), SkBits2Float(0xe61d2a29), SkBits2Float(0x2a63962b)); // 0.00136978f, 9.2831e-15f, -1.85547e+23f, 2.02138e-13f
+path.conicTo(SkBits2Float(0x2d29272a), SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x5b2d6829), SkBits2Float(0x212a8c55)); // 9.61523e-12f, 1.5954e+13f, 4.87407e+16f, 4.88097e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x3a2147ed), SkBits2Float(0xdf28282a), SkBits2Float(0x3a8a3a21), SkBits2Float(0x8a284f9a), SkBits2Float(0x3ac23ab3)); // 0.000615238f, -1.2117e+19f, 0.00105459f, -8.10388e-33f, 0.00148185f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_2c(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x36344a4a)); // 0, 2.68653e-06f
+path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x364a4a4a), SkBits2Float(0x364a4a4a), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0, 3.01436e-06f, 3.01436e-06f, 0, 0
+path.lineTo(SkBits2Float(0x364a4a4a), SkBits2Float(0x00000000)); // 3.01436e-06f, 0
+path.cubicTo(SkBits2Float(0x364a30f0), SkBits2Float(0x344ac7fb), SkBits2Float(0x3656d432), SkBits2Float(0x34cabb48), SkBits2Float(0x367031a9), SkBits2Float(0x351802f1)); // 3.01288e-06f, 1.88855e-07f, 3.2012e-06f, 3.77617e-07f, 3.57917e-06f, 5.66287e-07f
+path.cubicTo(SkBits2Float(0x36a7b150), SkBits2Float(0x35ab09db), SkBits2Float(0x371874ed), SkBits2Float(0x3604f2c7), SkBits2Float(0x3784e0c7), SkBits2Float(0x36344a51)); // 4.99763e-06f, 1.27434e-06f, 9.08713e-06f, 1.98108e-06f, 1.58403e-05f, 2.68653e-06f
+path.cubicTo(SkBits2Float(0x3743dc9a), SkBits2Float(0x36344a4f), SkBits2Float(0x36fbef33), SkBits2Float(0x36344a4e), SkBits2Float(0x36604a35), SkBits2Float(0x36344a4c)); // 1.16743e-05f, 2.68653e-06f, 7.50823e-06f, 2.68653e-06f, 3.34218e-06f, 2.68653e-06f
+path.cubicTo(SkBits2Float(0x36531715), SkBits2Float(0x36344a4c), SkBits2Float(0x3645e3f5), SkBits2Float(0x36344a4b), SkBits2Float(0x3638b0d4), SkBits2Float(0x36344a4b)); // 3.14549e-06f, 2.68653e-06f, 2.9488e-06f, 2.68653e-06f, 2.75211e-06f, 2.68653e-06f
+path.cubicTo(SkBits2Float(0x35f64120), SkBits2Float(0x36344a4b), SkBits2Float(0x35764124), SkBits2Float(0x36344a4a), SkBits2Float(0x00000000), SkBits2Float(0x36344a4a)); // 1.83474e-06f, 2.68653e-06f, 9.17369e-07f, 2.68653e-06f, 0, 2.68653e-06f
+path.close();
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.cubicTo(SkBits2Float(0x1931204a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a4a34), SkBits2Float(0x4a4a4a4a)); // 9.15721e-24f, 1.14845e-12f, 3.31014e+06f, 3.31014e+06f, 3.31432e+06f, 3.31432e+06f
+path.moveTo(SkBits2Float(0x000010a1), SkBits2Float(0x19312000)); // 5.96533e-42f, 9.15715e-24f
+path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa14a4a4a), SkBits2Float(0x08ff2ba1), SkBits2Float(0x08ff4a4a), SkBits2Float(0x4a344a4a)); // 3.31432e+06f, 3.31432e+06f, -6.85386e-19f, 1.53575e-33f, 1.53647e-33f, 2.95387e+06f
+path.cubicTo(SkBits2Float(0x544a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4e4a08ff), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa1a181ff)); // 3.47532e+12f, 3.31432e+06f, 1.14845e-12f, 8.47397e+08f, 3.31432e+06f, -1.09442e-18f
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, kReverseDifference_SkPathOp, filename);
+}
+
+static void fuzz763_6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f
+path.cubicTo(SkBits2Float(0x68295b2d), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x68556829)); // 3.19905e+24f, 0, 0, 0, 0, 4.03114e+24f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f
+path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x67d55b2a), SkBits2Float(0x67296a4b), SkBits2Float(0x67555b2a), SkBits2Float(0x677e1f70), SkBits2Float(0x66d55b2a)); // 0, 2.01509e+24f, 8.00041e+23f, 1.00755e+24f, 1.20006e+24f, 5.03773e+23f
+path.cubicTo(SkBits2Float(0x678f0684), SkBits2Float(0x6684f008), SkBits2Float(0x6798f8ea), SkBits2Float(0x6625a942), SkBits2Float(0x67961914), SkBits2Float(0x65ce709a)); // 1.35084e+24f, 3.1389e+23f, 1.44478e+24f, 1.95578e+23f, 1.41764e+24f, 1.21861e+23f
+path.cubicTo(SkBits2Float(0x679174f7), SkBits2Float(0x63199132), SkBits2Float(0x6756c79f), SkBits2Float(0x606478de), SkBits2Float(0x65682bcf), SkBits2Float(0x00000000)); // 1.3738e+24f, 2.83281e+21f, 1.01427e+24f, 6.58526e+19f, 6.85248e+22f, 0
+path.conicTo(SkBits2Float(0x68295b02), SkBits2Float(0x60f7f28b), SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f), SkBits2Float(0x42784f5a)); // 3.19903e+24f, 1.42932e+20f, 0, 5.14279e+25f, 62.0775f
+path.close();
+path.moveTo(SkBits2Float(0x654d6d10), SkBits2Float(0x00000000)); // 6.06311e+22f, 0
+path.lineTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x00000000)); // 6.14991e+25f, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc0)); // 0, 6.14991e+25f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x3ac23a55), SkBits2Float(0x2a292827)); // 0.00148184f, 1.50241e-13f
+path.lineTo(SkBits2Float(0x63962be6), SkBits2Float(0x272a812a)); // 5.54035e+21f, 2.36623e-15f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x0f2a312a), SkBits2Float(0xc0032108)); // 8.39112e-30f, -2.04889f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68345b2d), SkBits2Float(0xf0682955)); // 3.40683e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x295b2d2a), SkBits2Float(0x08685568), SkBits2Float(0x7bc00321)); // 5.76397e-19f, -5.27821e+28f, 4.86669e-14f, 6.99154e-34f, 1.99397e+36f
+path.lineTo(SkBits2Float(0x68345b2d), SkBits2Float(0xf0682955)); // 3.40683e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68345b2d), SkBits2Float(0xf0682955)); // 3.40683e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.lineTo(SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a281a4f)); // 0.00105461f, -8.09385e-33f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x272a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 2.36623e-15f, 0.000649768f
+path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f, 2.34747e-15f
+path.conicTo(SkBits2Float(0xba1f203a), SkBits2Float(0xc422c538), SkBits2Float(0x215d5927), SkBits2Float(0x70ec2ac2), SkBits2Float(0x2a51523a)); // -0.000607017f, -651.082f, 7.49957e-19f, 5.84721e+29f, 1.85915e-13f
+path.quadTo(SkBits2Float(0x633ad912), SkBits2Float(0x29c80927), SkBits2Float(0x272927b0), SkBits2Float(0x683a5b2d)); // 3.44674e+21f, 8.88337e-14f, 2.3475e-15f, 3.52017e+24f
+path.lineTo(SkBits2Float(0x295b2d68), SkBits2Float(0x29685568)); // 4.86672e-14f, 5.15884e-14f
+path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 1.89339e-13f
+path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a688c5b), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x8c08555b), SkBits2Float(0x2a2a29ca)); // 5.73801e-19f, 2.06544e-13f, 3.19905e+24f, 9.6297e-12f, -1.05027e-31f, 1.51135e-13f
+path.quadTo(SkBits2Float(0x68295b21), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21)); // 3.19904e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.close();
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x5b2d6829), SkBits2Float(0x212a8c55), SkBits2Float(0xed7aba1f), SkBits2Float(0x2a212a8c)); // 6.14991e+25f, 4.88097e+16f, 5.7784e-19f, -4.84977e+27f, 1.43144e-13f
+path.moveTo(SkBits2Float(0x2d212d08), SkBits2Float(0x5568295b)); // 9.16179e-12f, 1.5954e+13f
+path.moveTo(SkBits2Float(0x5529685b), SkBits2Float(0x11295b68)); // 1.16416e+13f, 1.33599e-28f
+path.conicTo(SkBits2Float(0x5b782968), SkBits2Float(0x3a292d55), SkBits2Float(0x2a8c555b), SkBits2Float(0x68295a2d), SkBits2Float(0x2d296855)); // 6.98513e+16f, 0.000645359f, 2.49282e-13f, 3.19897e+24f, 9.6297e-12f
+path.moveTo(SkBits2Float(0x555b8c55), SkBits2Float(0x21682929)); // 1.50872e+13f, 7.86591e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0xac2d8ced), SkBits2Float(0x5b682968), SkBits2Float(0x5b292d55), SkBits2Float(0x212a8c55), SkBits2Float(0x081f282a)); // -2.4663e-12f, 6.53477e+16f, 4.76191e+16f, 5.7784e-19f, 4.78945e-34f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.close();
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x03081f21), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x2147ed7a)); // 6.14991e+25f, 2.50338e-13f, 4.00025e-37f, 5.63611e+25f, 6.77381e-19f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.close();
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.quadTo(SkBits2Float(0x2d28282a), SkBits2Float(0x5568295b), SkBits2Float(0x3a21df68), SkBits2Float(0x4f9a3a8a)); // 9.55861e-12f, 1.5954e+13f, 0.000617495f, 5.17506e+09f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.close();
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.cubicTo(SkBits2Float(0x5568c23a), SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a), SkBits2Float(0x3a7bc003), SkBits2Float(0x294b2827)); // 1.59951e+13f, 4.87407e+16f, 5.7784e-19f, 4.61198e-19f, 0.00096035f, 4.51099e-14f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void kfuzz2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ SkPath path;
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f
+path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xf19e92c7), SkBits2Float(0xf17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0x60600100), SkBits2Float(0x0100ff60)); // -2.36118e+21f, -1.57043e+30f, -1.26726e+30f, -3.40177e+38f, 6.45647e+19f, 2.36931e-38f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f
+path.lineTo(SkBits2Float(0x60601a1d), SkBits2Float(0x60606060)); // 6.4593e+19f, 6.46721e+19f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268e+35f
+path.close();
+path.moveTo(SkBits2Float(0xe5e2f300), SkBits2Float(0xee244a40)); // -1.33967e+23f, -1.27113e+28f
+path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f
+path.close();
+path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f
+path.lineTo(SkBits2Float(0xfafafafa), SkBits2Float(0xe30000fa)); // -6.51582e+35f, -2.36125e+21f
+path.conicTo(SkBits2Float(0x92e592e5), SkBits2Float(0xfafafafb), SkBits2Float(0xc4fa0000), SkBits2Float(0x6060fafa), SkBits2Float(0x60606060)); // -1.44881e-27f, -6.51582e+35f, -2000, 6.48462e+19f, 6.46721e+19f
+path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f
+path.close();
+path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f
+path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xf19e92c7), SkBits2Float(0xf17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0xfafafa00), SkBits2Float(0xfafafafa)); // -2.36118e+21f, -1.57043e+30f, -1.26726e+30f, -3.40177e+38f, -6.51572e+35f, -6.51582e+35f
+path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f
+path.close();
+path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f
+path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xe39e92c7), SkBits2Float(0xf17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0xeed0ee9a), SkBits2Float(0x9a98ffca)); // -2.36118e+21f, -5.85032e+21f, -1.26726e+30f, -3.40177e+38f, -3.23307e+28f, -6.3279e-23f
+path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f, -6.51573e+35f
+path.close();
+SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, kXOR_SkPathOp, filename);
+}
+
+static void fuzz763_10(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x68556829)); // 0, 4.03114e+24f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 6.14991e+25f, 0, 0, 6.14991e+25f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68556829)); // 0, 4.03114e+24f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x2a8c8f55)); // 4.87407e+16f, 2.49685e-13f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.conicTo(SkBits2Float(0x682d2fed), SkBits2Float(0x755b6829), SkBits2Float(0x5b292d2b), SkBits2Float(0xc92a8c55), SkBits2Float(0x081f2a21)); // 3.27141e+24f, 2.78131e+32f, 4.76189e+16f, -698565, 4.78968e-34f
+path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.close();
+path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x3a7bc003), SkBits2Float(0x47ed7a29)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, 0.00096035f, 121588
+path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.close();
+path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.quadTo(SkBits2Float(0x6829682d), SkBits2Float(0x292d555b), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a29)); // 3.20001e+24f, 3.84878e-14f, 2.49282e-13f, 4.78969e-34f
+path.conicTo(SkBits2Float(0x6a497b19), SkBits2Float(0x218ced7a), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x47ed3a7a)); // 6.08939e+25f, 9.54963e-19f, 4.7323e-37f, 5.63611e+25f, 121461
+path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.close();
+path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.quadTo(SkBits2Float(0x282a282a), SkBits2Float(0x8a3a21df), SkBits2Float(0x2728282a), SkBits2Float(0x8a3a2129)); // 9.4456e-15f, -8.96194e-33f, 2.33365e-15f, -8.96181e-33f
+path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3a3ac2b3), SkBits2Float(0x2a292827), SkBits2Float(0x962be61d)); // -8.10388e-33f, 0.000712435f, 1.50241e-13f, -1.38859e-25f
+path.lineTo(SkBits2Float(0x272a802a), SkBits2Float(0x2a8c2d29)); // 2.36617e-15f, 2.49003e-13f
+path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.close();
+path.moveTo(SkBits2Float(0x4f9a3a29), SkBits2Float(0x3ab38a28)); // 5.17501e+09f, 0.00136978f
+path.quadTo(SkBits2Float(0xc368305b), SkBits2Float(0x5b296855), SkBits2Float(0x2d8c5568), SkBits2Float(0x1f2a2172)); // -232.189f, 4.7684e+16f, 1.59541e-11f, 3.60266e-20f
+path.lineTo(SkBits2Float(0x29c00321), SkBits2Float(0x5b4b7b13)); // 8.52706e-14f, 5.72747e+16f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_11(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x2a0f312a), SkBits2Float(0xc0032108)); // 1.2718e-13f, -2.04889f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7b21), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14984e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24f, 2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x295b2d2a), SkBits2Float(0x08685568), SkBits2Float(0x7bc00321)); // 5.76397e-19f, -5.27821e+28f, 4.86669e-14f, 6.99154e-34f, 1.99397e+36f
+path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24f, 2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24f, 2.87402e+29f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.lineTo(SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a281a4f)); // 0.00105461f, -8.09385e-33f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x2a812a3b), SkBits2Float(0x2a552927)); // 2.25206e-21f, 300.343f, 2.29443e-13f, 1.89325e-13f
+path.quadTo(SkBits2Float(0x3b1e2ab0), SkBits2Float(0x29272021), SkBits2Float(0x203a3b27), SkBits2Float(0x22c5381f)); // 0.00241343f, 3.71093e-14f, 1.57744e-19f, 5.34564e-18f
+path.moveTo(SkBits2Float(0x5d27ec2a), SkBits2Float(0x705921c2)); // 7.56256e+17f, 2.68796e+29f
+path.quadTo(SkBits2Float(0x102a5152), SkBits2Float(0x5b2dd912), SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 3.35892e-29f, 4.89338e+16f, 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032127)); // 3.60396e-20f, -2.0489f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0x2a8c684b), SkBits2Float(0xf05b272d), SkBits2Float(0x2a1f1555), SkBits2Float(0x21082a21), SkBits2Float(0x6a4b7b03)); // 3.4979e+24f, 2.49414e-13f, -2.71298e+29f, 1.41294e-13f, 4.61343e-19f, 6.14982e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -5.27821e+28f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x2a21211f)); // 4.85282e+16f, 1.43112e-13f
+path.lineTo(SkBits2Float(0x03552a8c), SkBits2Float(0x6a4f7b28)); // 6.26439e-37f, 6.27073e+25f
+path.conicTo(SkBits2Float(0x2347ed93), SkBits2Float(0x282a3a21), SkBits2Float(0x3adf2128), SkBits2Float(0x4f1a3a8a), SkBits2Float(0x3ab38a28)); // 1.08381e-17f, 9.4495e-15f, 0.00170234f, 2.58753e+09f, 0.00136978f
+path.lineTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13f, -2.87402e+29f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x262a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 5.91556e-16f, 0.000649768f
+path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f, 2.34747e-15f
+path.conicTo(SkBits2Float(0x371f203a), SkBits2Float(0xc52a22c4), SkBits2Float(0xc25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x5210513a)); // 9.48464e-06f, -2722.17f, -55.289f, 0.000916855f, 1.5496e+11f
+path.cubicTo(SkBits2Float(0x63102ad9), SkBits2Float(0x29c80927), SkBits2Float(0x633a27b0), SkBits2Float(0x2909c827), SkBits2Float(0x272927b1), SkBits2Float(0x3a685b2d)); // 2.65942e+21f, 8.88337e-14f, 3.43395e+21f, 3.05937e-14f, 2.3475e-15f, 0.000886368f
+path.moveTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24f, 5.15884e-14f
+path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x5b2d2729)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 4.87382e+16f
+path.quadTo(SkBits2Float(0x2d685568), SkBits2Float(0x5568295b), SkBits2Float(0x2a552d29), SkBits2Float(0x295b2d27)); // 1.32066e-11f, 1.5954e+13f, 1.89339e-13f, 4.86669e-14f
+path.lineTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24f, 5.15884e-14f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_12(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a29082a)); // 0, 5.10868e+25f
+path.conicTo(SkBits2Float(0x6a295ac3), SkBits2Float(0x61bb988e), SkBits2Float(0x6829682d), SkBits2Float(0x5f3ba76a), SkBits2Float(0x42730a87)); // 5.11843e+25f, 4.32567e+20f, 3.20001e+24f, 1.35219e+19f, 60.7603f
+path.conicTo(SkBits2Float(0x67aedf99), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x3f801112)); // 1.65163e+24f, 0, 0, 0, 1.00052f
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 6.14991e+25f, 0, 0, 4.03114e+24f, 1.50617e+13f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f
+path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x67d55b2a), SkBits2Float(0x67296a4b), SkBits2Float(0x67555b2a), SkBits2Float(0x677e1f70), SkBits2Float(0x66d55b2a)); // 0, 2.01509e+24f, 8.00041e+23f, 1.00755e+24f, 1.20006e+24f, 5.03773e+23f
+path.cubicTo(SkBits2Float(0x678f0684), SkBits2Float(0x6684f008), SkBits2Float(0x6798f8ea), SkBits2Float(0x6625a942), SkBits2Float(0x67961914), SkBits2Float(0x65ce709a)); // 1.35084e+24f, 3.1389e+23f, 1.44478e+24f, 1.95578e+23f, 1.41764e+24f, 1.21861e+23f
+path.cubicTo(SkBits2Float(0x679158b0), SkBits2Float(0x00000000), SkBits2Float(0x67531e34), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 1.37276e+24f, 0, 9.96976e+23f, 0, 0, 0
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003), SkBits2Float(0xed237a6a), SkBits2Float(0x2d682967), SkBits2Float(0x2a8c555b)); // 4.61198e-19f, 1.64987e+07f, -3.16213e+27f, 1.31969e-11f, 2.49282e-13f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x3a6821df), SkBits2Float(0x2a8c3a8a)); // 0.000885514f, 2.49096e-13f
+path.moveTo(SkBits2Float(0x29272a1d), SkBits2Float(0xb03a2a55)); // 3.7118e-14f, -6.77266e-10f
+path.moveTo(SkBits2Float(0x20213b1e), SkBits2Float(0xc5272927)); // 1.36568e-19f, -2674.57f
+path.quadTo(SkBits2Float(0xc422373b), SkBits2Float(0xec2a201f), SkBits2Float(0x21c25d27), SkBits2Float(0x523a7059)); // -648.863f, -8.22676e+26f, 1.31706e-18f, 2.00187e+11f
+path.cubicTo(SkBits2Float(0x12102a10), SkBits2Float(0xe73a28d9), SkBits2Float(0xc8092763), SkBits2Float(0x2927b029), SkBits2Float(0x295b2d27), SkBits2Float(0x2d685568)); // 4.54902e-28f, -8.79114e+23f, -140446, 3.72342e-14f, 4.86669e-14f, 1.32066e-11f
+path.moveTo(SkBits2Float(0x68556809), SkBits2Float(0x555b2d29)); // 4.03113e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a212a), SkBits2Float(0x2d032108)); // 3.60263e-20f, 7.45382e-12f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // 4.03114e+24f, 1.89339e-13f
+path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a528c5b), SkBits2Float(0x284f5b2d), SkBits2Float(0x218aa621), SkBits2Float(0x3f2d2db3), SkBits2Float(0x68293a2a)); // 5.73801e-19f, 1.87004e-13f, 1.15106e-14f, 9.39522e-19f, 0.676479f, 3.19661e+24f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_13(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0x3adf2128), SkBits2Float(0x4f1a3a8a)); // 6.14991e+25f, 75739, 9.4495e-15f, 0.00170234f, 2.58753e+09f
+path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.close();
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x272a8128), SkBits2Float(0x3a2a5529), SkBits2Float(0x3b1e2ab0)); // 0.00148109f, 2.25206e-21f, 300.343f, 2.36623e-15f, 0.000649768f, 0.00241343f
+path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.close();
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.cubicTo(SkBits2Float(0x3b272927), SkBits2Float(0x381f203a), SkBits2Float(0x2ac422c5), SkBits2Float(0xc25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x2a105152)); // 0.00255067f, 3.79386e-05f, 3.48407e-13f, -55.289f, 0.000916855f, 1.2818e-13f
+path.quadTo(SkBits2Float(0x633ad912), SkBits2Float(0x29c80927), SkBits2Float(0x272927b0), SkBits2Float(0x68295b2d)); // 3.44674e+21f, 8.88337e-14f, 2.3475e-15f, 3.19905e+24f
+path.lineTo(SkBits2Float(0x295b2d68), SkBits2Float(0x29685568)); // 4.86672e-14f, 5.15884e-14f
+path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 1.89339e-13f
+path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a688c5b), SkBits2Float(0x6829292d), SkBits2Float(0x2d296855), SkBits2Float(0x8c08555b), SkBits2Float(0x2a2a291f)); // 5.73801e-19f, 2.06544e-13f, 3.19536e+24f, 9.6297e-12f, -1.05027e-31f, 1.51133e-13f
+path.conicTo(SkBits2Float(0x68295b21), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x7bc00321)); // 3.19904e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f, 1.99397e+36f
+path.lineTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.close();
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.lineTo(SkBits2Float(0x5b2d6829), SkBits2Float(0x212a8c55)); // 4.88097e+16f, 5.7784e-19f
+path.conicTo(SkBits2Float(0x8ced7aba), SkBits2Float(0x3f2a212a), SkBits2Float(0x2d212d08), SkBits2Float(0x5568295b), SkBits2Float(0x29685b2d)); // -3.65895e-31f, 0.664569f, 9.16179e-12f, 1.5954e+13f, 5.15934e-14f
+path.lineTo(SkBits2Float(0x68295b68), SkBits2Float(0x2d296855)); // 3.19906e+24f, 9.6297e-12f
+path.moveTo(SkBits2Float(0x212a8c55), SkBits2Float(0x21081f2a)); // 5.7784e-19f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2a8ced7a), SkBits2Float(0x21081f21), SkBits2Float(0x6aba7b03), SkBits2Float(0x2147ed7a)); // 6.14991e+25f, 2.50338e-13f, 4.61198e-19f, 1.12721e+26f, 6.77381e-19f
+path.quadTo(SkBits2Float(0x6028282a), SkBits2Float(0x68292ddf), SkBits2Float(0x5b2d555b), SkBits2Float(0x68556829)); // 4.84679e+19f, 3.1957e+24f, 4.8789e+16f, 4.03114e+24f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_14(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0xf45b2d29)); // 4.03114e+24f, -6.94598e+31f
+path.moveTo(SkBits2Float(0x1f2a302a), SkBits2Float(0xc8032108)); // 3.60387e-20f, -134276
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf0db684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x302a5b25), SkBits2Float(0xf0685568)); // 3.4979e+24f, -5.43226e+29f, -1.64207e-31f, 5.76527e-19f, 6.19752e-10f, -2.87615e+29f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_15(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x5b292d55), SkBits2Float(0x212a8c55)); // 4.76191e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x2c6829c0), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a29)); // 5.77848e-19f, 4.7323e-37f, 3.29924e-12f, 2.49282e-13f, 4.78969e-34f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f
+path.close();
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0xdf218a28), SkBits2Float(0x4f1a3a3a)); // 6.14991e+25f, 75739, 9.4495e-15f, -1.16402e+19f, 2.58751e+09f
+path.quadTo(SkBits2Float(0x3ab38a28), SkBits2Float(0x283ac221), SkBits2Float(0xe6432a29), SkBits2Float(0x2a96812b)); // 0.00136978f, 1.03672e-14f, -2.3041e+23f, 2.6735e-13f
+path.lineTo(SkBits2Float(0x5529272a), SkBits2Float(0x1eb03a2a)); // 1.16241e+13f, 1.86588e-20f
+path.conicTo(SkBits2Float(0x2a272021), SkBits2Float(0x3ac52729), SkBits2Float(0xc422313b), SkBits2Float(0xec2a201f), SkBits2Float(0x21c25d27)); // 1.48437e-13f, 0.00150416f, -648.769f, -8.22676e+26f, 1.31706e-18f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a6b7bc4)); // 4.7323e-37f, 7.11705e+25f
+path.close();
+path.moveTo(SkBits2Float(0x1051523a), SkBits2Float(0xd912102a)); // 4.12813e-29f, -2.56957e+15f
+path.close();
+path.moveTo(SkBits2Float(0x1051523a), SkBits2Float(0xd912102a)); // 4.12813e-29f, -2.56957e+15f
+path.quadTo(SkBits2Float(0xc82763e7), SkBits2Float(0x2927b029), SkBits2Float(0x295b2d27), SkBits2Float(0x2d685568)); // -171408, 3.72342e-14f, 4.86669e-14f, 1.32066e-11f
+path.moveTo(SkBits2Float(0x68556809), SkBits2Float(0x8c555b2d)); // 4.03113e+24f, -1.64364e-31f
+path.moveTo(SkBits2Float(0x081f2a21), SkBits2Float(0x252d0321)); // 4.78968e-34f, 1.50064e-16f
+path.moveTo(SkBits2Float(0x5568392a), SkBits2Float(0x5b2df068)); // 1.59583e+13f, 4.89595e+16f
+path.quadTo(SkBits2Float(0x2a1f2a8c), SkBits2Float(0x21482a21), SkBits2Float(0x4b7bc003), SkBits2Float(0x8ced3a6a)); // 1.41368e-13f, 6.78184e-19f, 1.64987e+07f, -3.65508e-31f
+path.moveTo(SkBits2Float(0x21481f21), SkBits2Float(0x4b7bc003)); // 6.78038e-19f, 1.64987e+07f
+path.conicTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d155b2d), SkBits2Float(0x5568295b), SkBits2Float(0x5b2d2968), SkBits2Float(0x2a8c8f55)); // 3.20982e+24f, 8.48991e-12f, 1.5954e+13f, 4.87407e+16f, 2.49685e-13f
+path.lineTo(SkBits2Float(0x21481f21), SkBits2Float(0x4b7bc003)); // 6.78038e-19f, 1.64987e+07f
+path.close();
+path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.conicTo(SkBits2Float(0x682d2fed), SkBits2Float(0x755b6829), SkBits2Float(0x5b292d2b), SkBits2Float(0xc92a8c55), SkBits2Float(0x081f2a21)); // 3.27141e+24f, 2.78131e+32f, 4.76189e+16f, -698565, 4.78968e-34f
+path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.close();
+path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x212aed7a), SkBits2Float(0x0321081f), SkBits2Float(0x293a7bc0), SkBits2Float(0x2147ed7a)); // 6.14991e+25f, 5.79125e-19f, 4.7323e-37f, 4.14076e-14f, 6.77381e-19f
+path.quadTo(SkBits2Float(0x6829682d), SkBits2Float(0x292d555b), SkBits2Float(0x292a8c55), SkBits2Float(0x21081f2a)); // 3.20001e+24f, 3.84878e-14f, 3.78693e-14f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x218ced7a), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x47ed3a7a)); // 6.14991e+25f, 9.54963e-19f, 4.7323e-37f, 5.63611e+25f, 121461
+path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.close();
+path.moveTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.quadTo(SkBits2Float(0x282a282a), SkBits2Float(0x8a3a21df), SkBits2Float(0x2728282a), SkBits2Float(0x8a3a21df)); // 9.4456e-15f, -8.96194e-33f, 2.33365e-15f, -8.96194e-33f
+path.quadTo(SkBits2Float(0x8a284f9a), SkBits2Float(0x3a3ac2b3), SkBits2Float(0x2a292827), SkBits2Float(0x962be61d)); // -8.10388e-33f, 0.000712435f, 1.50241e-13f, -1.38859e-25f
+path.lineTo(SkBits2Float(0x272a802a), SkBits2Float(0x2a8c2d29)); // 2.36617e-15f, 2.49003e-13f
+path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
+path.close();
+path.moveTo(SkBits2Float(0x4f9a3a29), SkBits2Float(0x3ab38a28)); // 5.17501e+09f, 0.00136978f
+path.quadTo(SkBits2Float(0xc368305b), SkBits2Float(0x5b296855), SkBits2Float(0x2d8c5568), SkBits2Float(0x1f2a2172)); // -232.189f, 4.7684e+16f, 1.59541e-11f, 3.60266e-20f
+path.lineTo(SkBits2Float(0x29c00321), SkBits2Float(0x5b4b7b13)); // 8.52706e-14f, 5.72747e+16f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_16(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68372d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c552775), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.46012e+24f, -2.71613e+29f, -1.64208e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x68385b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.48239e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f
+path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 1.31626e+28f, 4.7323e-37f, 6.14991e+25f, 75739
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0x2c213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, 2.29121e-12f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x681aed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 2.92648e+24f, 1.46617e+13f, 9.01175e-21f
+path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2769), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21512727)); // 2.22225e-15f, 0.000713936f, -732.486f, -1.90686e+27f, 7.08638e-19f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a322a), SkBits2Float(0xc0032108)); // 3.60404e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05bd24b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0xed4b7bc0)); // 4.06458e+24f, -2.72126e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, -3.93594e+27f
+path.conicTo(SkBits2Float(0x212a8c6a), SkBits2Float(0x0329081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77841e-19f, 4.9674e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x555b6829), SkBits2Float(0x6c212a8c)); // 1.50775e+13f, 7.79352e+26f
+path.conicTo(SkBits2Float(0x084b0321), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0x5bf05568), SkBits2Float(0x212a3a8c)); // 6.10918e-34f, 1.16348e+26f, 0.000209024f, 1.35296e+17f, 5.76757e-19f
+path.lineTo(SkBits2Float(0x8c558c55), SkBits2Float(0x212a1f2a)); // -1.64512e-31f, 5.76395e-19f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_17(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f
+path.moveTo(SkBits2Float(0x6835282d), SkBits2Float(0xf0682955)); // 3.42196e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 4.2514e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f
+path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x254793ed)); // 2.49282e-13f, 5.76399e-19f, 4.7323e-37f, 6.14991e+25f, 1.73106e-16f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f
+path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0x16c52a22), SkBits2Float(0x515d27ec)); // 2.22225e-15f, 0.000713932f, -732.486f, 3.18537e-25f, 5.93661e+10f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x2a212a1f)); // 2.49282e-13f, 1.43143e-13f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x2a1f08c0)); // -1.31678e-31f, 1.41251e-13f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x2a8cef55), SkBits2Float(0x68295b2d)); // 2.50351e-13f, 3.19905e+24f
+path.conicTo(SkBits2Float(0x55086821), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x5b2c6829), SkBits2Float(0x21218c55), SkBits2Float(0x2a6c1f03)); // 9.3738e+12f, 6.14991e+25f, 4.85282e+16f, 5.47346e-19f, 2.09718e-13f
+path.lineTo(SkBits2Float(0x2a8cef55), SkBits2Float(0x68295b2d)); // 2.50351e-13f, 3.19905e+24f
+path.close();
+path.moveTo(SkBits2Float(0x2a8cef55), SkBits2Float(0x68295b2d)); // 2.50351e-13f, 3.19905e+24f
+path.lineTo(SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a)); // 1.16348e+26f, 0.000209024f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_18(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f
+path.moveTo(SkBits2Float(0x6835282d), SkBits2Float(0xf0682955)); // 3.42196e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 4.2514e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f
+path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x254793ed)); // 2.49282e-13f, 5.76399e-19f, 4.7323e-37f, 6.14991e+25f, 1.73106e-16f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f
+path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0x16c52a22), SkBits2Float(0x515d27ec)); // 2.22225e-15f, 0.000713932f, -732.486f, 3.18537e-25f, 5.93661e+10f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x2a212a1f)); // 2.49282e-13f, 1.43143e-13f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x2a1f08c0)); // -1.31678e-31f, 1.41251e-13f
+
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x2a8c54ed), SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003), SkBits2Float(0x29ed846a), SkBits2Float(0x555b2d28)); // 2.49279e-13f, 4.61198e-19f, 1.64987e+07f, 1.05479e-13f, 1.50617e+13f
+path.conicTo(SkBits2Float(0x68392d5b), SkBits2Float(0xf0682955), SkBits2Float(0x2a1f5b2d), SkBits2Float(0xef552a21), SkBits2Float(0x5b2d2a8c)); // 3.4979e+24f, -2.87402e+29f, 1.41537e-13f, -6.59712e+28f, 4.8742e+16f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_19(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003)); // 4.61198e-19f, 1.64987e+07f
+path.lineTo(SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 9.43289e-15f, 1.61207e+25f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 4.2514e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f
+path.moveTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x8c5bf055), SkBits2Float(0x2a1f2a55), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, -1.69435e-31f, 1.41367e-13f, 4.7362e-37f, 1.43189e+16f
+path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2547937a)); // 2.49282e-13f, 5.76399e-19f, 4.7323e-37f, 6.14991e+25f, 1.73105e-16f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f
+path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21515d27)); // 2.22225e-15f, 0.000713932f, -732.486f, -1.90686e+27f, 7.09352e-19f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x555b2c29), SkBits2Float(0x6c212a8c)); // 1.50614e+13f, 7.79352e+26f
+path.conicTo(SkBits2Float(0x084b0321), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0xf05b5568), SkBits2Float(0x212a3a8c)); // 6.10918e-34f, 1.16348e+26f, 0.000209024f, -2.71522e+29f, 5.76757e-19f
+path.conicTo(SkBits2Float(0x290321d9), SkBits2Float(0x555b2d68), SkBits2Float(0x2a8c558c), SkBits2Float(0x2abe2a1f), SkBits2Float(0x7bc00321)); // 2.91172e-14f, 1.50618e+13f, 2.49284e-13f, 3.378e-13f, 1.99397e+36f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x1f2128c0)); // -1.31678e-31f, 3.41268e-20f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_20(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2a8c552a), SkBits2Float(0x68295b2d), SkBits2Float(0x08682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 2.49281e-13f, 3.19905e+24f, 6.98538e-34f, 1.64988e+07f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, 1.51141e+13f, 1.41368e-13f, 4.7362e-37f, 1.43189e+16f
+path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321182a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 1.31626e+28f, 4.73414e-37f, 6.14991e+25f, 75739
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0x2c213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, 2.29121e-12f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f
+path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2769), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x51282727)); // 2.22225e-15f, 0.000713936f, -732.486f, -1.90686e+27f, 4.51382e+10f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x8c555b2d)); // 4.03114e+24f, -1.64364e-31f
+path.moveTo(SkBits2Float(0x081f2a31), SkBits2Float(0xc0032921)); // 4.78969e-34f, -2.04939f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05bd24b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0xed4b7bc0)); // 4.06458e+24f, -2.72126e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, -3.93594e+27f
+path.conicTo(SkBits2Float(0x212a8c6a), SkBits2Float(0x4329081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 5.77841e-19f, 169.032f, 6.14991e+25f, 9.43289e-15f, 4.8745e+16f
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x3a210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 0.000614217f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x555b6829), SkBits2Float(0x6c212a8c)); // 1.50775e+13f, 7.79352e+26f
+path.lineTo(SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556830)); // 4.88298e+16f, -2.64185e+29f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x0321d90a), SkBits2Float(0x555b2d68), SkBits2Float(0x2a8c558c), SkBits2Float(0x212a2a1f), SkBits2Float(0x4b7bc003)); // 4.75628e-37f, 1.50618e+13f, 2.49284e-13f, 5.7654e-19f, 1.64987e+07f
+path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x212128c0)); // -1.31678e-31f, 5.46029e-19f
+path.lineTo(SkBits2Float(0x68395b2d), SkBits2Float(0xf0682955)); // 3.50128e+24f, -2.87402e+29f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_21(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x6828c6f9), SkBits2Float(0x6614dc9e)); // 3.18811e+24f, 1.75745e+23f
+path.cubicTo(SkBits2Float(0x68303469), SkBits2Float(0x661f92fc), SkBits2Float(0x6837d3c3), SkBits2Float(0x662b0eb2), SkBits2Float(0x683fa268), SkBits2Float(0x663759e1)); // 3.32841e+24f, 1.88392e+23f, 3.4724e+24f, 2.01949e+23f, 3.61987e+24f, 2.16463e+23f
+path.cubicTo(SkBits2Float(0x68c4391f), SkBits2Float(0x672c5c9f), SkBits2Float(0x688b20ab), SkBits2Float(0x6804b825), SkBits2Float(0x681ddb5e), SkBits2Float(0x6838dc00)); // 7.4131e+24f, 8.13956e+23f, 5.25609e+24f, 2.507e+24f, 2.98183e+24f, 3.49189e+24f
+path.lineTo(SkBits2Float(0x6828c6f9), SkBits2Float(0x6614dc9e)); // 3.18811e+24f, 1.75745e+23f
+path.close();
+path.moveTo(SkBits2Float(0x68226c73), SkBits2Float(0x660bd15e)); // 3.0681e+24f, 1.65068e+23f
+path.cubicTo(SkBits2Float(0x6823b0e1), SkBits2Float(0x660d990f), SkBits2Float(0x6824f6d5), SkBits2Float(0x660f668c), SkBits2Float(0x68263e4e), SkBits2Float(0x66113632)); // 3.09203e+24f, 1.67169e+23f, 3.11609e+24f, 1.69298e+23f, 3.14025e+24f, 1.71436e+23f
+path.cubicTo(SkBits2Float(0x682715e4), SkBits2Float(0x6612676d), SkBits2Float(0x6827ee22), SkBits2Float(0x66139997), SkBits2Float(0x6828c709), SkBits2Float(0x6614cba5)); // 3.15616e+24f, 1.72843e+23f, 3.17211e+24f, 1.74255e+23f, 3.18812e+24f, 1.75667e+23f
+path.lineTo(SkBits2Float(0x6828d720), SkBits2Float(0x6604a1a2)); // 3.1893e+24f, 1.56583e+23f
+path.cubicTo(SkBits2Float(0x68270421), SkBits2Float(0x6601102c), SkBits2Float(0x68252b97), SkBits2Float(0x65fb1edd), SkBits2Float(0x68234ce5), SkBits2Float(0x65f4367f)); // 3.15485e+24f, 1.52371e+23f, 3.11998e+24f, 1.48235e+23f, 3.08466e+24f, 1.44158e+23f
+path.conicTo(SkBits2Float(0x6822e012), SkBits2Float(0x6602acc5), SkBits2Float(0x68226c73), SkBits2Float(0x660bd15e), SkBits2Float(0x3f7ffa04)); // 3.07663e+24f, 1.54274e+23f, 3.0681e+24f, 1.65068e+23f, 0.999909f
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f
+path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x68617414), SkBits2Float(0x66af1c42), SkBits2Float(0x68624f96), SkBits2Float(0x6757755b), SkBits2Float(0x685b93f2)); // 0, 4.25869e+24f, 4.13468e+23f, 4.27489e+24f, 1.01747e+24f, 4.14771e+24f
+path.cubicTo(SkBits2Float(0x67a63a84), SkBits2Float(0x68fe1c37), SkBits2Float(0x67c05eed), SkBits2Float(0x69930962), SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 1.56998e+24f, 9.60001e+24f, 1.81689e+24f, 2.22196e+25f, 0, 5.14279e+25f
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 0, 6.14991e+25f
+path.cubicTo(SkBits2Float(0x6a2c8798), SkBits2Float(0x68f7a144), SkBits2Float(0x6951f5ea), SkBits2Float(0x6796ad55), SkBits2Float(0x683fa268), SkBits2Float(0x663759e1)); // 5.21439e+25f, 9.35519e+24f, 1.58642e+25f, 1.4231e+24f, 3.61987e+24f, 2.16463e+23f
+path.cubicTo(SkBits2Float(0x683871e3), SkBits2Float(0x66253b4f), SkBits2Float(0x6830da01), SkBits2Float(0x66144d3e), SkBits2Float(0x6828d720), SkBits2Float(0x6604a1a2)); // 3.48407e+24f, 1.95071e+23f, 3.34063e+24f, 1.75084e+23f, 3.1893e+24f, 1.56583e+23f
+path.conicTo(SkBits2Float(0x68295b21), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x492bb324)); // 3.19904e+24f, 0, 0, 0, 703282
+path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x677b84f0), SkBits2Float(0x00000000), SkBits2Float(0x68226c73), SkBits2Float(0x660bd15e)); // 0, 0, 1.18777e+24f, 0, 3.0681e+24f, 1.65068e+23f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68156829)); // 0, 2.82222e+24f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e+24f
+path.lineTo(SkBits2Float(0x673918f3), SkBits2Float(0x681b0f5f)); // 8.74098e+23f, 2.929e+24f
+path.lineTo(SkBits2Float(0x67391759), SkBits2Float(0x681b0fae)); // 8.74068e+23f, 2.92902e+24f
+path.cubicTo(SkBits2Float(0x674384e7), SkBits2Float(0x682e2068), SkBits2Float(0x674db698), SkBits2Float(0x6843893b), SkBits2Float(0x6757755b), SkBits2Float(0x685b93f2)); // 9.23313e+23f, 3.28916e+24f, 9.71453e+23f, 3.69357e+24f, 1.01747e+24f, 4.14771e+24f
+path.cubicTo(SkBits2Float(0x67a63484), SkBits2Float(0x68556bdd), SkBits2Float(0x67f18c5f), SkBits2Float(0x6848eb25), SkBits2Float(0x681ddb5e), SkBits2Float(0x6838dc00)); // 1.56976e+24f, 4.03142e+24f, 2.28136e+24f, 3.79524e+24f, 2.98183e+24f, 3.49189e+24f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a2a291f)); // 0, 5.14279e+25f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 1, filename);
+}
+
+static void fuzz763_22(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x68295b2d)); // 0, 3.19905e+24f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x6a3a7bc0), SkBits2Float(0x00000000)); // 5.63611e+25f, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a034b21)); // 0, 3.9681e+25f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68295b2d)); // 0, 3.19905e+24f
+path.close();
+path.moveTo(SkBits2Float(0x6617da56), SkBits2Float(0x00000000)); // 1.79276e+23f, 0
+path.conicTo(SkBits2Float(0x5e704d09), SkBits2Float(0x5e3a4dfd), SkBits2Float(0x00000000), SkBits2Float(0x65eb62ef), SkBits2Float(0x430fa5e6)); // 4.32888e+18f, 3.35617e+18f, 0, 1.38948e+23f, 143.648f
+path.conicTo(SkBits2Float(0x5e798b32), SkBits2Float(0x627a95c0), SkBits2Float(0x61f5014c), SkBits2Float(0x61fba0fd), SkBits2Float(0x40f8a1a1)); // 4.49538e+18f, 1.15562e+21f, 5.64943e+20f, 5.80217e+20f, 7.76973f
+path.conicTo(SkBits2Float(0x62743d2d), SkBits2Float(0x5e49b862), SkBits2Float(0x6617da56), SkBits2Float(0x00000000), SkBits2Float(0x410ef54c)); // 1.12635e+21f, 3.63387e+18f, 1.79276e+23f, 0, 8.93489f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x4f9a3a8a), SkBits2Float(0xc28a0d28), SkBits2Float(0x273a3ab3), SkBits2Float(0x8b2a2928)); // 5.17506e+09f, -69.0257f, 2.58445e-15f, -3.27718e-32f
+path.lineTo(SkBits2Float(0x63283ae6), SkBits2Float(0x27282a81)); // 3.1033e+21f, 2.33377e-15f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
+}
+
+static void fuzz763_23(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x03210c2a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.73276e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef552a), SkBits2Float(0x29295b2d), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, 4.2514e-13f, 3.76046e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0682955)); // 3.33127e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x68395b2d), SkBits2Float(0x8c5bf055), SkBits2Float(0x2a1f2a55), SkBits2Float(0x03212a21), SkBits2Float(0x5a4b7bc0)); // 3.50128e+24f, -1.69435e-31f, 1.41367e-13f, 4.7362e-37f, 1.43189e+16f
+path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x08211f72), SkBits2Float(0x032a2a21), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2547937a)); // 2.49282e-13f, 4.84861e-34f, 5.00069e-37f, 6.14991e+25f, 1.73105e-16f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0xc2213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, -40.3073f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000650423f, 2.50336e-13f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f
+path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21515d27)); // 2.22225e-15f, 0.000713932f, -732.486f, -1.90686e+27f, 7.09352e-19f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0685527)); // 3.35016e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 4.06458e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x2a8c54ed), SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003), SkBits2Float(0x29ed846a), SkBits2Float(0x555b2d28)); // 2.49279e-13f, 4.61198e-19f, 1.64987e+07f, 1.05479e-13f, 1.50617e+13f
+path.conicTo(SkBits2Float(0x68392d5b), SkBits2Float(0xf0682955), SkBits2Float(0x2a1f5b2d), SkBits2Float(0xef552a21), SkBits2Float(0x5b2d2a8c)); // 3.4979e+24f, -2.87402e+29f, 1.41537e-13f, -6.59712e+28f, 4.8742e+16f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_24(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0xededed02), SkBits2Float(0xedededed)); // -9.20431e+27f, -9.20445e+27f
+path.close();
+path.moveTo(SkBits2Float(0xededed02), SkBits2Float(0xedededed)); // -9.20431e+27f, -9.20445e+27f
+path.quadTo(SkBits2Float(0x9fb9c16e), SkBits2Float(0x27737375), SkBits2Float(0xb7c5ff00), SkBits2Float(0x00ff9908)); // -7.86706e-20f, 3.37856e-15f, -2.3603e-05f, 2.34729e-38f
+path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.cubicTo(SkBits2Float(0x1616ecec), SkBits2Float(0x2c321616), SkBits2Float(0x3516c616), SkBits2Float(0x6e161616), SkBits2Float(0x4c416033), SkBits2Float(0xf6000000)); // 1.21917e-25f, 2.53076e-12f, 5.61676e-07f, 1.16124e+28f, 5.06923e+07f, -6.49037e+32f
+path.quadTo(SkBits2Float(0x04007f41), SkBits2Float(0xecececec), SkBits2Float(0xecececec), SkBits2Float(0xecec41ec)); // 1.51048e-36f, -2.2914e+27f, -2.2914e+27f, -2.28494e+27f
+path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.close();
+path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.quadTo(SkBits2Float(0x000000ec), SkBits2Float(0xececcc00), SkBits2Float(0x48ececec), SkBits2Float(0x0278806e)); // 3.30706e-43f, -2.29016e+27f, 485223, 1.8257e-37f
+path.lineTo(SkBits2Float(0x72ececec), SkBits2Float(0xecec02ec)); // 9.38559e+30f, -2.28256e+27f
+path.quadTo(SkBits2Float(0xec04007f), SkBits2Float(0xecececec), SkBits2Float(0xecececec), SkBits2Float(0xecec0400)); // -6.38322e+26f, -2.2914e+27f, -2.2914e+27f, -2.2826e+27f
+path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.close();
+path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.quadTo(SkBits2Float(0x000040ec), SkBits2Float(0x3a333300), SkBits2Float(0xecec3333), SkBits2Float(0xececdbec)); // 2.32896e-41f, 0.000683591f, -2.28439e+27f, -2.29076e+27f
+path.lineTo(SkBits2Float(0x3300007f), SkBits2Float(0x33d83333)); // 2.98028e-08f, 1.00676e-07f
+path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.close();
+path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.quadTo(SkBits2Float(0x9e9ea900), SkBits2Float(0x33ececec), SkBits2Float(0xececec33), SkBits2Float(0xec336e6e)); // -1.67988e-20f, 1.10327e-07f, -2.29138e+27f, -8.67677e+26f
+path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.close();
+path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.lineTo(SkBits2Float(0xedededed), SkBits2Float(0xedededed)); // -9.20445e+27f, -9.20445e+27f
+path.lineTo(SkBits2Float(0xecececec), SkBits2Float(0xecececec)); // -2.2914e+27f, -2.2914e+27f
+path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.close();
+path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.lineTo(SkBits2Float(0x01003300), SkBits2Float(0x33d83333)); // 2.35465e-38f, 1.00676e-07f
+path.quadTo(SkBits2Float(0xecec3333), SkBits2Float(0x04eeedec), SkBits2Float(0xe0e0e0e0), SkBits2Float(0x9ee0e0e0)); // -2.28439e+27f, 5.6172e-36f, -1.29634e+20f, -2.38099e-20f
+path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.close();
+path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f, 1.9278e+31f
+path.cubicTo(SkBits2Float(0x299e9e9e), SkBits2Float(0xecececec), SkBits2Float(0xececb6ec), SkBits2Float(0xf0ececec), SkBits2Float(0x0000ecec), SkBits2Float(0x9ebe6e6e)); // 7.04413e-14f, -2.2914e+27f, -2.28936e+27f, -5.86599e+29f, 8.49916e-41f, -2.01627e-20f
+path.cubicTo(SkBits2Float(0x9e9e9e9e), SkBits2Float(0xe8009e9e), SkBits2Float(0x9e9e9e9e), SkBits2Float(0xecec9e9e), SkBits2Float(0xec3333ec), SkBits2Float(0xececf0ec)); // -1.67945e-20f, -2.42956e+24f, -1.67945e-20f, -2.28844e+27f, -8.66572e+26f, -2.29155e+27f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz763_25(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 0, 6.14991e+25f
+path.conicTo(SkBits2Float(0x653140d9), SkBits2Float(0x6a4b4f74), SkBits2Float(0x65906630), SkBits2Float(0x6a25a070), SkBits2Float(0x3f6728a2)); // 5.23159e+22f, 6.14468e+25f, 8.52382e+22f, 5.00576e+25f, 0.902964f
+path.cubicTo(SkBits2Float(0x68295bc5), SkBits2Float(0x00000000), SkBits2Float(0x682958ff), SkBits2Float(0x00000000), SkBits2Float(0x68286829), SkBits2Float(0x00000000)); // 3.19909e+24f, 0, 3.19889e+24f, 0, 3.18112e+24f, 0
+path.lineTo(SkBits2Float(0x68555b29), SkBits2Float(0x00000000)); // 4.03018e+24f, 0
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x682d2927), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x6829686f)); // 0, 3.27091e+24f, 0, 0, 3.20003e+24f
+path.lineTo(SkBits2Float(0xdf218a28), SkBits2Float(0x00000000)); // -1.16402e+19f, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a4b7bc4)); // 0, 6.14991e+25f
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x6642c40c), SkBits2Float(0x00000000), SkBits2Float(0x65906630), SkBits2Float(0x6a25a070), SkBits2Float(0x3edcd74d)); // 2.29939e+23f, 0, 8.52382e+22f, 5.00576e+25f, 0.43133f
+path.conicTo(SkBits2Float(0x68295afa), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x4277a57b)); // 3.19903e+24f, 0, 0, 0, 61.9116f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+
+static void fuzz763_26(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc003210a)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68372d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.46012e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x69555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.61207e+25f
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68315b2d), SkBits2Float(0xf0682955)); // 3.35016e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x68385b2d), SkBits2Float(0x555bf055), SkBits2Float(0x2a1f2a8c), SkBits2Float(0x03212121), SkBits2Float(0x5a4b7bc0)); // 3.48239e+24f, 1.51141e+13f, 1.41368e-13f, 4.73517e-37f, 1.43189e+16f
+path.conicTo(SkBits2Float(0xc08c2aed), SkBits2Float(0x211f2108), SkBits2Float(0x6a4b7b03), SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // -4.38024f, 5.3915e-19f, 6.14982e+25f, 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 1.31626e+28f, 4.7323e-37f, 6.14991e+25f, 75739
+path.lineTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a284f1a), SkBits2Float(0x2c213ab3)); // 5.69738e-19f, 0.00105461f, -8.10378e-33f, 2.29121e-12f
+path.lineTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a2a812a), SkBits2Float(0x2127ed29)); // 2.25206e-21f, 300.343f, 0.000650423f, 5.68957e-19f
+path.conicTo(SkBits2Float(0x03210831), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x6829ed27), SkBits2Float(0x55555b2d), SkBits2Float(0x1e2a3a2a)); // 4.73231e-37f, 6.14991e+25f, 3.20982e+24f, 1.46617e+13f, 9.01175e-21f
+path.conicTo(SkBits2Float(0x27202140), SkBits2Float(0x3a3b2769), SkBits2Float(0xc4371f20), SkBits2Float(0xecc52a22), SkBits2Float(0x21512727)); // 2.22225e-15f, 0.000713936f, -732.486f, -1.90686e+27f, 7.08638e-19f
+path.lineTo(SkBits2Float(0x68355b2d), SkBits2Float(0xf0685527)); // 3.42572e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6829523a), SkBits2Float(0x2d555b2d)); // 3.19839e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x5b2d5529)); // 4.03114e+24f, 4.87888e+16f
+path.moveTo(SkBits2Float(0x1f2a322a), SkBits2Float(0xc0032108)); // 3.60404e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68572d55), SkBits2Float(0xf05bd24b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0xed4b7bc0)); // 4.06458e+24f, -2.72126e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, -3.93594e+27f
+path.conicTo(SkBits2Float(0x212a8c6a), SkBits2Float(0x0329081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77841e-19f, 4.9674e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x555b1b29), SkBits2Float(0x6c212a8c)); // 1.50569e+13f, 7.79352e+26f
+path.conicTo(SkBits2Float(0x084b0321), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0x8c5bf055), SkBits2Float(0x1f212a3a)); // 6.10918e-34f, 1.16348e+26f, 0.000209024f, -1.69435e-31f, 3.4128e-20f
+path.conicTo(SkBits2Float(0x290321d9), SkBits2Float(0x555b2d68), SkBits2Float(0x2a8c558c), SkBits2Float(0x2a212a1f), SkBits2Float(0x7bc00321)); // 2.91172e-14f, 1.50618e+13f, 2.49284e-13f, 1.43143e-13f, 1.99397e+36f
+path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x1f2128c0)); // -1.31678e-31f, 3.41268e-20f
+path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24f, -2.87402e+29f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_28(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68302d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6aa37bc0)); // 3.32789e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-37f, 9.88197e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2d28ed84), SkBits2Float(0x5b2d2955)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.60243e-12f, 4.87406e+16f
+path.moveTo(SkBits2Float(0x6c395b2d), SkBits2Float(0xf0682955)); // 8.96327e+26f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef8c55), SkBits2Float(0x68295b2d), SkBits2Float(0x21086855), SkBits2Float(0x4b7bc003)); // 5.76397e-19f, 4.25523e-13f, 3.19905e+24f, 4.62167e-19f, 1.64987e+07f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.lineTo(SkBits2Float(0x8a283a28), SkBits2Float(0x284f1a3a)); // -8.09984e-33f, 1.14965e-14f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x272a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 2.36623e-15f, 0.000649768f
+path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f, 2.34747e-15f
+path.conicTo(SkBits2Float(0x381f203a), SkBits2Float(0x2ac422c5), SkBits2Float(0xc25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x2a105152)); // 3.79386e-05f, 3.48407e-13f, -55.289f, 0.000916855f, 1.2818e-13f
+path.quadTo(SkBits2Float(0x633ad912), SkBits2Float(0x29c80927), SkBits2Float(0x272927b0), SkBits2Float(0x683a5b2d)); // 3.44674e+21f, 8.88337e-14f, 2.3475e-15f, 3.52017e+24f
+path.lineTo(SkBits2Float(0x295b2d68), SkBits2Float(0x29685568)); // 4.86672e-14f, 5.15884e-14f
+path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // -2.49282e-13f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 1.89339e-13f
+path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a688c5b), SkBits2Float(0x68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x8c08555b), SkBits2Float(0x2a2a29ca)); // 5.73801e-19f, 2.06544e-13f, 3.19905e+24f, 9.6297e-12f, -1.05027e-31f, 1.51135e-13f
+path.quadTo(SkBits2Float(0x68295b21), SkBits2Float(0x2d296855), SkBits2Float(0x2a8c555b), SkBits2Float(0x081f2a21)); // 3.19904e+24f, 9.6297e-12f, 2.49282e-13f, 4.78968e-34f
+path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.close();
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x5b2d6829), SkBits2Float(0x1f212a55), SkBits2Float(0x8ced7aba), SkBits2Float(0x3f2a212a)); // 6.14991e+25f, 4.88097e+16f, 3.41281e-20f, -3.65895e-31f, 0.664569f
+path.lineTo(SkBits2Float(0x5b2d212d), SkBits2Float(0x2d556829)); // 4.87316e+16f, 1.21308e-11f
+path.moveTo(SkBits2Float(0x68552968), SkBits2Float(0x5568295b)); // 4.02651e+24f, 1.5954e+13f
+path.moveTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55)); // 4.87407e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a3a7bc0), SkBits2Float(0x2147ed7a), SkBits2Float(0x28282a3a)); // 5.77848e-19f, 4.7323e-37f, 5.63611e+25f, 6.77381e-19f, 9.33503e-15f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_27(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x30309ab8), SkBits2Float(0x305b3030), SkBits2Float(0x00f53030), SkBits2Float(0x3a3a0000)); // 6.42483e-10f, 7.97402e-10f, 2.2517e-38f, 0.000709534f
+path.quadTo(SkBits2Float(0xb8b8d5b8), SkBits2Float(0x0b0b0b03), SkBits2Float(0x0b0b0b0b), SkBits2Float(0x3a3a0b0b)); // -8.81361e-05f, 2.67787e-32f, 2.67787e-32f, 0.000709698f
+path.quadTo(SkBits2Float(0xb8b8b8b8), SkBits2Float(0x0b1203b8), SkBits2Float(0x0b0b0b0b), SkBits2Float(0x3a3a2110)); // -8.80821e-05f, 2.81214e-32f, 2.67787e-32f, 0.000710026f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_29(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x743e0000)); // 0, 6.02134e+31f
+path.cubicTo(SkBits2Float(0x74083cf1), SkBits2Float(0x74536e73), SkBits2Float(0x742ac4e4), SkBits2Float(0x7415f5be), SkBits2Float(0x7433ee3c), SkBits2Float(0x7405a69a)); // 4.31756e+31f, 6.70053e+31f, 5.41189e+31f, 4.75242e+31f, 5.70223e+31f, 4.23556e+31f
+path.quadTo(SkBits2Float(0x74360ca0), SkBits2Float(0x7401e10c), SkBits2Float(0x7436a382), SkBits2Float(0x7401cc18)); // 5.76937e+31f, 4.11603e+31f, 5.78805e+31f, 4.11344e+31f
+path.cubicTo(SkBits2Float(0x74374a91), SkBits2Float(0x7401ef19), SkBits2Float(0x74375c84), SkBits2Float(0x7404d9b9), SkBits2Float(0x7437868f), SkBits2Float(0x740bae8a)); // 5.80873e+31f, 4.11777e+31f, 5.81095e+31f, 4.2102e+31f, 5.81616e+31f, 4.42669e+31f
+path.cubicTo(SkBits2Float(0x7437d6c1), SkBits2Float(0x7418b629), SkBits2Float(0x74387e9b), SkBits2Float(0x7433fbc5), SkBits2Float(0x743e2ff7), SkBits2Float(0x74655fa2)); // 5.82609e+31f, 4.83962e+31f, 5.84687e+31f, 5.7039e+31f, 6.02728e+31f, 7.26914e+31f
+path.cubicTo(SkBits2Float(0x741ada75), SkBits2Float(0x74745717), SkBits2Float(0x73c106b4), SkBits2Float(0x74744e64), SkBits2Float(0x00000000), SkBits2Float(0x74744006)); // 4.9075e+31f, 7.74345e+31f, 3.05862e+31f, 7.74237e+31f, 0, 7.74059e+31f
+path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x74746c7c), SkBits2Float(0x74244dce), SkBits2Float(0x7474733e), SkBits2Float(0x74400000), SkBits2Float(0x74747445)); // 0, 7.7461e+31f, 5.207e+31f, 7.74693e+31f, 6.08472e+31f, 7.74706e+31f
+path.cubicTo(SkBits2Float(0x743f5854), SkBits2Float(0x746f3659), SkBits2Float(0x743ebe05), SkBits2Float(0x746a3017), SkBits2Float(0x743e2ff7), SkBits2Float(0x74655fa2)); // 6.06397e+31f, 7.58094e+31f, 6.04486e+31f, 7.42171e+31f, 6.02728e+31f, 7.26914e+31f
+path.cubicTo(SkBits2Float(0x7447a582), SkBits2Float(0x74615dee), SkBits2Float(0x744f74f6), SkBits2Float(0x745c4903), SkBits2Float(0x7455e7e6), SkBits2Float(0x7455d751)); // 6.32705e+31f, 7.14216e+31f, 6.57457e+31f, 6.98112e+31f, 6.77895e+31f, 6.77689e+31f
+path.cubicTo(SkBits2Float(0x74747474), SkBits2Float(0x743750a4), SkBits2Float(0x74747474), SkBits2Float(0x73f46f0d), SkBits2Float(0x74747474), SkBits2Float(0x00000000)); // 7.74708e+31f, 5.80948e+31f, 7.74708e+31f, 3.87321e+31f, 7.74708e+31f, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0xf0682955), SkBits2Float(0x211f5b2d)); // -2.87402e+29f, 5.3992e-19f
+path.moveTo(SkBits2Float(0x2d2aff2d), SkBits2Float(0x74747474)); // 9.72004e-12f, 7.74708e+31f
+path.cubicTo(SkBits2Float(0x7474748e), SkBits2Float(0x74747490), SkBits2Float(0x8c722174), SkBits2Float(0x181f0080), SkBits2Float(0x74c0e520), SkBits2Float(0x747d7463)); // 7.7471e+31f, 7.7471e+31f, -1.86531e-31f, 2.05505e-24f, 1.22262e+32f, 8.0323e+31f
+path.cubicTo(SkBits2Float(0x7b005e4b), SkBits2Float(0xdf3a6a3a), SkBits2Float(0x2a3a2848), SkBits2Float(0x2d2d7821), SkBits2Float(0x8c55212d), SkBits2Float(0x2d2d2d24)); // 6.66526e+35f, -1.34326e+19f, 1.65341e-13f, 9.86059e-12f, -1.64189e-31f, 9.84393e-12f
+path.conicTo(SkBits2Float(0xde28804c), SkBits2Float(0x28e03721), SkBits2Float(0x3329df28), SkBits2Float(0x2d291515), SkBits2Float(0x0568295b)); // -3.03545e+18f, 2.48929e-14f, 3.95513e-08f, 9.61122e-12f, 1.09162e-35f
+path.conicTo(SkBits2Float(0x556a2d21), SkBits2Float(0x21088c2a), SkBits2Float(0x3a333303), SkBits2Float(0x5b293a8a), SkBits2Float(0x6855683b)); // 1.60925e+13f, 4.62641e-19f, 0.000683591f, 4.76336e+16f, 4.03115e+24f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_30(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x1f2108c0), SkBits2Float(0x4b7b0321)); // 3.41003e-20f, 1.64503e+07f
+path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68305b2d), SkBits2Float(0xf0685527)); // 3.33127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x6e2a1f72), SkBits2Float(0x0321082a), SkBits2Float(0x2a4b7bc0), SkBits2Float(0x68295b2d)); // 2.49282e-13f, 1.31626e+28f, 4.7323e-37f, 1.8073e-13f, 3.19905e+24f
+path.lineTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55)); // 4.87407e+16f, 5.7784e-19f
+path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x4b7b28c0)); // 4.7323e-37f, 1.646e+07f
+path.lineTo(SkBits2Float(0x2a8ced7a), SkBits2Float(0x2d081f21)); // 2.50338e-13f, 7.73762e-12f
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x69392d55), SkBits2Float(0x2d5b684b), SkBits2Float(0x8c5527f0), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 1.39916e+25f, 1.24719e-11f, -1.64209e-31f, 5.76395e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0xed7a6a1f), SkBits2Float(0x3a214793), SkBits2Float(0x3328282a), SkBits2Float(0x3a8a3adf)); // 5.77848e-19f, -4.84372e+27f, 0.000615233f, 3.91521e-08f, 0.00105461f
+path.conicTo(SkBits2Float(0x4be80304), SkBits2Float(0xdcdcdc15), SkBits2Float(0xdcdcdcdc), SkBits2Float(0x71dcdcdc), SkBits2Float(0x6c107164)); // 3.04102e+07f, -4.97332e+17f, -4.97339e+17f, 2.18732e+30f, 6.98483e+26f
+path.conicTo(SkBits2Float(0x6c0f1d6c), SkBits2Float(0x8e406c6e), SkBits2Float(0x6c6c0200), SkBits2Float(0x6c6ce46c), SkBits2Float(0x6c6c6c6c)); // 6.92061e+26f, -2.3718e-30f, 1.14126e+27f, 1.14554e+27f, 1.14327e+27f
+path.lineTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.close();
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.quadTo(SkBits2Float(0x3ab38a28), SkBits2Float(0x3ac22c21), SkBits2Float(0x6c401057), SkBits2Float(0x6d6d6b64)); // 0.00136978f, 0.00148142f, 9.28764e+26f, 4.59236e+27f
+path.cubicTo(SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x286d6d6d), SkBits2Float(0x081d2a29), SkBits2Float(0x6d690321), SkBits2Float(0x6b6b026d)); // 4.59251e+27f, 4.59251e+27f, 1.31799e-14f, 4.7295e-34f, 4.50711e+27f, 2.84109e+26f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz763_31(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0xd72a8c55), SkBits2Float(0x61081f2a)); // -1.8752e+14f, 1.56938e+20f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x4793ed7a), SkBits2Float(0x282a3a21), SkBits2Float(0xdf3a2128), SkBits2Float(0x471ac575)); // 6.14991e+25f, 75739, 9.4495e-15f, -1.3412e+19f, 39621.5f
+path.lineTo(SkBits2Float(0x28404040), SkBits2Float(0x552a298a)); // 1.06721e-14f, 1.16935e+13f
+path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x80ed7a3a), SkBits2Float(0x2a3a2147), SkBits2Float(0xdf212828), SkBits2Float(0x4f1a3a3a)); // 6.14991e+25f, -2.18089e-38f, 1.65317e-13f, -1.16126e+19f, 2.58751e+09f
+path.lineTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f
+path.close();
+path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f
+path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x432a2928), SkBits2Float(0x96812be6), SkBits2Float(0x272a1d2a), SkBits2Float(0x3a2a3529), SkBits2Float(0x3b1e2ab0)); // 0.00148109f, 170.161f, -2.08688e-25f, 2.3608e-15f, 0.000649291f, 0.00241343f
+path.lineTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f
+path.close();
+path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f, 4.61198e-19f
+path.cubicTo(SkBits2Float(0xc5272927), SkBits2Float(0x22383b39), SkBits2Float(0x1051523a), SkBits2Float(0x2927b029), SkBits2Float(0x685b2d27), SkBits2Float(0x5b2d6855)); // -2674.57f, 2.4968e-18f, 4.12813e-29f, 3.72342e-14f, 4.14012e+24f, 4.88099e+16f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_33(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 7.66623e+30f, 7.66608e+30f
+path.quadTo(SkBits2Float(0x724341bf), SkBits2Float(0x72433fc4), SkBits2Float(0x6d757575), SkBits2Float(0x6d6d6d6d)); // 3.86746e+30f, 3.86731e+30f, 4.74786e+27f, 4.59251e+27f
+path.cubicTo(SkBits2Float(0x6d18b5e5), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6cbe03bd), SkBits2Float(0x6d4b455b), SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d20df31)); // 2.95385e+27f, 4.59251e+27f, 1.83771e+27f, 3.93183e+27f, 1.14323e+27f, 3.11171e+27f
+path.conicTo(SkBits2Float(0x6c6c8b72), SkBits2Float(0x00000000), SkBits2Float(0x6c6c6c6c), SkBits2Float(0x00000000), SkBits2Float(0x400812df)); // 1.14386e+27f, 0, 1.14327e+27f, 0, 2.12615f
+path.quadTo(SkBits2Float(0x72432acb), SkBits2Float(0x72432295), SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 3.86568e+30f, 3.86505e+30f, 7.66623e+30f, 7.66608e+30f
+path.close();
+path.moveTo(SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 7.66623e+30f, 7.66608e+30f
+path.cubicTo(SkBits2Float(0x74f97d76), SkBits2Float(0x74f97d90), SkBits2Float(0x75381628), SkBits2Float(0x7538182c), SkBits2Float(0x7538153b), SkBits2Float(0x75381835)); // 1.58133e+32f, 1.58133e+32f, 2.33357e+32f, 2.33367e+32f, 2.33353e+32f, 2.33368e+32f
+path.cubicTo(SkBits2Float(0x7538144e), SkBits2Float(0x7538183f), SkBits2Float(0x74f9760f), SkBits2Float(0x74f97ddd), SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 2.33348e+32f, 2.33368e+32f, 1.58115e+32f, 1.58134e+32f, 7.66623e+30f, 7.66608e+30f
+path.close();
+path.moveTo(SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d20df31)); // 1.14323e+27f, 3.11171e+27f
+path.conicTo(SkBits2Float(0x6c6c55ae), SkBits2Float(0x6d80b520), SkBits2Float(0x6c6c1071), SkBits2Float(0x6e0f1d6c), SkBits2Float(0x3f96e656)); // 1.14284e+27f, 4.97913e+27f, 1.14154e+27f, 1.1073e+28f, 1.1789f
+path.lineTo(SkBits2Float(0x6a674231), SkBits2Float(0x6c0c3394)); // 6.98936e+25f, 6.77973e+26f
+path.cubicTo(SkBits2Float(0x6b12c63f), SkBits2Float(0x6c881439), SkBits2Float(0x6bba4ae5), SkBits2Float(0x6ced1e23), SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d20df31)); // 1.77439e+26f, 1.31608e+27f, 4.50428e+26f, 2.29326e+27f, 1.14323e+27f, 3.11171e+27f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x6c6b6ba7), SkBits2Float(0x886b6b6b)); // 1.13842e+27f, -7.0844e-34f
+path.quadTo(SkBits2Float(0x0000206b), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d)); // 1.16294e-41f, 4.59251e+27f, 4.59251e+27f, 4.59251e+27f
+path.conicTo(SkBits2Float(0x3e3e3e3e), SkBits2Float(0xafbcad20), SkBits2Float(0x78787878), SkBits2Float(0x78787829), SkBits2Float(0x78787878)); // 0.185784f, -3.432e-10f, 2.01583e+34f, 2.01582e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x95066b78)); // 2.01583e+34f, -2.71459e-26f
+path.lineTo(SkBits2Float(0x6c6b6ba7), SkBits2Float(0x886b6b6b)); // 1.13842e+27f, -7.0844e-34f
+path.quadTo(SkBits2Float(0x0000206b), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6d6d6d6d)); // 1.16294e-41f, 4.59251e+27f, 4.59251e+27f, 4.59251e+27f
+path.conicTo(SkBits2Float(0x3e3e3e3e), SkBits2Float(0xafbcad20), SkBits2Float(0x78787878), SkBits2Float(0x78787829), SkBits2Float(0x78787878)); // 0.185784f, -3.432e-10f, 2.01583e+34f, 2.01582e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x8787878f), SkBits2Float(0x87878787)); // -2.03922e-34f, -2.03922e-34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x6c105778), SkBits2Float(0x6d406b64)); // 6.97994e+26f, 3.72193e+27f
+path.cubicTo(SkBits2Float(0x7575756d), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x6d6d7575), SkBits2Float(0x6d6d6d6d)); // 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 4.59312e+27f, 4.59251e+27f
+path.cubicTo(SkBits2Float(0x6d696d6d), SkBits2Float(0x026d6d6d), SkBits2Float(0x80bc6b6b), SkBits2Float(0xaebcdfd0), SkBits2Float(0x7878bcac), SkBits2Float(0x78787878)); // 4.51514e+27f, 1.74434e-37f, -1.73036e-38f, -8.58901e-11f, 2.01799e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0xb4bcacbc), SkBits2Float(0xbcadbcbc)); // -3.51434e-07f, -0.0212082f
+path.moveTo(SkBits2Float(0xa03aacbc), SkBits2Float(0x757575a0)); // -1.5812e-19f, 3.11157e+32f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_32(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.cubicTo(SkBits2Float(0xdedcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0x55dcdcdc), SkBits2Float(0x29407d7f)); // -7.95742e+18f, -4.97339e+17f, -4.97339e+17f, -4.97339e+17f, 3.03551e+13f, 4.27414e-14f
+path.cubicTo(SkBits2Float(0x7b93ed4b), SkBits2Float(0x29521472), SkBits2Float(0xdfc83c28), SkBits2Float(0x1a3a834e), SkBits2Float(0x6855e84f), SkBits2Float(0xf2f22a80)); // 1.53616e+36f, 4.66471e-14f, -2.88569e+19f, 3.857e-23f, 4.0406e+24f, -9.59318e+30f
+path.moveTo(SkBits2Float(0xe0f2f210), SkBits2Float(0xc3f2eef2)); // -1.40049e+20f, -485.867f
+path.cubicTo(SkBits2Float(0x108ced7a), SkBits2Float(0x7bc00308), SkBits2Float(0x287a6a3a), SkBits2Float(0x242847ed), SkBits2Float(0x2bcb302a), SkBits2Float(0xf21003e8)); // 5.55862e-29f, 1.99396e+36f, 1.39008e-14f, 3.64901e-17f, 1.44374e-12f, -2.85252e+30f
+path.moveTo(SkBits2Float(0x556c0010), SkBits2Float(0x002a8768)); // 1.62178e+13f, 3.90567e-39f
+path.quadTo(SkBits2Float(0xf2f22021), SkBits2Float(0xf2f2f56e), SkBits2Float(0xf2f2f2f2), SkBits2Float(0xf22040d9)); // -9.59158e+30f, -9.62459e+30f, -9.6242e+30f, -3.17414e+30f
+path.lineTo(SkBits2Float(0xc013f2f2), SkBits2Float(0x0000294d)); // -2.3117f, 1.48159e-41f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_34(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f
+path.quadTo(SkBits2Float(0x63690f37), SkBits2Float(0x6d0a3d9b), SkBits2Float(0x00000000), SkBits2Float(0x6d3e3e3e)); // 4.29919e+21f, 2.67396e+27f, 0, 3.67984e+27f
+path.conicTo(SkBits2Float(0x6b9253fc), SkBits2Float(0x6c956a8b), SkBits2Float(0x6c6ac798), SkBits2Float(0x692a5d27), SkBits2Float(0x3e56eb72)); // 3.538e+26f, 1.44506e+27f, 1.13532e+27f, 1.28723e+25f, 0.209883f
+path.lineTo(SkBits2Float(0x6c6c586c), SkBits2Float(0x00000000)); // 1.1429e+27f, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x6c8c6c6c), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x6cc8e82a), SkBits2Float(0x5b684b68)); // 1.35809e+27f, 0, 0, 1.94305e+27f, 6.53851e+16f
+path.lineTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f
+path.close();
+path.moveTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f
+path.quadTo(SkBits2Float(0x641ae35f), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 1.14287e+22f, 0, 0, 0
+path.lineTo(SkBits2Float(0x6c6c586c), SkBits2Float(0x00000000)); // 1.1429e+27f, 0
+path.conicTo(SkBits2Float(0x6c6ba1fc), SkBits2Float(0x688c9eb1), SkBits2Float(0x6c6ac798), SkBits2Float(0x692a5d27), SkBits2Float(0x3f7fec32)); // 1.13945e+27f, 5.31247e+24f, 1.13532e+27f, 1.28723e+25f, 0.999698f
+path.lineTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21f, 1.94304e+27f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x6c3e3e3e), SkBits2Float(0x586c79ff)); // 9.19959e+26f, 1.04003e+15f
+path.quadTo(SkBits2Float(0x6c6c4a6c), SkBits2Float(0x6c6c6c6c), SkBits2Float(0xc83e6c6c), SkBits2Float(0x3e313e3e)); // 1.14263e+27f, 1.14327e+27f, -194994, 0.173089f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz763_36(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20f, -2.04889f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
+path.moveTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x8cef552a), SkBits2Float(0x295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f, -3.6875e-31f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
+path.lineTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.conicTo(SkBits2Float(0x212a081f), SkBits2Float(0x4b7bc003), SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556839), SkBits2Float(0x2a8c555b)); // 5.7609e-19f, 1.64987e+07f, 4.88298e+16f, -2.64185e+29f, 2.49282e-13f
+path.conicTo(SkBits2Float(0xf42a212a), SkBits2Float(0x4b7bc003), SkBits2Float(0x2aed7a39), SkBits2Float(0x2108c08c), SkBits2Float(0x7b03211f)); // -5.39162e+31f, 1.64987e+07f, 4.21845e-13f, 4.63334e-19f, 6.80863e+35f
+path.lineTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f
+path.close();
+path.moveTo(SkBits2Float(0xe8355b2d), SkBits2Float(0xf0682955)); // -3.42572e+24f, -2.87402e+29f
+path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2a8c555b), SkBits2Float(0x212a1f72), SkBits2Float(0x03210807), SkBits2Float(0x6a4b7b28), SkBits2Float(0x4793ed7a)); // 2.49282e-13f, 5.76399e-19f, 4.73229e-37f, 6.14984e+25f, 75739
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x282a282a), SkBits2Float(0x8a3adf21), SkBits2Float(0x284f1a3a), SkBits2Float(0x213ab38a)); // 9.4456e-15f, -8.99754e-33f, 1.14965e-14f, 6.32569e-19f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x3a20002a), SkBits2Float(0x2a8ced29)); // 2.25206e-21f, 300.343f, 0.000610354f, 2.50336e-13f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0xed210830), SkBits2Float(0xc04b6a03), SkBits2Float(0x68297b27), SkBits2Float(0x55555b2d), SkBits2Float(0x2ab03a2a)); // -3.11481e+27f, -3.17835f, 3.20141e+24f, 1.46617e+13f, 3.13042e-13f
+path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3a3b2729), SkBits2Float(0xc4341f20), SkBits2Float(0xecc52a22)); // 2.22225e-15f, 0.000713932f, -720.486f, -1.90686e+27f
+path.cubicTo(SkBits2Float(0x5921c25d), SkBits2Float(0x29523a70), SkBits2Float(0x555b2d68), SkBits2Float(0x1f212a8c), SkBits2Float(0x0321d90a), SkBits2Float(0x5b2d6829)); // 2.8457e+15f, 4.66801e-14f, 1.50618e+13f, 3.41283e-20f, 4.75628e-37f, 4.88097e+16f
+path.lineTo(SkBits2Float(0x1f2a2a8c), SkBits2Float(0x03210821)); // 3.60341e-20f, 4.7323e-37f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x2eed6a7a), SkBits2Float(0x282a3a21), SkBits2Float(0x3a21df28), SkBits2Float(0x4f1a3a8a), SkBits2Float(0x3ab38a28)); // 1.07964e-10f, 9.4495e-15f, 0.000617492f, 2.58753e+09f, 0.00136978f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0xe61d2a28), SkBits2Float(0x2a43962b), SkBits2Float(0x29272a81), SkBits2Float(0x2bb02a55)); // -1.85547e+23f, 1.73716e-13f, 3.71183e-14f, 1.25173e-12f
+path.quadTo(SkBits2Float(0x2720213b), SkBits2Float(0x3ac52729), SkBits2Float(0xc4223b32), SkBits2Float(0x6c2a201f)); // 2.22225e-15f, 0.00150416f, -648.925f, 8.22676e+26f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_35(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x2aed2a8c), SkBits2Float(0x03210a1f)); // 4.21292e-13f, 4.73253e-37f
+path.conicTo(SkBits2Float(0x0000007b), SkBits2Float(0x7474747f), SkBits2Float(0x74747474), SkBits2Float(0x747474c4), SkBits2Float(0x74747474)); // 1.7236e-43f, 7.74709e+31f, 7.74708e+31f, 7.74712e+31f, 7.74708e+31f
+path.quadTo(SkBits2Float(0x74747474), SkBits2Float(0x74747474), SkBits2Float(0x20437474), SkBits2Float(0x43a52b02)); // 7.74708e+31f, 7.74708e+31f, 1.65557e-19f, 330.336f
+path.moveTo(SkBits2Float(0x3a214781), SkBits2Float(0x2128282a)); // 0.000615232f, 5.69738e-19f
+path.lineTo(SkBits2Float(0x4b7bd603), SkBits2Float(0x6cf33b6a)); // 1.65043e+07f, 2.3524e+27f
+path.conicTo(SkBits2Float(0x35778caa), SkBits2Float(0x0000002a), SkBits2Float(0x74742164), SkBits2Float(0x2a3a7474), SkBits2Float(0x4cc22157)); // 9.22194e-07f, 5.88545e-44f, 7.7368e+31f, 1.65605e-13f, 1.0178e+08f
+path.cubicTo(SkBits2Float(0x21479321), SkBits2Float(0x23434cc2), SkBits2Float(0x3a214793), SkBits2Float(0x2128282a), SkBits2Float(0x323adf81), SkBits2Float(0x77291a3a)); // 6.76185e-19f, 1.05872e-17f, 0.000615233f, 5.69738e-19f, 1.08774e-08f, 3.42981e+33f
+path.conicTo(SkBits2Float(0x0000002a), SkBits2Float(0x7474743e), SkBits2Float(0x74747474), SkBits2Float(0x74746474), SkBits2Float(0x74747474)); // 5.88545e-44f, 7.74706e+31f, 7.74708e+31f, 7.7451e+31f, 7.74708e+31f
+path.cubicTo(SkBits2Float(0x21e7fc06), SkBits2Float(0x2a212a59), SkBits2Float(0x0321081f), SkBits2Float(0x00002a35), SkBits2Float(0x74744000), SkBits2Float(0x2974e874)); // 1.57199e-18f, 1.43144e-13f, 4.7323e-37f, 1.5141e-41f, 7.74059e+31f, 5.43805e-14f
+path.cubicTo(SkBits2Float(0x74647474), SkBits2Float(0x74747474), SkBits2Float(0x12ec7474), SkBits2Float(0x4cc22147), SkBits2Float(0x47932343), SkBits2Float(0x282a3a21)); // 7.24002e+31f, 7.74708e+31f, 1.49224e-27f, 1.0178e+08f, 75334.5f, 9.4495e-15f
+path.lineTo(SkBits2Float(0x3a214781), SkBits2Float(0x2128282a)); // 0.000615232f, 5.69738e-19f
+path.close();
+path.moveTo(SkBits2Float(0x3a214781), SkBits2Float(0x2128282a)); // 0.000615232f, 5.69738e-19f
+path.conicTo(SkBits2Float(0x3a323adf), SkBits2Float(0x4977291a), SkBits2Float(0x0000002a), SkBits2Float(0x7474743e), SkBits2Float(0x74747474)); // 0.000679893f, 1.01237e+06f, 5.88545e-44f, 7.74706e+31f, 7.74708e+31f
+path.cubicTo(SkBits2Float(0x74747464), SkBits2Float(0x74747474), SkBits2Float(0x21e7fc06), SkBits2Float(0x2a212a59), SkBits2Float(0x0321081f), SkBits2Float(0x00002a35)); // 7.74708e+31f, 7.74708e+31f, 1.57199e-18f, 1.43144e-13f, 4.7323e-37f, 1.5141e-41f
+path.moveTo(SkBits2Float(0x74747440), SkBits2Float(0x742974e8)); // 7.74706e+31f, 5.3703e+31f
+path.cubicTo(SkBits2Float(0x74746474), SkBits2Float(0x74747474), SkBits2Float(0xd912ec74), SkBits2Float(0x553a3728), SkBits2Float(0x29202a8c), SkBits2Float(0x5555201b)); // 7.7451e+31f, 7.74708e+31f, -2.58471e+15f, 1.27966e+13f, 3.5564e-14f, 1.46459e+13f
+path.moveTo(SkBits2Float(0x31292768), SkBits2Float(0x212d2aff)); // 2.46151e-09f, 5.86716e-19f
+path.quadTo(SkBits2Float(0x2128282a), SkBits2Float(0x323adf81), SkBits2Float(0x77291a3a), SkBits2Float(0x00002a49)); // 5.69738e-19f, 1.08774e-08f, 3.42981e+33f, 1.51691e-41f
+path.moveTo(SkBits2Float(0x7474743e), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f
+path.cubicTo(SkBits2Float(0x74747464), SkBits2Float(0x74747474), SkBits2Float(0x21e7fc06), SkBits2Float(0x2a212a59), SkBits2Float(0x0321081f), SkBits2Float(0x00002a35)); // 7.74708e+31f, 7.74708e+31f, 1.57199e-18f, 1.43144e-13f, 4.7323e-37f, 1.5141e-41f
+path.moveTo(SkBits2Float(0x74747440), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f
+path.cubicTo(SkBits2Float(0x74747464), SkBits2Float(0x74747474), SkBits2Float(0x43747474), SkBits2Float(0xa52b0220), SkBits2Float(0x47812a43), SkBits2Float(0x282a3a21)); // 7.74708e+31f, 7.74708e+31f, 244.455f, -1.48326e-16f, 66132.5f, 9.4495e-15f
+path.lineTo(SkBits2Float(0x74747440), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f
+path.close();
+path.moveTo(SkBits2Float(0x74747440), SkBits2Float(0x74747474)); // 7.74706e+31f, 7.74708e+31f
+path.conicTo(SkBits2Float(0x3a323adf), SkBits2Float(0x19433b1a), SkBits2Float(0x5921e7fc), SkBits2Float(0x1f2a212a), SkBits2Float(0x35032108)); // 0.000679893f, 1.00932e-23f, 2.84828e+15f, 3.60263e-20f, 4.88494e-07f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_37(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x5568392a), SkBits2Float(0x5b2d3368)); // 1.59583e+13f, 4.87517e+16f
+path.conicTo(SkBits2Float(0x5b2d555b), SkBits2Float(0x68275b2d), SkBits2Float(0x21685527), SkBits2Float(0x0321082a), SkBits2Float(0x6ab485c0)); // 4.8789e+16f, 3.16127e+24f, 7.87174e-19f, 4.7323e-37f, 1.09119e+26f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 4.8745e+16f
+path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2a8cef2a), SkBits2Float(0x682d2953), SkBits2Float(0xee682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 2.50349e-13f, 3.27093e+24f, -1.79601e+28f, 1.64988e+07f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.conicTo(SkBits2Float(0x4b03213b), SkBits2Float(0xc07b2a08), SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556830), SkBits2Float(0x2a8c555b)); // 8.59372e+06f, -3.92444f, 4.88298e+16f, -2.64185e+29f, 2.49282e-13f
+path.conicTo(SkBits2Float(0x0321212a), SkBits2Float(0x4b7bd2c0), SkBits2Float(0xed7ac039), SkBits2Float(0x2f218c08), SkBits2Float(0x1f037b2a)); // 4.73517e-37f, 1.65035e+07f, -4.85023e+27f, 1.46926e-10f, 2.78422e-20f
+path.lineTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f
+path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x721f2a5b), SkBits2Float(0x212a8c55), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7b28), SkBits2Float(0x4793ed7a)); // 3.1526e+30f, 5.7784e-19f, 4.7323e-37f, 6.14984e+25f, 75739
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x28282a2a), SkBits2Float(0x2c682921), SkBits2Float(0x8c555bf6), SkBits2Float(0x6d03de30)); // 9.33502e-15f, 3.2992e-12f, -1.64366e-31f, 2.5507e+27f
+path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x081f2a21)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 4.78968e-34f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0xdf93ed7a), SkBits2Float(0x1a3a803a), SkBits2Float(0xb38a294f), SkBits2Float(0x3ac2213a)); // 6.14991e+25f, -2.13186e+19f, 3.85675e-23f, -6.43364e-08f, 0.00148109f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0xe62b291d), SkBits2Float(0x2a812a43), SkBits2Float(0x8ced093a), SkBits2Float(0xb38a5c5c), SkBits2Float(0x3ac2213a)); // -2.02071e+23f, 2.29443e-13f, -3.65212e-31f, -6.44293e-08f, 0.00148109f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.lineTo(SkBits2Float(0x8ced293a), SkBits2Float(0x5c5c5c5c)); // -3.65404e-31f, 2.48104e+17f
+path.moveTo(SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003)); // 4.61198e-19f, 1.64987e+07f
+path.lineTo(SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 9.43289e-15f, 4.8745e+16f
+path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5a)); // 3.50084e+24f, -2.87489e+29f
+path.lineTo(SkBits2Float(0x682d2952), SkBits2Float(0xee682103)); // 3.27093e+24f, -1.79601e+28f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x2a3b0355)); // 4.85282e+16f, 1.66101e-13f
+path.lineTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5a)); // 3.50084e+24f, -2.87489e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5a)); // 3.50084e+24f, -2.87489e+29f
+path.conicTo(SkBits2Float(0x084b218c), SkBits2Float(0x6ac07b2a), SkBits2Float(0x395b2d7a), SkBits2Float(0x5bf05568), SkBits2Float(0x1f2a8c55)); // 6.11275e-34f, 1.16348e+26f, 0.000209024f, 1.35296e+17f, 3.6115e-20f
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.cubicTo(SkBits2Float(0xbcb4bcac), SkBits2Float(0x000029ff), SkBits2Float(0x010000bc), SkBits2Float(0x00bcbc00), SkBits2Float(0xbebcbcbc), SkBits2Float(0xb6aebcae)); // -0.0220626f, 1.50654e-41f, 2.35104e-38f, 1.73325e-38f, -0.368627f, -5.20757e-06f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_38(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0x5b292d11), SkBits2Float(0x212a8c55), SkBits2Float(0x555b2d2d), SkBits2Float(0x52525268)); // 6.53477e+16f, 4.76188e+16f, 5.7784e-19f, 1.50617e+13f, 2.25831e+11f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52525272), SkBits2Float(0x2ac05252), SkBits2Float(0x727fb721)); // 4.80216e+30f, 2.25832e+11f, 3.41632e-13f, 5.06496e+30f
+path.lineTo(SkBits2Float(0x73727322), SkBits2Float(0x555b2d29)); // 1.92088e+31f, 1.50617e+13f
+path.lineTo(SkBits2Float(0xab2a212e), SkBits2Float(0x7a27872a)); // -6.04422e-13f, 2.17464e+35f
+path.moveTo(SkBits2Float(0x25fffefb), SkBits2Float(0x7bc00321)); // 4.44082e-16f, 1.99397e+36f
+path.quadTo(SkBits2Float(0x52524852), SkBits2Float(0x72525228), SkBits2Float(0x72727272), SkBits2Float(0x3a727272)); // 2.25789e+11f, 4.16584e+30f, 4.80216e+30f, 0.000924862f
+path.lineTo(SkBits2Float(0x25fffefb), SkBits2Float(0x7bc00321)); // 4.44082e-16f, 1.99397e+36f
+path.close();
+path.moveTo(SkBits2Float(0x25fffefb), SkBits2Float(0x7bc00321)); // 4.44082e-16f, 1.99397e+36f
+path.quadTo(SkBits2Float(0x2a292827), SkBits2Float(0x962b0080), SkBits2Float(0x5252752a), SkBits2Float(0x72725252)); // 1.50241e-13f, -1.38134e-25f, 2.25977e+11f, 4.79967e+30f
+path.quadTo(SkBits2Float(0x72725252), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.79967e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda000072), SkBits2Float(0x52525ada), SkBits2Float(0x52525252)); // 4.80215e+30f, -9.00732e+15f, 2.25867e+11f, 2.25831e+11f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525272), SkBits2Float(0x72525248), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16584e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada), SkBits2Float(0x52525252)); // 4.80215e+30f, -9.04113e+15f, 2.25867e+11f, 2.25831e+11f
+path.quadTo(SkBits2Float(0x86727272), SkBits2Float(0x5252528d), SkBits2Float(0x72525252), SkBits2Float(0x72727227)); // -4.55992e-35f, 2.25832e+11f, 4.16585e+30f, 4.80214e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x29217272), SkBits2Float(0xc003211c), SkBits2Float(0x556a4b7b)); // 4.80216e+30f, 3.58484e-14f, -2.0489f, 1.61006e+13f
+path.moveTo(SkBits2Float(0x72557272), SkBits2Float(0x00727272)); // 4.22775e+30f, 1.05103e-38f
+path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f
+path.close();
+path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x3a727272), SkBits2Float(0x28273ac2), SkBits2Float(0x00802a29)); // 4.80216e+30f, 0.000924862f, 9.2831e-15f, 1.17701e-38f
+path.lineTo(SkBits2Float(0x52752a96), SkBits2Float(0x72525252)); // 2.63245e+11f, 4.16585e+30f
+path.quadTo(SkBits2Float(0x72525272), SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x72727272)); // 4.16586e+30f, 2.25966e+11f, 2.25831e+11f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11f, 2.25831e+11f
+path.lineTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f
+path.close();
+path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525272), SkBits2Float(0x72525248), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16584e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada), SkBits2Float(0x72525252)); // 4.80215e+30f, -9.04113e+15f, 2.25867e+11f, 4.16585e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x72727252), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada)); // 4.80216e+30f, 4.80215e+30f, -9.04113e+15f, 2.25867e+11f
+path.lineTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f
+path.close();
+path.moveTo(SkBits2Float(0x5a61dada), SkBits2Float(0x52525252)); // 1.58931e+16f, 2.25831e+11f
+path.quadTo(SkBits2Float(0x86727272), SkBits2Float(0x5252528d), SkBits2Float(0x72525252), SkBits2Float(0x72727227)); // -4.55992e-35f, 2.25832e+11f, 4.16585e+30f, 4.80214e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x29217272), SkBits2Float(0xc003211c), SkBits2Float(0x556a4b7b)); // 4.80216e+30f, 3.58484e-14f, -2.0489f, 1.61006e+13f
+path.moveTo(SkBits2Float(0x72557272), SkBits2Float(0x00727272)); // 4.22775e+30f, 1.05103e-38f
+path.moveTo(SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 2.34994e+11f, 2.25831e+11f
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x52525ada), SkBits2Float(0x52525252)); // 4.80215e+30f, -9.04113e+15f, 2.25867e+11f, 2.25831e+11f
+path.quadTo(SkBits2Float(0x52525272), SkBits2Float(0x3b3b0052), SkBits2Float(0x5b2d553a), SkBits2Float(0x68556829)); // 2.25832e+11f, 0.00285341f, 4.87889e+16f, 4.03114e+24f
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x52528c55), SkBits2Float(0x29215252)); // 2.26074e+11f, 3.58206e-14f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_41(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x7a057c72), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x055f0089)); // 1.73275e+35f, 4.80216e+30f, 4.34505e+30f, 1.04855e-35f
+path.quadTo(SkBits2Float(0x00057272), SkBits2Float(0x72ff0000), SkBits2Float(0xba405e72), SkBits2Float(0x031b0074)); // 5.00233e-40f, 1.01016e+31f, -0.000733829f, 4.55509e-37f
+path.lineTo(SkBits2Float(0x664af700), SkBits2Float(0x56397d39)); // 2.39619e+23f, 5.09869e+13f
+path.quadTo(SkBits2Float(0x7a057273), SkBits2Float(0x057300e4), SkBits2Float(0x257c0c9f), SkBits2Float(0x72400006)); // 1.73224e+35f, 1.1426e-35f, 2.18618e-16f, 3.80295e+30f
+path.quadTo(SkBits2Float(0xba5b5e72), SkBits2Float(0x030000ff), SkBits2Float(0x74ba00e8), SkBits2Float(0xe8ec4000)); // -0.000836826f, 3.7617e-37f, 1.17894e+32f, -8.92527e+24f
+path.moveTo(SkBits2Float(0x39724aff), SkBits2Float(0x7200397d)); // 0.000231069f, 2.53975e+30f
+path.quadTo(SkBits2Float(0x827a0572), SkBits2Float(0x08727272), SkBits2Float(0x08080808), SkBits2Float(0x08080808)); // -1.83687e-37f, 7.29588e-34f, 4.09355e-34f, 4.09355e-34f
+path.lineTo(SkBits2Float(0x08080808), SkBits2Float(0x08080808)); // 4.09355e-34f, 4.09355e-34f
+path.lineTo(SkBits2Float(0x08080808), SkBits2Float(0x08080808)); // 4.09355e-34f, 4.09355e-34f
+path.conicTo(SkBits2Float(0x72728c08), SkBits2Float(0x5b5e7272), SkBits2Float(0x000074ba), SkBits2Float(0x03f8e300), SkBits2Float(0x5aff00e8)); // 4.80414e+30f, 6.26133e+16f, 4.18736e-41f, 1.46282e-36f, 3.58886e+16f
+path.quadTo(SkBits2Float(0x00800039), SkBits2Float(0x72100039), SkBits2Float(0x727a0572), SkBits2Float(0x7a727272)); // 1.1755e-38f, 2.85223e+30f, 4.95218e+30f, 3.14714e+35f
+path.lineTo(SkBits2Float(0x7272727a), SkBits2Float(0xdb5e6472)); // 4.80216e+30f, -6.25979e+16f
+path.moveTo(SkBits2Float(0x440039fc), SkBits2Float(0x0000f647)); // 512.906f, 8.83477e-41f
+path.lineTo(SkBits2Float(0x666d0100), SkBits2Float(0x726efe62)); // 2.79805e+23f, 4.73376e+30f
+path.lineTo(SkBits2Float(0x440039fc), SkBits2Float(0x0000f647)); // 512.906f, 8.83477e-41f
+path.close();
+path.moveTo(SkBits2Float(0x440039fc), SkBits2Float(0x0000f647)); // 512.906f, 8.83477e-41f
+path.conicTo(SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x475afc16), SkBits2Float(0x170100ad), SkBits2Float(0x01008000)); // 4.80216e+30f, -3.47604e+31f, 56060.1f, 4.1683e-25f, 2.36017e-38f
+path.quadTo(SkBits2Float(0x72057272), SkBits2Float(0x8c7a3472), SkBits2Float(0x72727272), SkBits2Float(0x00f6475e)); // 2.64319e+30f, -1.92751e-31f, 4.80216e+30f, 2.26171e-38f
+path.moveTo(SkBits2Float(0x6d106d43), SkBits2Float(0x6efe6266)); // 2.79362e+27f, 3.93641e+28f
+path.quadTo(SkBits2Float(0x72727a05), SkBits2Float(0xba5b7272), SkBits2Float(0x03000074), SkBits2Float(0x5aff00e8)); // 4.80274e+30f, -0.000837124f, 3.76163e-37f, 3.58886e+16f
+path.quadTo(SkBits2Float(0x00da0039), SkBits2Float(0x72100039), SkBits2Float(0x727a0572), SkBits2Float(0x7a727272)); // 2.00202e-38f, 2.85223e+30f, 4.95218e+30f, 3.14714e+35f
+path.lineTo(SkBits2Float(0x7272727a), SkBits2Float(0xdb5e6472)); // 4.80216e+30f, -6.25979e+16f
+path.lineTo(SkBits2Float(0xfc5b97fc), SkBits2Float(0x47440039)); // -4.56078e+36f, 50176.2f
+path.lineTo(SkBits2Float(0x00710000), SkBits2Float(0x62766d01)); // 1.03774e-38f, 1.13644e+21f
+path.quadTo(SkBits2Float(0x7a05726e), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16)); // 1.73224e+35f, 4.80216e+30f, -3.47604e+31f, 3.58785e+06f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_40(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x10190004), SkBits2Float(0x7272727a)); // 3.01739e-29f, 4.80216e+30f
+path.quadTo(SkBits2Float(0xf3db5e64), SkBits2Float(0x5b97fc16), SkBits2Float(0x000039fc), SkBits2Float(0x01008000)); // -3.47604e+31f, 8.55598e+16f, 2.08009e-41f, 2.36017e-38f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x41720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 15.1251f
+path.lineTo(SkBits2Float(0x63636363), SkBits2Float(0x63606363)); // 4.19457e+21f, 4.13923e+21f
+path.lineTo(SkBits2Float(0x01000000), SkBits2Float(0x10010004)); // 2.35099e-38f, 2.54408e-29f
+path.conicTo(SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16), SkBits2Float(0x0000d07d), SkBits2Float(0x01008000)); // 4.80216e+30f, -3.47604e+31f, 3.58785e+06f, 7.47915e-41f, 2.36017e-38f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x63720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 4.46415e+21f
+path.lineTo(SkBits2Float(0x63636363), SkBits2Float(0x63606363)); // 4.19457e+21f, 4.13923e+21f
+path.lineTo(SkBits2Float(0x72000000), SkBits2Float(0x5b5e72b4)); // 2.5353e+30f, 6.26136e+16f
+path.quadTo(SkBits2Float(0x05720089), SkBits2Float(0x05727272), SkBits2Float(0x7272727a), SkBits2Float(0x5b5e7272)); // 1.13789e-35f, 1.13998e-35f, 4.80216e+30f, 6.26133e+16f
+path.cubicTo(SkBits2Float(0x03000074), SkBits2Float(0x4aff00e8), SkBits2Float(0x397d3972), SkBits2Float(0x01727200), SkBits2Float(0x72727a00), SkBits2Float(0x5e8d7272)); // 3.76163e-37f, 8.35596e+06f, 0.000241494f, 4.45302e-38f, 4.80274e+30f, 5.09617e+18f
+path.moveTo(SkBits2Float(0x72008972), SkBits2Float(0x458fe705)); // 2.54594e+30f, 4604.88f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0xe8727272), SkBits2Float(0xba5b5e03), SkBits2Float(0x03000074)); // 1.73224e+35f, -4.5797e+24f, -0.00083682f, 3.76163e-37f
+path.lineTo(SkBits2Float(0xf3dbff00), SkBits2Float(0x00397d16)); // -3.48598e+31f, 5.2795e-39f
+path.cubicTo(SkBits2Float(0x7a101900), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x0197fc16), SkBits2Float(0x200c2010), SkBits2Float(0x20203620)); // 1.87049e+35f, 4.80216e+30f, -3.47604e+31f, 5.58304e-38f, 1.18691e-19f, 1.35704e-19f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz763_39(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x7a057c72), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x055f0089)); // 1.73275e+35f, 4.80216e+30f, 4.34505e+30f, 1.04855e-35f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0xba405e72), SkBits2Float(0x03000074)); // 1.73224e+35f, 4.80216e+30f, -0.000733829f, 3.76163e-37f
+path.lineTo(SkBits2Float(0x664aff00), SkBits2Float(0x56397d39)); // 2.39655e+23f, 5.09869e+13f
+path.quadTo(SkBits2Float(0x7a057273), SkBits2Float(0x057300ff), SkBits2Float(0x257c0c9f), SkBits2Float(0x72787257)); // 1.73224e+35f, 1.1426e-35f, 2.18618e-16f, 4.92099e+30f
+path.quadTo(SkBits2Float(0xba5b5e72), SkBits2Float(0x03000093), SkBits2Float(0x74ba00e8), SkBits2Float(0xe8ecff00)); // -0.000836826f, 3.76165e-37f, 1.17894e+32f, -8.95346e+24f
+path.moveTo(SkBits2Float(0x39724aff), SkBits2Float(0x7200397d)); // 0.000231069f, 2.53975e+30f
+path.quadTo(SkBits2Float(0x827a0572), SkBits2Float(0x72727272), SkBits2Float(0x724adf00), SkBits2Float(0x00397d39)); // -1.83687e-37f, 4.80216e+30f, 4.01828e+30f, 5.27954e-39f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x16f3abab), SkBits2Float(0xfc5b97fc), SkBits2Float(0x47440039)); // 1.73224e+35f, 3.93671e-25f, -4.56078e+36f, 50176.2f
+path.lineTo(SkBits2Float(0x00710000), SkBits2Float(0x62767201)); // 1.03774e-38f, 1.13653e+21f
+path.quadTo(SkBits2Float(0x7a05726e), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16)); // 1.73224e+35f, 4.80216e+30f, -3.47604e+31f, 3.58785e+06f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+
+static void fuzz763_42(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x05720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 1.13789e-35f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0xba405e72), SkBits2Float(0x03000074)); // 1.73224e+35f, 4.80216e+30f, -0.000733829f, 3.76163e-37f
+path.lineTo(SkBits2Float(0x724aff00), SkBits2Float(0x56397d39)); // 4.02075e+30f, 5.09869e+13f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0xfa8d00ff), SkBits2Float(0x25727272), SkBits2Float(0x7272727a)); // 1.73224e+35f, -3.66067e+35f, 2.10289e-16f, 4.80216e+30f
+path.quadTo(SkBits2Float(0xba5b5e72), SkBits2Float(0x03000093), SkBits2Float(0x74ba00e8), SkBits2Float(0xe8e0ff00)); // -0.000836826f, 3.76165e-37f, 1.17894e+32f, -8.50011e+24f
+path.conicTo(SkBits2Float(0x39724aff), SkBits2Float(0x7200397d), SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x4aff0072)); // 0.000231069f, 2.53975e+30f, 1.73224e+35f, 4.80216e+30f, 8.3559e+06f
+path.quadTo(SkBits2Float(0x00397d39), SkBits2Float(0x05727272), SkBits2Float(0x7272727a), SkBits2Float(0x385e7272)); // 5.27954e-39f, 1.13998e-35f, 4.80216e+30f, 5.30355e-05f
+path.quadTo(SkBits2Float(0x057200ff), SkBits2Float(0x25727272), SkBits2Float(0x7272727a), SkBits2Float(0x5b5e7272)); // 1.1379e-35f, 2.10289e-16f, 4.80216e+30f, 6.26133e+16f
+path.cubicTo(SkBits2Float(0x03000074), SkBits2Float(0x4aff00e8), SkBits2Float(0x397d3972), SkBits2Float(0x01000400), SkBits2Float(0x72727a10), SkBits2Float(0x5e647272)); // 3.76163e-37f, 8.35596e+06f, 0.000241494f, 2.35128e-38f, 4.80275e+30f, 4.11534e+18f
+path.quadTo(SkBits2Float(0x2b2d16f3), SkBits2Float(0x0039fc4d), SkBits2Float(0x68800000), SkBits2Float(0x0100fafa)); // 6.14938e-13f, 5.32513e-39f, 4.8357e+24f, 2.369e-38f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0x725b5e72), SkBits2Float(0x63720089)); // 1.73224e+35f, 4.80216e+30f, 4.34505e+30f, 4.46415e+21f
+path.lineTo(SkBits2Float(0x63636363), SkBits2Float(0x63606363)); // 4.19457e+21f, 4.13923e+21f
+path.lineTo(SkBits2Float(0x72720000), SkBits2Float(0xff725b5e)); // 4.7933e+30f, -3.22148e+38f
+path.moveTo(SkBits2Float(0x72720572), SkBits2Float(0x5b5e2572)); // 4.79373e+30f, 6.25286e+16f
+path.quadTo(SkBits2Float(0x05720089), SkBits2Float(0x25727272), SkBits2Float(0x72728c7a), SkBits2Float(0x5b5e7272)); // 1.13789e-35f, 2.10289e-16f, 4.80417e+30f, 6.26133e+16f
+path.cubicTo(SkBits2Float(0x03000074), SkBits2Float(0x4aff00e8), SkBits2Float(0x397d3972), SkBits2Float(0x01000400), SkBits2Float(0x72727a10), SkBits2Float(0x5e827272)); // 3.76163e-37f, 8.35596e+06f, 0.000241494f, 2.35128e-38f, 4.80275e+30f, 4.69985e+18f
+path.quadTo(SkBits2Float(0x97fc16f3), SkBits2Float(0x0039fc5b), SkBits2Float(0x00f6472e), SkBits2Float(0x01008000)); // -1.62909e-24f, 5.32515e-39f, 2.26171e-38f, 2.36017e-38f
+path.quadTo(SkBits2Float(0x7a057272), SkBits2Float(0x72727272), SkBits2Float(0xf3db5e64), SkBits2Float(0x4a5afc16)); // 1.73224e+35f, 4.80216e+30f, -3.47604e+31f, 3.58785e+06f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_43(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x5c386c3a), SkBits2Float(0x4e691a3e)); // 2.07642e+17f, 9.77703e+08f
+path.cubicTo(SkBits2Float(0x6f69f9f5), SkBits2Float(0x18ff8791), SkBits2Float(0x2492263c), SkBits2Float(0xbc6fdb48), SkBits2Float(0xc2f82107), SkBits2Float(0x729a18e1)); // 7.24122e+28f, 6.60528e-24f, 6.33822e-17f, -0.0146397f, -124.065f, 6.10442e+30f
+path.cubicTo(SkBits2Float(0x07d729d1), SkBits2Float(0xdea6db48), SkBits2Float(0xcd1dfb88), SkBits2Float(0x90826769), SkBits2Float(0x1c20e5a4), SkBits2Float(0xa4c3ba9b)); // 3.23742e-34f, -6.01164e+18f, -1.65657e+08f, -5.14353e-29f, 5.32364e-22f, -8.48839e-17f
+path.moveTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f
+path.close();
+path.moveTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f
+path.cubicTo(SkBits2Float(0xdeea1d6e), SkBits2Float(0xc7774804), SkBits2Float(0x27cf0dcf), SkBits2Float(0x6ae8b99f), SkBits2Float(0x24ac3260), SkBits2Float(0x062fa93c)); // -8.43488e+18f, -63304, 5.7469e-15f, 1.40674e+26f, 7.46784e-17f, 3.30382e-35f
+path.lineTo(SkBits2Float(0x438a0b9c), SkBits2Float(0x60a1d2c8)); // 276.091f, 9.32848e+19f
+path.quadTo(SkBits2Float(0xe13fb902), SkBits2Float(0x07ee536f), SkBits2Float(0x971d8ac1), SkBits2Float(0x2f9f174b)); // -2.21041e+20f, 3.58593e-34f, -5.09046e-25f, 2.89385e-10f
+path.lineTo(SkBits2Float(0x0f2cf5d8), SkBits2Float(0xe271654c)); // 8.5276e-30f, -1.11324e+21f
+path.lineTo(SkBits2Float(0xe6cf24d2), SkBits2Float(0xd9537742)); // -4.89105e+23f, -3.72015e+15f
+path.cubicTo(SkBits2Float(0x1aaaee04), SkBits2Float(0x9e3b804c), SkBits2Float(0x84cba87d), SkBits2Float(0x4e0e8ccc), SkBits2Float(0x2aec611a), SkBits2Float(0x7ae4b639)); // 7.06949e-23f, -9.92623e-21f, -4.78798e-36f, 5.97898e+08f, 4.19894e-13f, 5.9377e+35f
+path.conicTo(SkBits2Float(0x73357921), SkBits2Float(0x6f163021), SkBits2Float(0x70ea542c), SkBits2Float(0xe008f404), SkBits2Float(0x1f6c5e52)); // 1.43778e+31f, 4.64809e+28f, 5.8017e+29f, -3.94741e+19f, 5.0053e-20f
+path.lineTo(SkBits2Float(0xda45ad4e), SkBits2Float(0xedce4a04)); // -1.39103e+16f, -7.98042e+27f
+path.lineTo(SkBits2Float(0xac0e45da), SkBits2Float(0x8f632841)); // -2.02182e-12f, -1.11997e-29f
+path.lineTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f
+path.close();
+path.moveTo(SkBits2Float(0xcc2084b7), SkBits2Float(0x19f68bdb)); // -4.20789e+07f, 2.54923e-23f
+path.quadTo(SkBits2Float(0xf35c4ad5), SkBits2Float(0x0692f251), SkBits2Float(0x69632126), SkBits2Float(0xb927af67)); // -1.74534e+31f, 5.52751e-35f, 1.71614e+25f, -0.000159917f
+path.moveTo(SkBits2Float(0x6534bff9), SkBits2Float(0x434a9986)); // 5.3348e+22f, 202.6f
+path.quadTo(SkBits2Float(0x37c603e5), SkBits2Float(0xa0683953), SkBits2Float(0x751915e4), SkBits2Float(0x831c911a)); // 2.36053e-05f, -1.96701e-19f, 1.94059e+32f, -4.60108e-37f
+path.cubicTo(SkBits2Float(0xba4f10f1), SkBits2Float(0x5a7571df), SkBits2Float(0x4ec67459), SkBits2Float(0x33c58827), SkBits2Float(0x10b78ccb), SkBits2Float(0xedbd2748)); // -0.000789895f, 1.72716e+16f, 1.66476e+09f, 9.19829e-08f, 7.23977e-29f, -7.31752e+27f
+path.cubicTo(SkBits2Float(0x6d06f06a), SkBits2Float(0xe30465cf), SkBits2Float(0xc5458fe7), SkBits2Float(0xca488dc4), SkBits2Float(0x38f9021c), SkBits2Float(0x3e8d58db)); // 2.6101e+27f, -2.44231e+21f, -3160.99f, -3.28587e+06f, 0.000118736f, 0.276069f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_44(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x7c223bab), SkBits2Float(0x7cf35966)); // 3.36945e+36f, 1.01083e+37f
+path.quadTo(SkBits2Float(0x00000000), SkBits2Float(0x7ccaca6d), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 8.4236e+36f, 0, 0
+path.lineTo(SkBits2Float(0x7d7d7d7d), SkBits2Float(0x00000000)); // 2.10591e+37f, 0
+path.quadTo(SkBits2Float(0x7ccacab0), SkBits2Float(0x7d1817f4), SkBits2Float(0x7c223bab), SkBits2Float(0x7cf35966)); // 8.42364e+36f, 1.26354e+37f, 3.36945e+36f, 1.01083e+37f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x109d0000), SkBits2Float(0xff7bc000)); // 6.19256e-29f, -3.34633e+38f
+path.conicTo(SkBits2Float(0x979797ed), SkBits2Float(0x3a214797), SkBits2Float(0x28aa217a), SkBits2Float(0x01007272), SkBits2Float(0x00000072)); // -9.7965e-25f, 0.000615233f, 1.88883e-14f, 2.3592e-38f, 1.59748e-43f
+path.quadTo(SkBits2Float(0x72728302), SkBits2Float(0x8b727272), SkBits2Float(0x72727272), SkBits2Float(0xc00308f6)); // 4.80344e+30f, -4.66936e-32f, 4.80216e+30f, -2.04742f
+path.conicTo(SkBits2Float(0x7f52753a), SkBits2Float(0x8072ffff), SkBits2Float(0x67af2103), SkBits2Float(0x7d2a6847), SkBits2Float(0x7d7d7d7d)); // 2.79747e+38f, -1.05611e-38f, 1.65405e+24f, 1.41569e+37f, 2.10591e+37f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
+}
+
+static void fuzz763_45(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.cubicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a303030), SkBits2Float(0x7a303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 2.28705e+35f, 2.28705e+35f, 6.40969e-10f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x74303030), SkBits2Float(0x74303030), SkBits2Float(0x30303030), SkBits2Float(0x74303030)); // 6.40969e-10f, 5.58363e+31f, 5.58363e+31f, 6.40969e-10f, 5.58363e+31f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f
+path.moveTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.moveTo(SkBits2Float(0x77773030), SkBits2Float(0x30303030)); // 5.01357e+33f, 6.40969e-10f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a743030), SkBits2Float(0x74303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 3.16974e+35f, 5.58363e+31f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x77773030), SkBits2Float(0x30303030)); // 5.01357e+33f, 6.40969e-10f
+path.close();
+path.moveTo(SkBits2Float(0x77773030), SkBits2Float(0x30303030)); // 5.01357e+33f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x7f303030), SkBits2Float(0x7a303030)); // 2.34194e+38f, 2.28705e+35f
+path.conicTo(SkBits2Float(0x77303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0xf9303030), SkBits2Float(0x7a303030)); // 3.57352e+33f, 6.40969e-10f, 6.40969e-10f, -5.71764e+34f, 2.28705e+35f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f
+path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f
+path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 2.28705e+35f, 6.40969e-10f
+path.cubicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 2.28705e+35f, 6.40969e-10f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 6.40969e-10f
+path.moveTo(SkBits2Float(0x77303030), SkBits2Float(0xff303030)); // 3.57352e+33f, -2.34194e+38f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7f773030), SkBits2Float(0x7a7a3030), SkBits2Float(0x7a303030)); // 6.40969e-10f, 6.40969e-10f, 3.2857e+38f, 3.24763e+35f, 2.28705e+35f
+path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x77303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 3.57352e+33f, 6.40969e-10f
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7b303030), SkBits2Float(0x73303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f, 9.14822e+35f, 1.39591e+31f, 6.40969e-10f
+path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x30303030), SkBits2Float(0x7a7a3030)); // 6.40969e-10f, 6.40969e-10f, 6.40969e-10f, 3.24763e+35f
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
+}
+
+static void fuzz763_46(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.conicTo(SkBits2Float(0x44444444), SkBits2Float(0x44444444), SkBits2Float(0x44263030), SkBits2Float(0x44304430), SkBits2Float(0x4c444430)); // 785.067f, 785.067f, 664.753f, 705.065f, 5.145e+07f
+path.moveTo(SkBits2Float(0x44444444), SkBits2Float(0x44444444)); // 785.067f, 785.067f
+path.cubicTo(SkBits2Float(0x30303030), SkBits2Float(0x44444444), SkBits2Float(0x30303030), SkBits2Float(0x44444444), SkBits2Float(0x44444444), SkBits2Float(0x4444444c)); // 6.40969e-10f, 785.067f, 6.40969e-10f, 785.067f, 785.067f, 785.067f
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
+}
+
+static void fuzz763_47(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.cubicTo(SkBits2Float(0x7272728e), SkBits2Float(0x52527272), SkBits2Float(0x2d555252), SkBits2Float(0x68556829), SkBits2Float(0x555b2d29), SkBits2Float(0x2a212a8c)); // 4.80217e+30f, 2.25966e+11f, 1.21259e-11f, 4.03114e+24f, 1.50617e+13f, 1.43144e-13f
+path.conicTo(SkBits2Float(0x00296808), SkBits2Float(0x00000002), SkBits2Float(0x52525252), SkBits2Float(0x72007272), SkBits2Float(0x52527272)); // 3.80257e-39f, 2.8026e-45f, 2.25831e+11f, 2.54416e+30f, 2.25966e+11f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x2a212a8c), SkBits2Float(0x7272081f)); // 1.43144e-13f, 4.79393e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x5974fa80), SkBits2Float(0x00747474), SkBits2Float(0x59585264)); // 4.80216e+30f, 4.30971e+15f, 1.06947e-38f, 3.80557e+15f
+path.cubicTo(SkBits2Float(0x64007474), SkBits2Float(0x088c5852), SkBits2Float(0x80808021), SkBits2Float(0x8c808080), SkBits2Float(0x80802108), SkBits2Float(0x80808080)); // 9.4783e+21f, 8.44671e-34f, -1.18009e-38f, -1.97989e-31f, -1.17668e-38f, -1.1801e-38f
+path.quadTo(SkBits2Float(0x80807d80), SkBits2Float(0x80808080), SkBits2Float(0xff7f0000), SkBits2Float(0x80808080)); // -1.18e-38f, -1.1801e-38f, -3.38953e+38f, -1.1801e-38f
+path.quadTo(SkBits2Float(0x80808080), SkBits2Float(0x80808080), SkBits2Float(0xed842b00), SkBits2Float(0x7252ff6d)); // -1.1801e-38f, -1.1801e-38f, -5.113e+27f, 4.17924e+30f
+path.quadTo(SkBits2Float(0x72577200), SkBits2Float(0x55525352), SkBits2Float(0x2a212a8c), SkBits2Float(0x7272081f)); // 4.26733e+30f, 1.44535e+13f, 1.43144e-13f, 4.79393e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x6f740080), SkBits2Float(0x8c556874), SkBits2Float(0x2982ffff)); // 4.80216e+30f, 7.55149e+28f, -1.64404e-31f, 5.81757e-14f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz763_48(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0xed0081bc), SkBits2Float(0x1b2d8040)); // -2.48568e+27f, 1.43517e-22f
+path.moveTo(SkBits2Float(0x74747403), SkBits2Float(0x29747474)); // 7.74703e+31f, 5.42799e-14f
+path.close();
+path.moveTo(SkBits2Float(0x74747403), SkBits2Float(0x29747474)); // 7.74703e+31f, 5.42799e-14f
+path.conicTo(SkBits2Float(0x662d5576), SkBits2Float(0x2d804066), SkBits2Float(0x8068291b), SkBits2Float(0x740315ff), SkBits2Float(0x74747474)); // 2.04636e+23f, 1.45805e-11f, -9.56564e-39f, 4.15428e+31f, 7.74708e+31f
+path.cubicTo(SkBits2Float(0x762d0529), SkBits2Float(0x72525252), SkBits2Float(0x007b7272), SkBits2Float(0x525adada), SkBits2Float(0x52525252), SkBits2Float(0x52727252)); // 8.77316e+32f, 4.16585e+30f, 1.13368e-38f, 2.34994e+11f, 2.25831e+11f, 2.60325e+11f
+path.lineTo(SkBits2Float(0x74747403), SkBits2Float(0x29747474)); // 7.74703e+31f, 5.42799e-14f
+path.close();
+path.moveTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f
+path.close();
+path.moveTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f
+path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52524872), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.2579e+11f, 4.16585e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0x80406666), SkBits2Float(0x68291b2d), SkBits2Float(0x0315ff80)); // 4.80215e+30f, -5.91421e-39f, 3.19432e+24f, 4.40805e-37f
+path.cubicTo(SkBits2Float(0x74747474), SkBits2Float(0x7b722974), SkBits2Float(0x5adada00), SkBits2Float(0x52525252), SkBits2Float(0x72720052), SkBits2Float(0x72727272)); // 7.74708e+31f, 1.25738e+36f, 3.08006e+16f, 2.25831e+11f, 4.79333e+30f, 4.80216e+30f
+path.lineTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f
+path.close();
+path.moveTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f
+path.quadTo(SkBits2Float(0x72727227), SkBits2Float(0x72727272), SkBits2Float(0x74727272), SkBits2Float(0x55747421)); // 4.80214e+30f, 4.80216e+30f, 7.68345e+31f, 1.67987e+13f
+path.lineTo(SkBits2Float(0xa5252620), SkBits2Float(0x52b4adad)); // -1.43244e-16f, 3.88004e+11f
+path.close();
+path.moveTo(SkBits2Float(0x724b0000), SkBits2Float(0x00725f72)); // 4.02083e+30f, 1.05035e-38f
+path.lineTo(SkBits2Float(0x52525252), SkBits2Float(0x72725252)); // 2.25831e+11f, 4.79967e+30f
+path.quadTo(SkBits2Float(0x26727272), SkBits2Float(0x0303a525), SkBits2Float(0x52005c03), SkBits2Float(0x72525252)); // 8.41157e-16f, 3.8687e-37f, 1.37825e+11f, 4.16585e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x1ff07255), SkBits2Float(0x2a8c5572), SkBits2Float(0x21082a21)); // 4.80216e+30f, 1.01833e-19f, 2.49283e-13f, 4.61343e-19f
+path.lineTo(SkBits2Float(0x2a2a3a21), SkBits2Float(0x29212828)); // 1.51192e-13f, 3.5784e-14f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+static void fuzz763_49(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x30303030), SkBits2Float(0x78303030), SkBits2Float(0x78787881), SkBits2Float(0x78787878), SkBits2Float(0x30303030)); // 6.40969e-10f, 1.42941e+34f, 2.01583e+34f, 2.01583e+34f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34f, 2.01583e+34f
+path.quadTo(SkBits2Float(0x30303030), SkBits2Float(0x78787878), SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 6.40969e-10f, 2.01583e+34f, 2.01583e+34f, 2.01583e+34f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10f, 6.40969e-10f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x7878788d)); // 2.01583e+34f, 2.01584e+34f
+path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x30303030)); // 2.01583e+34f, 6.40969e-10f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
+}
+
+static void fuzz763_50(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x70621ede), SkBits2Float(0x00000000)); // 2.79924e+29f, 0
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x74fc5b97), SkBits2Float(0x7d458fe4)); // 0, 0, 0, 1.59951e+32f, 1.64128e+37f
+path.lineTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+29f, 0
+path.lineTo(SkBits2Float(0x70621ede), SkBits2Float(0x00000000)); // 2.79924e+29f, 0
+path.close();
+path.moveTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+29f, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+29f, 0
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
+}
+
+static void fuzz763_51(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x868b5aae), SkBits2Float(0x626c45ab), SkBits2Float(0xefea1ffe), SkBits2Float(0x0029fc76)); // -5.24192e-35f, 1.08961e+21f, -1.44916e+29f, 3.85582e-39f
+path.moveTo(SkBits2Float(0xfacbff01), SkBits2Float(0x56fc5b97)); // -5.29604e+35f, 1.38735e+14f
+path.cubicTo(SkBits2Float(0x7d4559c9), SkBits2Float(0xad801c39), SkBits2Float(0xfbe2091a), SkBits2Float(0x7268e394), SkBits2Float(0x7c800079), SkBits2Float(0xa1d75590)); // 1.63953e+37f, -1.45644e-11f, -2.34729e+36f, 4.61284e+30f, 5.31699e+36f, -1.45916e-18f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz763_52(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x29ff4bae), SkBits2Float(0xa1d75590), SkBits2Float(0x9fd6f6c3), SkBits2Float(0x70621ede)); // 1.13374e-13f, -1.45916e-18f, -9.10408e-20f, 2.79924e+29f
+path.quadTo(SkBits2Float(0x57a839d3), SkBits2Float(0x1a80d34b), SkBits2Float(0x0147a31b), SkBits2Float(0xff7fffff)); // 3.69933e+14f, 5.32809e-23f, 3.66675e-38f, -3.40282e+38f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f
+path.conicTo(SkBits2Float(0x75757568), SkBits2Float(0x7575755e), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75756575)); // 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11077e+32f
+path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f
+path.close();
+path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f
+path.conicTo(SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x75917575), SkBits2Float(0x75757575)); // 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.68782e+32f, 3.11156e+32f
+path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f
+path.close();
+path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f
+path.conicTo(SkBits2Float(0x75757575), SkBits2Float(0x7575758f), SkBits2Float(0x7f757575), SkBits2Float(0x75757575), SkBits2Float(0x75757575)); // 3.11156e+32f, 3.11157e+32f, 3.26271e+38f, 3.11156e+32f, 3.11156e+32f
+path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23f, -2.54344e-26f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
+static void fuzz763_53(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.moveTo(SkBits2Float(0x7644b829), SkBits2Float(0x00000000)); // 9.97486e+32f, 0
+path.lineTo(SkBits2Float(0x74fc5b97), SkBits2Float(0x77df944a)); // 1.59951e+32f, 9.06945e+33f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xf8fbe3ff)); // 0, -4.08716e+34f
+path.lineTo(SkBits2Float(0x7644b829), SkBits2Float(0x00000000)); // 9.97486e+32f, 0
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x45ab86ae), SkBits2Float(0xd6d6626c), SkBits2Float(0xd6d6d6d6), SkBits2Float(0x7644d6d6)); // 5488.83f, -1.17859e+14f, -1.18109e+14f, 9.98093e+32f
+path.moveTo(SkBits2Float(0xd6d6d6d6), SkBits2Float(0xd6d6d6d6)); // -1.18109e+14f, -1.18109e+14f
+path.cubicTo(SkBits2Float(0xd6d6d6d6), SkBits2Float(0x64fed6d6), SkBits2Float(0x7644ef40), SkBits2Float(0x290877fc), SkBits2Float(0x447644b8), SkBits2Float(0x80fafc76)); // -1.18109e+14f, 3.76076e+22f, 9.98577e+32f, 3.03021e-14f, 985.074f, -2.30494e-38f
+path.conicTo(SkBits2Float(0x87808080), SkBits2Float(0x764400ae), SkBits2Float(0x764400fc), SkBits2Float(0x450080fc), SkBits2Float(0x3636366c)); // -1.93348e-34f, 9.93852e+32f, 9.93858e+32f, 2056.06f, 2.71518e-06f
+path.lineTo(SkBits2Float(0xd6d6d6d6), SkBits2Float(0xd6d6d6d6)); // -1.18109e+14f, -1.18109e+14f
+path.close();
+path.moveTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+28f, 2.46288e+16f
+path.conicTo(SkBits2Float(0x7644626c), SkBits2Float(0x088912fc), SkBits2Float(0xae8744ef), SkBits2Float(0x76571f5a), SkBits2Float(0x45ab86fc)); // 9.95788e+32f, 8.24985e-34f, -6.15133e-11f, 1.0908e+33f, 5488.87f
+path.conicTo(SkBits2Float(0x4064fe62), SkBits2Float(0x290877ef), SkBits2Float(0x780080b8), SkBits2Float(0x553c7644), SkBits2Float(0x644eae87)); // 3.57803f, 3.03021e-14f, 1.04254e+34f, 1.2951e+13f, 1.52504e+22f
+path.lineTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+28f, 2.46288e+16f
+path.close();
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+// hangs 654939
+static void fuzz763_54(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0xb3b32d11), SkBits2Float(0xb3b3b3b3), SkBits2Float(0x5b29b3b3), SkBits2Float(0x212a8c55)); // 6.53477e+16f, -8.34353e-08f, -8.36802e-08f, 4.77669e+16f, 5.7784e-19f
+path.conicTo(SkBits2Float(0x68555b2d), SkBits2Float(0x28296869), SkBits2Float(0x5b252a08), SkBits2Float(0x5d68392a), SkBits2Float(0x29282780)); // 4.03018e+24f, 9.40402e-15f, 4.64896e+16f, 1.04584e+18f, 3.73378e-14f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.cubicTo(SkBits2Float(0x52727272), SkBits2Float(0x72727252), SkBits2Float(0x525252c7), SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255)); // 2.60326e+11f, 4.80215e+30f, 2.25833e+11f, 4.79967e+30f, 4.80216e+30f, 4.80215e+30f
+path.quadTo(SkBits2Float(0xd7da0000), SkBits2Float(0x5252525a), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // -4.79387e+14f, 2.25831e+11f, 4.16585e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x48525252), SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255)); // 215369, 4.79967e+30f, 4.80216e+30f, 4.80215e+30f
+path.quadTo(SkBits2Float(0xdada007b), SkBits2Float(0x5252525a), SkBits2Float(0x72675252), SkBits2Float(0x72727272)); // -3.0681e+16f, 2.25831e+11f, 4.5818e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x52525252), SkBits2Float(0x27725252), SkBits2Float(0x72727272), SkBits2Float(0x72727272)); // 2.25831e+11f, 3.36289e-15f, 4.80216e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x1c292172), SkBits2Float(0x7bc00321), SkBits2Float(0x9aaaaaaa), SkBits2Float(0x8c556a4b)); // 5.59606e-22f, 1.99397e+36f, -7.05861e-23f, -1.64409e-31f
+path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11f, 2.25831e+11f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.quadTo(SkBits2Float(0x72725570), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.79991e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0x555bb672), SkBits2Float(0x29686968), SkBits2Float(0x252a081f)); // 4.80215e+30f, 1.50985e+13f, 5.16058e-14f, 1.47479e-16f
+path.moveTo(SkBits2Float(0x5d68392a), SkBits2Float(0x01002780)); // 1.04584e+18f, 2.35382e-38f
+path.moveTo(SkBits2Float(0x72727200), SkBits2Float(0x72725252)); // 4.80212e+30f, 4.79967e+30f
+path.quadTo(SkBits2Float(0x5adada00), SkBits2Float(0xa5252652), SkBits2Float(0x727272ad), SkBits2Float(0xda007b72)); // 3.08006e+16f, -1.43245e-16f, 4.80218e+30f, -9.04113e+15f
+path.lineTo(SkBits2Float(0x5252525a), SkBits2Float(0x72525252)); // 2.25831e+11f, 4.16585e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x27725252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25831e+11f, 3.36289e-15f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x74217472), SkBits2Float(0x005b5574), SkBits2Float(0x72680000)); // 4.80216e+30f, 5.11671e+31f, 8.38768e-39f, 4.59523e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x007b7272), SkBits2Float(0x525adada)); // 4.80216e+30f, 2.25831e+11f, 1.13368e-38f, 2.34994e+11f
+path.lineTo(SkBits2Float(0x72727200), SkBits2Float(0x72725252)); // 4.80212e+30f, 4.79967e+30f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename);
+}
+
+
+// afl crash
+static void fuzz763_55(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e+13f
+path.lineTo(SkBits2Float(0x55555568), SkBits2Float(0x55555555)); // 1.46602e+13f, 1.46602e+13f
+path.lineTo(SkBits2Float(0x98989898), SkBits2Float(0x55989898)); // -3.94452e-24f, 2.09726e+13f
+path.lineTo(SkBits2Float(0xf6f65555), SkBits2Float(0x101006f6)); // -2.49812e+33f, 2.84044e-29f
+path.quadTo(SkBits2Float(0xdca33f10), SkBits2Float(0xf6f6f6f6), SkBits2Float(0xf621f6f6), SkBits2Float(0xf70ff6f6)); // -3.67598e+17f, -2.50452e+33f, -8.21259e+32f, -2.91995e+33f
+path.lineTo(SkBits2Float(0x9400f6f6), SkBits2Float(0x10530000)); // -6.51105e-27f, 4.16124e-29f
+path.quadTo(SkBits2Float(0x0f101010), SkBits2Float(0x00101010), SkBits2Float(0xf610f720), SkBits2Float(0xf6f6f6f6)); // 7.10284e-30f, 1.47513e-39f, -7.35062e+32f, -2.50452e+33f
+path.lineTo(SkBits2Float(0x105352f6), SkBits2Float(0x1cf6ff10)); // 4.16763e-29f, 1.63448e-21f
+path.lineTo(SkBits2Float(0xf6f6220a), SkBits2Float(0x003700f6)); // -2.49608e+33f, 5.0513e-39f
+path.cubicTo(SkBits2Float(0x0000001e), SkBits2Float(0x00fff4f6), SkBits2Float(0xff101064), SkBits2Float(0xf6b6ac7f), SkBits2Float(0xf6f629f6), SkBits2Float(0x10f6f6f6)); // 4.2039e-44f, 2.35059e-38f, -1.91494e+38f, -1.85253e+33f, -2.4964e+33f, 9.74104e-29f
+path.quadTo(SkBits2Float(0x10101007), SkBits2Float(0x10f7fd10), SkBits2Float(0xf6f6f6f6), SkBits2Float(0xf6f645e0)); // 2.84113e-29f, 9.78142e-29f, -2.50452e+33f, -2.4975e+33f
+path.lineTo(SkBits2Float(0xed9ef6f6), SkBits2Float(0x53535353)); // -6.14965e+27f, 9.07636e+11f
+path.lineTo(SkBits2Float(0x53006cf6), SkBits2Float(0x53295353)); // 5.51584e+11f, 7.27247e+11f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e+13f
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e+13f
+path.lineTo(SkBits2Float(0xf6f6f6f6), SkBits2Float(0x5353d9f6)); // -2.50452e+33f, 9.09895e+11f
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
+}
+
+// 656149
+static void fuzz763_56(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0xb3b32d11), SkBits2Float(0xb3b3b3b3), SkBits2Float(0x5b29b3b3), SkBits2Float(0x72725255)); // 6.53477e+16f, -8.34353e-08f, -8.36802e-08f, 4.77669e+16f, 4.79967e+30f
+path.quadTo(SkBits2Float(0x525252c7), SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255)); // 2.25833e+11f, 4.79967e+30f, 4.80216e+30f, 4.80215e+30f
+path.quadTo(SkBits2Float(0xd7da0000), SkBits2Float(0x5adada00), SkBits2Float(0x52525252), SkBits2Float(0x00005252)); // -4.79387e+14f, 3.08006e+16f, 2.25831e+11f, 2.9531e-41f
+path.conicTo(SkBits2Float(0xadada525), SkBits2Float(0x52525ab4), SkBits2Float(0x52525252), SkBits2Float(0x72727272), SkBits2Float(0x52527272)); // -1.97412e-11f, 2.25866e+11f, 2.25831e+11f, 4.80216e+30f, 2.25966e+11f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72727255), SkBits2Float(0xda007b72)); // 4.79967e+30f, 4.80216e+30f, 4.80215e+30f, -9.04113e+15f
+path.lineTo(SkBits2Float(0x5252525a), SkBits2Float(0x72525252)); // 2.25831e+11f, 4.16585e+30f
+path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x27725252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25831e+11f, 3.36289e-15f, 4.80216e+30f
+path.lineTo(SkBits2Float(0x7bc00321), SkBits2Float(0x9aaaaaaa)); // 1.99397e+36f, -7.05861e-23f
+path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x525adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11f, 2.25831e+11f
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.close();
+path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-16f, 3.88004e+11f
+path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52525272), SkBits2Float(0x72525252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16585e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x26525ada), SkBits2Float(0x72ada525)); // 4.80215e+30f, -9.04113e+15f, 7.29815e-16f, 6.87879e+30f
+path.quadTo(SkBits2Float(0x007b7272), SkBits2Float(0x525adada), SkBits2Float(0x52525252), SkBits2Float(0x72727252)); // 1.13368e-38f, 2.34994e+11f, 2.25831e+11f, 4.80215e+30f
+path.quadTo(SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x72722772), SkBits2Float(0x72727272)); // 2.25966e+11f, 2.25831e+11f, 4.79636e+30f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x74727272), SkBits2Float(0x55747421), SkBits2Float(0x0000005b), SkBits2Float(0x72727268)); // 7.68345e+31f, 1.67987e+13f, 1.27518e-43f, 4.80216e+30f
+path.quadTo(SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x72727272), SkBits2Float(0x72557272)); // 2.25966e+11f, 2.25831e+11f, 4.80216e+30f, 4.22775e+30f
+path.quadTo(SkBits2Float(0x5adada72), SkBits2Float(0x52525252), SkBits2Float(0x72725252), SkBits2Float(0x72727272)); // 3.08009e+16f, 2.25831e+11f, 4.79967e+30f, 4.80216e+30f
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
+static void fuzz763_57(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x68546829), SkBits2Float(0x555b2d29)); // 4.01225e+24f, 1.50617e+13f
+path.moveTo(SkBits2Float(0x1f2a322a), SkBits2Float(0x4b7b2108)); // 3.60404e-20f, 1.6458e+07f
+path.lineTo(SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 9.43289e-15f, 4.8745e+16f
+path.moveTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24f, -2.87586e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2a8cef2a), SkBits2Float(0x682d2953), SkBits2Float(0xce682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f, 2.50349e-13f, 3.27093e+24f, -9.73619e+08f, 1.64988e+07f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x3b2a8c55)); // 4.85282e+16f, 0.00260236f
+path.lineTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24f, -2.87586e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24f, -2.87586e+29f
+path.conicTo(SkBits2Float(0xd2c00321), SkBits2Float(0xc0394b7b), SkBits2Float(0x8c08ed7a), SkBits2Float(0x211f2f2a), SkBits2Float(0x704b7b03)); // -4.12343e+11f, -2.89523f, -1.05485e-31f, 5.39337e-19f, 2.51897e+29f
+path.cubicTo(SkBits2Float(0x2d6829ed), SkBits2Float(0x5b2d555b), SkBits2Float(0x68275b2d), SkBits2Float(0x21685527), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7bc0)); // 1.3197e-11f, 4.8789e+16f, 3.16127e+24f, 7.87174e-19f, 4.7323e-37f, 6.14991e+25f
+path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 5.77848e-19f, 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 4.8745e+16f
+path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f
+path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x228cef2a), SkBits2Float(0x682d2953), SkBits2Float(0xee682103), SkBits2Float(0x287bc055)); // 5.76397e-19f, 3.82003e-18f, 3.27093e+24f, -1.79601e+28f, 1.3975e-14f
+path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16f, 5.7784e-19f
+path.conicTo(SkBits2Float(0x4b03213b), SkBits2Float(0xc07b2a08), SkBits2Float(0x5b2d7a6a), SkBits2Float(0xf0556830), SkBits2Float(0x2a8c555b)); // 8.59372e+06f, -3.92444f, 4.88298e+16f, -2.64185e+29f, 2.49282e-13f
+path.conicTo(SkBits2Float(0x0321212a), SkBits2Float(0x4b7bd2c0), SkBits2Float(0xed7ac039), SkBits2Float(0x2f2a8c08), SkBits2Float(0x7b03211f)); // 4.73517e-37f, 1.65035e+07f, -4.85023e+27f, 1.55112e-10f, 6.80863e+35f
+path.lineTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f
+path.close();
+path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24f, -2.87489e+29f
+path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24f, 1.21279e-11f
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.conicTo(SkBits2Float(0x721f2a5b), SkBits2Float(0x212a8c55), SkBits2Float(0x0321082a), SkBits2Float(0x6a4b7b28), SkBits2Float(0x4797ed7a)); // 3.1526e+30f, 5.7784e-19f, 4.7323e-37f, 6.14984e+25f, 77787
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.quadTo(SkBits2Float(0x2828102a), SkBits2Float(0x2c682921), SkBits2Float(0x8c555bf6), SkBits2Float(0x6d03de30)); // 9.32938e-15f, 3.2992e-12f, -1.64366e-31f, 2.5507e+27f
+path.cubicTo(SkBits2Float(0x683f2d55), SkBits2Float(0xf05b684b), SkBits2Float(0x8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x211f2a21)); // 3.61123e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e-37f, 5.39271e-19f
+path.lineTo(SkBits2Float(0x3a803adf), SkBits2Float(0x8a294f1a)); // 0.000978317f, -8.15193e-33f
+path.quadTo(SkBits2Float(0x291d9628), SkBits2Float(0x2a43e62b), SkBits2Float(0x093a2a81), SkBits2Float(0x5c5c8ced)); // 3.49912e-14f, 1.73993e-13f, 2.24089e-33f, 2.48318e+17f
+path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.close();
+path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24f, -2.87614e+29f
+path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x291d9628), SkBits2Float(0x2a43e62b), SkBits2Float(0x293a2a81), SkBits2Float(0x5c5c8ced), SkBits2Float(0x5c5c6e5c)); // 0.00148109f, 3.49912e-14f, 1.73993e-13f, 4.13372e-14f, 2.48318e+17f, 2.48183e+17f
+path.lineTo(SkBits2Float(0x1f212a8c), SkBits2Float(0xc0032108)); // 3.41283e-20f, -2.04889f
+path.lineTo(SkBits2Float(0xed847b4b), SkBits2Float(0x2d552829)); // -5.12513e+27f, 1.21166e-11f
+path.conicTo(SkBits2Float(0x552d5b5b), SkBits2Float(0x3b5a6839), SkBits2Float(0x5b2df068), SkBits2Float(0x2a212a1f), SkBits2Float(0x532a8cef)); // 1.1913e+13f, 0.00333263f, 4.89595e+16f, 1.43143e-13f, 7.32509e+11f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
+}
+
static void fuzzhang_1(skiatest::Reporter* reporter, const char* filename) {
SkPath path;
path.setFillType((SkPath::FillType) 1);
@@ -8392,83 +8392,83 @@ path.quadTo(SkBits2Float(0xf8f8c0ed), SkBits2Float(0xf8f8f8f8), SkBits2Float(0x9 SkPath path2(path);
testPathOp(reporter, path1, path2, (SkPathOp) 0, filename);
}
- -static void release_13(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 1); -path.setFillType(SkPath::kEvenOdd_FillType); -path.moveTo(SkBits2Float(0xd4438848), SkBits2Float(0xd488cf64)); // -3.35922e+12f, -4.70076e+12f -path.lineTo(SkBits2Float(0xd43a056e), SkBits2Float(0xd4851696)); // -3.19582e+12f, -4.57288e+12f -path.quadTo(SkBits2Float(0xd3d48e79), SkBits2Float(0xd49fb136), SkBits2Float(0x00000000), SkBits2Float(0xd4d4d4d4)); // -1.82585e+12f, -5.48698e+12f, 0, -7.31283e+12f -path.quadTo(SkBits2Float(0xd3d06670), SkBits2Float(0xd4a0bb38), SkBits2Float(0xd41d628f), SkBits2Float(0xd472c531)); // -1.79014e+12f, -5.52269e+12f, -2.70385e+12f, -4.17076e+12f -path.lineTo(SkBits2Float(0xd43a0559), SkBits2Float(0xd485168e)); // -3.19581e+12f, -4.57287e+12f -path.lineTo(SkBits2Float(0xd446958b), SkBits2Float(0xd4810278)); // -3.41165e+12f, -4.43274e+12f -path.lineTo(SkBits2Float(0xd443884a), SkBits2Float(0xd488cf65)); // -3.35922e+12f, -4.70076e+12f -path.quadTo(SkBits2Float(0xd47efa09), SkBits2Float(0xd49fd72a), SkBits2Float(0xd4a63f0f), SkBits2Float(0xd4b83ab3)); // -4.38047e+12f, -5.49208e+12f, -5.71218e+12f, -6.33007e+12f -path.lineTo(SkBits2Float(0xd497ca70), SkBits2Float(0xd4c4d4ae)); // -5.21549e+12f, -6.76305e+12f -path.lineTo(SkBits2Float(0xd459d4d4), SkBits2Float(0xd4c4d4d4)); // -3.74231e+12f, -6.76307e+12f -path.lineTo(SkBits2Float(0xd440daf9), SkBits2Float(0xd4c632d3)); // -3.31323e+12f, -6.81005e+12f -path.lineTo(SkBits2Float(0xd4438848), SkBits2Float(0xd488cf64)); // -3.35922e+12f, -4.70076e+12f -path.close(); -path.moveTo(SkBits2Float(0xd4767560), SkBits2Float(0xd4d1ca84)); // -4.23412e+12f, -7.20837e+12f -path.lineTo(SkBits2Float(0xd4422174), SkBits2Float(0xd4d02069)); // -3.33514e+12f, -7.15118e+12f -path.lineTo(SkBits2Float(0xd440daa3), SkBits2Float(0xd4c632d9)); // -3.31321e+12f, -6.81005e+12f -path.lineTo(SkBits2Float(0xd41017bc), SkBits2Float(0xd4cb99b6)); // -2.47549e+12f, -6.99566e+12f -path.lineTo(SkBits2Float(0xd442213b), SkBits2Float(0xd4d02067)); // -3.33512e+12f, -7.15117e+12f -path.lineTo(SkBits2Float(0xd442d4d4), SkBits2Float(0xd4d4d4d4)); // -3.34718e+12f, -7.31283e+12f -path.lineTo(SkBits2Float(0xd4767560), SkBits2Float(0xd4d1ca84)); // -4.23412e+12f, -7.20837e+12f -path.close(); -path.moveTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f -path.lineTo(SkBits2Float(0xd484e02c), SkBits2Float(0xd45fafcd)); // -4.56557e+12f, -3.84291e+12f -path.lineTo(SkBits2Float(0xd462c867), SkBits2Float(0xd45655f7)); // -3.8961e+12f, -3.68226e+12f -path.lineTo(SkBits2Float(0xd45ac463), SkBits2Float(0xd45ac505)); // -3.75839e+12f, -3.75843e+12f -path.lineTo(SkBits2Float(0xd43d2fa9), SkBits2Float(0xd43d2fb5)); // -3.25019e+12f, -3.2502e+12f -path.lineTo(SkBits2Float(0xd41d6287), SkBits2Float(0xd472c52a)); // -2.70385e+12f, -4.17076e+12f -path.quadTo(SkBits2Float(0x00000000), SkBits2Float(0xd3db1b95), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, -1.88212e+12f, 0, 0 -path.quadTo(SkBits2Float(0xd4b7efac), SkBits2Float(0x00000000), SkBits2Float(0xd4d0e88f), SkBits2Float(0xd40b8b46)); // -6.32e+12f, 0, -7.17804e+12f, -2.39735e+12f -path.lineTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0x00000000)); // -7.31283e+12f, 0 -path.lineTo(SkBits2Float(0xdcdc154b), SkBits2Float(0x00000000)); // -4.95583e+17f, 0 -path.lineTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4c4d477)); // -7.31283e+12f, -6.76303e+12f -path.lineTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d442)); // -7.31283e+12f, -7.31275e+12f -path.lineTo(SkBits2Float(0xd4d4a691), SkBits2Float(0xd4d4d442)); // -7.30662e+12f, -7.31275e+12f -path.lineTo(SkBits2Float(0xd454d4d4), SkBits2Float(0xd4d4aa30)); // -3.65641e+12f, -7.30711e+12f -path.lineTo(SkBits2Float(0xd4bd9def), SkBits2Float(0xd4d43df0)); // -6.51519e+12f, -7.29258e+12f -path.lineTo(SkBits2Float(0xd4767560), SkBits2Float(0xd4d1ca84)); // -4.23412e+12f, -7.20837e+12f -path.lineTo(SkBits2Float(0xd497ca70), SkBits2Float(0xd4c4d4ae)); // -5.21549e+12f, -6.76305e+12f -path.lineTo(SkBits2Float(0xd4bab953), SkBits2Float(0xd4c4d48e)); // -6.41579e+12f, -6.76304e+12f -path.lineTo(SkBits2Float(0xd4a63f0f), SkBits2Float(0xd4b83ab3)); // -5.71218e+12f, -6.33007e+12f -path.lineTo(SkBits2Float(0xd4ae61eb), SkBits2Float(0xd4ae61f4)); // -5.99174e+12f, -5.99174e+12f -path.lineTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f -path.close(); -path.moveTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f -path.lineTo(SkBits2Float(0xd446965c), SkBits2Float(0xd4810237)); // -3.4117e+12f, -4.4327e+12f -path.lineTo(SkBits2Float(0xd45ac549), SkBits2Float(0xd45ac55f)); // -3.75845e+12f, -3.75846e+12f -path.lineTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f -path.close(); -path.moveTo(SkBits2Float(0xd4b46028), SkBits2Float(0xd41e572a)); // -6.19766e+12f, -2.72027e+12f -path.lineTo(SkBits2Float(0xd4cde20a), SkBits2Float(0xd434bb57)); // -7.07408e+12f, -3.10495e+12f -path.lineTo(SkBits2Float(0xd4c75ffe), SkBits2Float(0xd46f215d)); // -6.85047e+12f, -4.10823e+12f -path.lineTo(SkBits2Float(0xd4b46028), SkBits2Float(0xd41e572a)); // -6.19766e+12f, -2.72027e+12f -path.close(); - - SkPath path1(path); - path.reset(); - path.setFillType((SkPath::FillType) 0); -path.setFillType(SkPath::kWinding_FillType); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.quadTo(SkBits2Float(0x00000000), SkBits2Float(0xa5a50000), SkBits2Float(0xd4d4a5a5), SkBits2Float(0xd4d4d4d4)); // 0, -2.86229e-16f, -7.3065e+12f, -7.31283e+12f -path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4cfd4d4), SkBits2Float(0xd4d41dd4)); // -7.31283e+12f, -7.31283e+12f, -7.14103e+12f, -7.28827e+12f -path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d432d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4a5a5d4)); // -7.31283e+12f, -7.29109e+12f, -7.31283e+12f, -5.69161e+12f -path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0x00000000)); // -7.31283e+12f, -7.31283e+12f, -7.31283e+12f, 0 -path.moveTo(SkBits2Float(0xa5a5a500), SkBits2Float(0xd4d4d4a5)); // -2.87347e-16f, -7.31281e+12f -path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0x2ad4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4cfd4d4)); // -7.31283e+12f, 3.78064e-13f, -7.31283e+12f, -7.14103e+12f -path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4)); // -7.31283e+12f, -7.31283e+12f, -7.31283e+12f, -7.31283e+12f -path.quadTo(SkBits2Float(0xd4d40000), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4)); // -7.28426e+12f, -7.31283e+12f, -7.31283e+12f, -7.31283e+12f - - SkPath path2(path); - testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); -} - +
+static void release_13(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 1);
+path.setFillType(SkPath::kEvenOdd_FillType);
+path.moveTo(SkBits2Float(0xd4438848), SkBits2Float(0xd488cf64)); // -3.35922e+12f, -4.70076e+12f
+path.lineTo(SkBits2Float(0xd43a056e), SkBits2Float(0xd4851696)); // -3.19582e+12f, -4.57288e+12f
+path.quadTo(SkBits2Float(0xd3d48e79), SkBits2Float(0xd49fb136), SkBits2Float(0x00000000), SkBits2Float(0xd4d4d4d4)); // -1.82585e+12f, -5.48698e+12f, 0, -7.31283e+12f
+path.quadTo(SkBits2Float(0xd3d06670), SkBits2Float(0xd4a0bb38), SkBits2Float(0xd41d628f), SkBits2Float(0xd472c531)); // -1.79014e+12f, -5.52269e+12f, -2.70385e+12f, -4.17076e+12f
+path.lineTo(SkBits2Float(0xd43a0559), SkBits2Float(0xd485168e)); // -3.19581e+12f, -4.57287e+12f
+path.lineTo(SkBits2Float(0xd446958b), SkBits2Float(0xd4810278)); // -3.41165e+12f, -4.43274e+12f
+path.lineTo(SkBits2Float(0xd443884a), SkBits2Float(0xd488cf65)); // -3.35922e+12f, -4.70076e+12f
+path.quadTo(SkBits2Float(0xd47efa09), SkBits2Float(0xd49fd72a), SkBits2Float(0xd4a63f0f), SkBits2Float(0xd4b83ab3)); // -4.38047e+12f, -5.49208e+12f, -5.71218e+12f, -6.33007e+12f
+path.lineTo(SkBits2Float(0xd497ca70), SkBits2Float(0xd4c4d4ae)); // -5.21549e+12f, -6.76305e+12f
+path.lineTo(SkBits2Float(0xd459d4d4), SkBits2Float(0xd4c4d4d4)); // -3.74231e+12f, -6.76307e+12f
+path.lineTo(SkBits2Float(0xd440daf9), SkBits2Float(0xd4c632d3)); // -3.31323e+12f, -6.81005e+12f
+path.lineTo(SkBits2Float(0xd4438848), SkBits2Float(0xd488cf64)); // -3.35922e+12f, -4.70076e+12f
+path.close();
+path.moveTo(SkBits2Float(0xd4767560), SkBits2Float(0xd4d1ca84)); // -4.23412e+12f, -7.20837e+12f
+path.lineTo(SkBits2Float(0xd4422174), SkBits2Float(0xd4d02069)); // -3.33514e+12f, -7.15118e+12f
+path.lineTo(SkBits2Float(0xd440daa3), SkBits2Float(0xd4c632d9)); // -3.31321e+12f, -6.81005e+12f
+path.lineTo(SkBits2Float(0xd41017bc), SkBits2Float(0xd4cb99b6)); // -2.47549e+12f, -6.99566e+12f
+path.lineTo(SkBits2Float(0xd442213b), SkBits2Float(0xd4d02067)); // -3.33512e+12f, -7.15117e+12f
+path.lineTo(SkBits2Float(0xd442d4d4), SkBits2Float(0xd4d4d4d4)); // -3.34718e+12f, -7.31283e+12f
+path.lineTo(SkBits2Float(0xd4767560), SkBits2Float(0xd4d1ca84)); // -4.23412e+12f, -7.20837e+12f
+path.close();
+path.moveTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f
+path.lineTo(SkBits2Float(0xd484e02c), SkBits2Float(0xd45fafcd)); // -4.56557e+12f, -3.84291e+12f
+path.lineTo(SkBits2Float(0xd462c867), SkBits2Float(0xd45655f7)); // -3.8961e+12f, -3.68226e+12f
+path.lineTo(SkBits2Float(0xd45ac463), SkBits2Float(0xd45ac505)); // -3.75839e+12f, -3.75843e+12f
+path.lineTo(SkBits2Float(0xd43d2fa9), SkBits2Float(0xd43d2fb5)); // -3.25019e+12f, -3.2502e+12f
+path.lineTo(SkBits2Float(0xd41d6287), SkBits2Float(0xd472c52a)); // -2.70385e+12f, -4.17076e+12f
+path.quadTo(SkBits2Float(0x00000000), SkBits2Float(0xd3db1b95), SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, -1.88212e+12f, 0, 0
+path.quadTo(SkBits2Float(0xd4b7efac), SkBits2Float(0x00000000), SkBits2Float(0xd4d0e88f), SkBits2Float(0xd40b8b46)); // -6.32e+12f, 0, -7.17804e+12f, -2.39735e+12f
+path.lineTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0x00000000)); // -7.31283e+12f, 0
+path.lineTo(SkBits2Float(0xdcdc154b), SkBits2Float(0x00000000)); // -4.95583e+17f, 0
+path.lineTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4c4d477)); // -7.31283e+12f, -6.76303e+12f
+path.lineTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d442)); // -7.31283e+12f, -7.31275e+12f
+path.lineTo(SkBits2Float(0xd4d4a691), SkBits2Float(0xd4d4d442)); // -7.30662e+12f, -7.31275e+12f
+path.lineTo(SkBits2Float(0xd454d4d4), SkBits2Float(0xd4d4aa30)); // -3.65641e+12f, -7.30711e+12f
+path.lineTo(SkBits2Float(0xd4bd9def), SkBits2Float(0xd4d43df0)); // -6.51519e+12f, -7.29258e+12f
+path.lineTo(SkBits2Float(0xd4767560), SkBits2Float(0xd4d1ca84)); // -4.23412e+12f, -7.20837e+12f
+path.lineTo(SkBits2Float(0xd497ca70), SkBits2Float(0xd4c4d4ae)); // -5.21549e+12f, -6.76305e+12f
+path.lineTo(SkBits2Float(0xd4bab953), SkBits2Float(0xd4c4d48e)); // -6.41579e+12f, -6.76304e+12f
+path.lineTo(SkBits2Float(0xd4a63f0f), SkBits2Float(0xd4b83ab3)); // -5.71218e+12f, -6.33007e+12f
+path.lineTo(SkBits2Float(0xd4ae61eb), SkBits2Float(0xd4ae61f4)); // -5.99174e+12f, -5.99174e+12f
+path.lineTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f
+path.close();
+path.moveTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f
+path.lineTo(SkBits2Float(0xd446965c), SkBits2Float(0xd4810237)); // -3.4117e+12f, -4.4327e+12f
+path.lineTo(SkBits2Float(0xd45ac549), SkBits2Float(0xd45ac55f)); // -3.75845e+12f, -3.75846e+12f
+path.lineTo(SkBits2Float(0xd46c7a11), SkBits2Float(0xd46c7a2e)); // -4.06264e+12f, -4.06265e+12f
+path.close();
+path.moveTo(SkBits2Float(0xd4b46028), SkBits2Float(0xd41e572a)); // -6.19766e+12f, -2.72027e+12f
+path.lineTo(SkBits2Float(0xd4cde20a), SkBits2Float(0xd434bb57)); // -7.07408e+12f, -3.10495e+12f
+path.lineTo(SkBits2Float(0xd4c75ffe), SkBits2Float(0xd46f215d)); // -6.85047e+12f, -4.10823e+12f
+path.lineTo(SkBits2Float(0xd4b46028), SkBits2Float(0xd41e572a)); // -6.19766e+12f, -2.72027e+12f
+path.close();
+
+ SkPath path1(path);
+ path.reset();
+ path.setFillType((SkPath::FillType) 0);
+path.setFillType(SkPath::kWinding_FillType);
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.quadTo(SkBits2Float(0x00000000), SkBits2Float(0xa5a50000), SkBits2Float(0xd4d4a5a5), SkBits2Float(0xd4d4d4d4)); // 0, -2.86229e-16f, -7.3065e+12f, -7.31283e+12f
+path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4cfd4d4), SkBits2Float(0xd4d41dd4)); // -7.31283e+12f, -7.31283e+12f, -7.14103e+12f, -7.28827e+12f
+path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d432d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4a5a5d4)); // -7.31283e+12f, -7.29109e+12f, -7.31283e+12f, -5.69161e+12f
+path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0x00000000)); // -7.31283e+12f, -7.31283e+12f, -7.31283e+12f, 0
+path.moveTo(SkBits2Float(0xa5a5a500), SkBits2Float(0xd4d4d4a5)); // -2.87347e-16f, -7.31281e+12f
+path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0x2ad4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4cfd4d4)); // -7.31283e+12f, 3.78064e-13f, -7.31283e+12f, -7.14103e+12f
+path.quadTo(SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4)); // -7.31283e+12f, -7.31283e+12f, -7.31283e+12f, -7.31283e+12f
+path.quadTo(SkBits2Float(0xd4d40000), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4), SkBits2Float(0xd4d4d4d4)); // -7.28426e+12f, -7.31283e+12f, -7.31283e+12f, -7.31283e+12f
+
+ SkPath path2(path);
+ testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
+}
+
static void fuzzhang_2(skiatest::Reporter* reporter, const char* filename) {
SkPath path;
path.setFillType((SkPath::FillType) 0);
@@ -8559,104 +8559,104 @@ path.quadTo(SkBits2Float(0x5c525200), SkBits2Float(0x46090052), SkBits2Float(0x7 testPathOpFail(reporter, path1, path2, (SkPathOp) 3, filename);
}
- -static struct TestDesc failTests[] = { - TEST(fuzzhang_3), - TEST(fuzzhang_2), - TEST(release_13), - TEST(fuzzhang_1), - TEST(fuzz763_57), - TEST(fuzz763_56), - TEST(fuzz763_55), - TEST(fuzz763_54), - TEST(fuzz763_53), - TEST(fuzz763_52), - TEST(fuzz763_51), - TEST(fuzz763_50), - TEST(fuzz763_49), - TEST(fuzz763_48), - TEST(fuzz763_47), - TEST(fuzz763_46), - TEST(fuzz763_45), - TEST(fuzz763_44), - TEST(fuzz763_43), - TEST(fuzz763_42), - TEST(fuzz763_41), - TEST(fuzz763_40), - TEST(fuzz763_39), - TEST(fuzz763_38), - TEST(fuzz763_37), - TEST(fuzz763_36), - TEST(fuzz763_35), - TEST(fuzz763_34), - TEST(fuzz763_33), - TEST(fuzz763_32), - TEST(fuzz763_31), - TEST(fuzz763_30), - TEST(fuzz763_29), - TEST(fuzz763_28), - TEST(fuzz763_27), - TEST(fuzz763_26), - TEST(fuzz763_25), - TEST(fuzz763_24), - TEST(fuzz763_23), - TEST(fuzz763_22), - TEST(fuzz763_21), - TEST(fuzz763_20), - TEST(fuzz763_19), - TEST(fuzz763_18), - TEST(fuzz763_17), - TEST(fuzz763_16), - TEST(fuzz763_15), - TEST(fuzz763_14), - TEST(fuzz763_13), - TEST(fuzz763_12), - TEST(fuzz763_11), - TEST(fuzz763_10), - TEST(kfuzz2), - TEST(fuzz763_7), - TEST(fuzz763_6), - TEST(fuzz763_2c), - TEST(fuzz763_2b), - TEST(fuzz763_2a), - TEST(fuzz763_5a), - TEST(fuzz763_3a), - TEST(fuzz763_1a), - TEST(fuzz763_1b), - TEST(fuzz763_1c), - TEST(fuzz763_2), - TEST(fuzz763_5), - TEST(fuzz763_3), - TEST(fuzz763_4), - TEST(fuzz763_9), - TEST(fuzz1450_1), - TEST(fuzz1450_0), - TEST(bug597926_0), - TEST(fuzz535151), - TEST(fuzz753_91), - TEST(fuzz714), - TEST(fuzz487a), - TEST(fuzz433), - TEST(fuzz1), - TEST(fuzz487b), - TEST(fuzz433b), - TEST(bufferOverflow), -}; - -static const size_t failTestCount = SK_ARRAY_COUNT(failTests); - -DEF_TEST(PathOpsFailOp, reporter) { -#if DEBUG_SHOW_TEST_NAME - strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); -#endif - RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, false); -} - -static struct TestDesc repTests[] = { - TEST(fuzz763_5a), -}; - -DEF_TEST(PathOpsRepOp, reporter) { - for (int index = 0; index < 1; ++index) - RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, nullptr, false); -} +
+static struct TestDesc failTests[] = {
+ TEST(fuzzhang_3),
+ TEST(fuzzhang_2),
+ TEST(release_13),
+ TEST(fuzzhang_1),
+ TEST(fuzz763_57),
+ TEST(fuzz763_56),
+ TEST(fuzz763_55),
+ TEST(fuzz763_54),
+ TEST(fuzz763_53),
+ TEST(fuzz763_52),
+ TEST(fuzz763_51),
+ TEST(fuzz763_50),
+ TEST(fuzz763_49),
+ TEST(fuzz763_48),
+ TEST(fuzz763_47),
+ TEST(fuzz763_46),
+ TEST(fuzz763_45),
+ TEST(fuzz763_44),
+ TEST(fuzz763_43),
+ TEST(fuzz763_42),
+ TEST(fuzz763_41),
+ TEST(fuzz763_40),
+ TEST(fuzz763_39),
+ TEST(fuzz763_38),
+ TEST(fuzz763_37),
+ TEST(fuzz763_36),
+ TEST(fuzz763_35),
+ TEST(fuzz763_34),
+ TEST(fuzz763_33),
+ TEST(fuzz763_32),
+ TEST(fuzz763_31),
+ TEST(fuzz763_30),
+ TEST(fuzz763_29),
+ TEST(fuzz763_28),
+ TEST(fuzz763_27),
+ TEST(fuzz763_26),
+ TEST(fuzz763_25),
+ TEST(fuzz763_24),
+ TEST(fuzz763_23),
+ TEST(fuzz763_22),
+ TEST(fuzz763_21),
+ TEST(fuzz763_20),
+ TEST(fuzz763_19),
+ TEST(fuzz763_18),
+ TEST(fuzz763_17),
+ TEST(fuzz763_16),
+ TEST(fuzz763_15),
+ TEST(fuzz763_14),
+ TEST(fuzz763_13),
+ TEST(fuzz763_12),
+ TEST(fuzz763_11),
+ TEST(fuzz763_10),
+ TEST(kfuzz2),
+ TEST(fuzz763_7),
+ TEST(fuzz763_6),
+ TEST(fuzz763_2c),
+ TEST(fuzz763_2b),
+ TEST(fuzz763_2a),
+ TEST(fuzz763_5a),
+ TEST(fuzz763_3a),
+ TEST(fuzz763_1a),
+ TEST(fuzz763_1b),
+ TEST(fuzz763_1c),
+ TEST(fuzz763_2),
+ TEST(fuzz763_5),
+ TEST(fuzz763_3),
+ TEST(fuzz763_4),
+ TEST(fuzz763_9),
+ TEST(fuzz1450_1),
+ TEST(fuzz1450_0),
+ TEST(bug597926_0),
+ TEST(fuzz535151),
+ TEST(fuzz753_91),
+ TEST(fuzz714),
+ TEST(fuzz487a),
+ TEST(fuzz433),
+ TEST(fuzz1),
+ TEST(fuzz487b),
+ TEST(fuzz433b),
+ TEST(bufferOverflow),
+};
+
+static const size_t failTestCount = SK_ARRAY_COUNT(failTests);
+
+DEF_TEST(PathOpsFailOp, reporter) {
+#if DEBUG_SHOW_TEST_NAME
+ strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH);
+#endif
+ RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, false);
+}
+
+static struct TestDesc repTests[] = {
+ TEST(fuzz763_5a),
+};
+
+DEF_TEST(PathOpsRepOp, reporter) {
+ for (int index = 0; index < 1; ++index)
+ RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, nullptr, false);
+}
diff --git a/tests/PathOpsSimplifyTest.cpp b/tests/PathOpsSimplifyTest.cpp index 2de67ff22f..be74345070 100644 --- a/tests/PathOpsSimplifyTest.cpp +++ b/tests/PathOpsSimplifyTest.cpp @@ -1,5631 +1,5631 @@ -/* - * Copyright 2012 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#include "PathOpsExtendedTest.h" - -#define TEST(name) { name, #name } - -static void testLine1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2,0); - path.lineTo(1,1); - path.lineTo(0,0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine1x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(2,0); - path.lineTo(1,1); - path.lineTo(0,0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void addInnerCWTriangle(SkPath& path) { - path.moveTo(3,0); - path.lineTo(4,1); - path.lineTo(2,1); - path.close(); -} - -static void addInnerCCWTriangle(SkPath& path) { - path.moveTo(3,0); - path.lineTo(2,1); - path.lineTo(4,1); - path.close(); -} - -static void addOuterCWTriangle(SkPath& path) { - path.moveTo(3,0); - path.lineTo(6,2); - path.lineTo(0,2); - path.close(); -} - -static void addOuterCCWTriangle(SkPath& path) { - path.moveTo(3,0); - path.lineTo(0,2); - path.lineTo(6,2); - path.close(); -} - -static void testLine2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addInnerCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine2x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addInnerCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addInnerCCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine3x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addInnerCCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine3a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addInnerCWTriangle(path); - addOuterCCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine3ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addInnerCWTriangle(path); - addOuterCCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine3b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addInnerCCWTriangle(path); - addOuterCCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine3bx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addInnerCCWTriangle(path); - addOuterCCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addOuterCCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine4x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addOuterCCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addOuterCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine5x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addOuterCWTriangle(path); - addOuterCWTriangle(path); - testSimplify(reporter, path, filename); -} - -static void testLine6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,0); - path.lineTo(4,0); - path.lineTo(2,2); - path.close(); - path.moveTo(2,0); - path.lineTo(6,0); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine6x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,0); - path.lineTo(4,0); - path.lineTo(2,2); - path.close(); - path.moveTo(2,0); - path.lineTo(6,0); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine7(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,0); - path.lineTo(4,0); - path.lineTo(2,2); - path.close(); - path.moveTo(6,0); - path.lineTo(2,0); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine7x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,0); - path.lineTo(4,0); - path.lineTo(2,2); - path.close(); - path.moveTo(6,0); - path.lineTo(2,0); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine7a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,0); - path.lineTo(4,0); - path.lineTo(2,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine7ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,0); - path.lineTo(4,0); - path.lineTo(2,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine7b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,0); - path.lineTo(4,0); - path.close(); - path.moveTo(6,0); - path.lineTo(2,0); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine7bx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,0); - path.lineTo(4,0); - path.close(); - path.moveTo(6,0); - path.lineTo(2,0); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine8(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,4); - path.lineTo(4,4); - path.lineTo(2,2); - path.close(); - path.moveTo(2,4); - path.lineTo(6,4); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine8x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,4); - path.lineTo(4,4); - path.lineTo(2,2); - path.close(); - path.moveTo(2,4); - path.lineTo(6,4); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine9(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,4); - path.lineTo(4,4); - path.lineTo(2,2); - path.close(); - path.moveTo(6,4); - path.lineTo(2,4); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine9x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,4); - path.lineTo(4,4); - path.lineTo(2,2); - path.close(); - path.moveTo(6,4); - path.lineTo(2,4); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine10(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,4); - path.lineTo(4,4); - path.lineTo(2,2); - path.close(); - path.moveTo(2,1); - path.lineTo(3,4); - path.lineTo(6,1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine10x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,4); - path.lineTo(4,4); - path.lineTo(2,2); - path.close(); - path.moveTo(2,1); - path.lineTo(3,4); - path.lineTo(6,1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine10a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,4); - path.lineTo(8,4); - path.lineTo(4,0); - path.close(); - path.moveTo(2,2); - path.lineTo(3,3); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine10ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0,4); - path.lineTo(8,4); - path.lineTo(4,0); - path.close(); - path.moveTo(2,2); - path.lineTo(3,3); - path.lineTo(4,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void addCWContainer(SkPath& path) { - path.moveTo(6,4); - path.lineTo(0,4); - path.lineTo(3,1); - path.close(); -} - -static void addCCWContainer(SkPath& path) { - path.moveTo(0,4); - path.lineTo(6,4); - path.lineTo(3,1); - path.close(); -} - -static void addCWContents(SkPath& path) { - path.moveTo(2,3); - path.lineTo(3,2); - path.lineTo(4,3); - path.close(); -} - -static void addCCWContents(SkPath& path) { - path.moveTo(3,2); - path.lineTo(2,3); - path.lineTo(4,3); - path.close(); -} - -static void testLine11(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addCWContainer(path); - addCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine11x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addCWContainer(path); - addCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine12(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addCCWContainer(path); - addCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine12x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addCCWContainer(path); - addCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine13(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addCWContainer(path); - addCCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine13x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addCWContainer(path); - addCCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine14(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - addCCWContainer(path); - addCCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine14x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - addCCWContainer(path); - addCCWContents(path); - testSimplify(reporter, path, filename); -} - -static void testLine15(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine15x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine16(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine16x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine17(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine17x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine18(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine18x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 4, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine19(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine19x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 16, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine20(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine20x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine21(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine21x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 16, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine22(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine22x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine23(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine23x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine24a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2,0); - path.lineTo(4,4); - path.lineTo(0,4); - path.close(); - path.moveTo(2,0); - path.lineTo(1,2); - path.lineTo(2,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine24ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(2,0); - path.lineTo(4,4); - path.lineTo(0,4); - path.close(); - path.moveTo(2,0); - path.lineTo(1,2); - path.lineTo(2,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine24(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine24x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine25(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine25x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine26(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine26x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 12, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine27(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine27x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 8, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine28(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine28x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine29(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine29x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 18, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine30(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine30x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 4, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine31(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine31x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 4, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine32(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine32x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine33(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine33x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine34(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine34x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine35(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine35x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine36(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine36x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine37(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); - path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine37x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); - path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine38(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); - path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine38x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(6, 12, 18, 18, SkPath::kCW_Direction); - path.addRect(12, 12, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine40(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine40x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 18, 24, 24, SkPath::kCW_Direction); - path.addRect(4, 16, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine41(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine41x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(18, 24, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine42(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine42x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(8, 16, 17, 17, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine43(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine43x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 24, 18, 18, SkPath::kCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine44(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine44x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine45(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine45x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine46(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); - path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine46x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); - path.addRect(24, 32, 33, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine47(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine47x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine48(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine48x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 6, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine49(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine49x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine50(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine50x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine51(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine51x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine52(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine52x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine53(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine53x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine54(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); - path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine54x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 0, 18, 18, SkPath::kCW_Direction); - path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine55(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); - path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine55x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 6, 18, 18, SkPath::kCW_Direction); - path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine56(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); - path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine56x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); - path.addRect(18, 20, 30, 30, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine57(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); - path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine57x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); - path.addRect(20, 0, 30, 40, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine58(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); - path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine58x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction); - path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine59(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); - path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine59x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction); - path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine60(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine60x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine61(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine61x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine62(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine62x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine63(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine63x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 10, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine64(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine64x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 6, 30, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine65(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); - path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine65x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 0, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 0, 36, 36, SkPath::kCW_Direction); - path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine66(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); - path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine66x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 30, 20, 20, SkPath::kCW_Direction); - path.addRect(12, 20, 24, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine67(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine67x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); - path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); - path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68bx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68c(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); - path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68cx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCW_Direction); - path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68d(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68dx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 4, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68e(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68ex(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68f(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68fx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68g(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68gx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68h(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine68hx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 8, 8, SkPath::kCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction); - path.addRect(1, 2, 2, 2, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine69(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine69x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine70(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine70x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 24, 12, 12, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine71(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine71x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 20, 20, SkPath::kCW_Direction); - path.addRect(12, 0, 24, 24, SkPath::kCW_Direction); - path.addRect(12, 32, 21, 36, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine72(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine72x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 40, 30, 30, SkPath::kCW_Direction); - path.addRect(6, 20, 18, 30, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine73(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine73x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(0, 40, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); - path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine74(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); - path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine74x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(20, 30, 40, 40, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); - path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine75(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); - path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine75x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCW_Direction); - path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction); - path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine76(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); - path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); - path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine76x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(36, 0, 66, 60, SkPath::kCW_Direction); - path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); - path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine77(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); - path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); - path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine77x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(20, 0, 40, 40, SkPath::kCW_Direction); - path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); - path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine78(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); - path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); - path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine78x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 30, 60, SkPath::kCW_Direction); - path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction); - path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine79(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); - path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); - path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine79x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 36, 60, 30, SkPath::kCW_Direction); - path.addRect(10, 30, 40, 30, SkPath::kCW_Direction); - path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine81(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); - path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testDegenerate1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(2, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(2, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerate1x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(2, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(2, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerate2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(0, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerate2x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(0, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerate3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(2, 0); - path.lineTo(1, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(3, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerate3x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.lineTo(1, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(3, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerate4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerate4x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(3, 0); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 1); - path.lineTo(2, 1); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate1x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(3, 0); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 1); - path.lineTo(2, 1); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.lineTo(0, 1); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 2); - path.lineTo(0, 3); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate2x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 0); - path.lineTo(0, 1); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 2); - path.lineTo(0, 3); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 1); - path.lineTo(1, 1); - path.lineTo(0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate3x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 1); - path.lineTo(1, 1); - path.lineTo(0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.lineTo(0, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 2); - path.lineTo(0, 3); - path.lineTo(1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testNondegenerate4x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 0); - path.lineTo(0, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 2); - path.lineTo(0, 3); - path.lineTo(1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 2); - path.lineTo(3, 2); - path.lineTo(3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral5x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 2); - path.lineTo(3, 2); - path.lineTo(3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.lineTo(0, 2); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral6x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.lineTo(0, 2); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.lineTo(1 + 1.0f/3, 2.0f/3); - path.close(); - path.moveTo(1 + 1.0f/3, 2.0f/3); - path.lineTo(0, 2); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.lineTo(1 + 1.0f/3, 2.0f/3); - path.close(); - path.moveTo(1 + 1.0f/3, 2.0f/3); - path.lineTo(0, 2); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(3, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(0, 6); - path.lineTo(6, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(3, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(0, 6); - path.lineTo(6, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(3, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(6, 6); - path.lineTo(0, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6bx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(3, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(6, 6); - path.lineTo(0, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6c(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(3, 3); - path.lineTo(3, 0); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(0, 6); - path.lineTo(6, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6cx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(3, 3); - path.lineTo(3, 0); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(0, 6); - path.lineTo(6, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6d(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(3, 3); - path.lineTo(3, 0); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(6, 6); - path.lineTo(0, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testFauxQuadralateral6dx(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(3, 3); - path.lineTo(3, 0); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(4, 2); - path.close(); - path.moveTo(4, 2); - path.lineTo(6, 6); - path.lineTo(0, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral6a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(3, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(0, 6); - path.lineTo(6, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(3, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(6, 0); - path.lineTo(0, 6); - path.lineTo(6, 6); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral7(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.lineTo(2, 2); - path.lineTo(1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral7x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.lineTo(2, 2); - path.lineTo(1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral8(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(3, 1); - path.lineTo(1, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(2, 1); - path.lineTo(0, 2); - path.lineTo(3, 2); - path.lineTo(2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral8x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(3, 1); - path.lineTo(1, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(2, 1); - path.lineTo(0, 2); - path.lineTo(3, 2); - path.lineTo(2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral9(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 2); - path.lineTo(2, 2); - path.close(); - path.moveTo(1, 1); - path.lineTo(2, 1); - path.lineTo(1, 3); - path.lineTo(2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral9x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(1, 2); - path.lineTo(2, 2); - path.close(); - path.moveTo(1, 1); - path.lineTo(2, 1); - path.lineTo(1, 3); - path.lineTo(2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine1a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kWinding_FillType); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine1ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine2ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 20, 20, 20, SkPath::kCW_Direction); - path.addRect(0, 20, 12, 30, SkPath::kCW_Direction); - path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine3aax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); - path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine4ax(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(10, 30, 30, 30, SkPath::kCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); - path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testQuadratic1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(1, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic1x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(1, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(3, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic2x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(3, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic3x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic4x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic7(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(3, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 0, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic8(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic9(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(3, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(1, 2, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic14(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(3, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic15(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(0, 1); - path.quadTo(1, 1, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic17x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 3, 1); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(3, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic18(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic19(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic20(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic21(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic22(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 2, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic23(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 2, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic24(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(2, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic25(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 1); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic26(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 1); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic27(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 1); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic28(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 2); - path.quadTo(1, 2, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic29(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 2, 1); - path.lineTo(0, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic30(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 2); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic31(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 2); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic32(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 2, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic33(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 1); - path.quadTo(2, 1, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic34(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 0, 0, 1); - path.lineTo(0, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.quadTo(2, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic35(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 1, 1, 1); - path.lineTo(1, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(3, 0); - path.quadTo(0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic36(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 1, 2, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(3, 1); - path.lineTo(1, 2); - path.quadTo(3, 2, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic37(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 2, 1, 2); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(3, 1); - path.quadTo(0, 2, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic38(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(0, 1, 1, 1); - path.lineTo(1, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 2); - path.quadTo(2, 2, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic51(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(369.863983f, 145.645813f); - path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f); - path.lineTo(369.863983f, 145.645813f); - path.close(); - path.moveTo(369.970581f, 137.94342f); - path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f); - path.lineTo(369.970581f, 137.94342f); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic53(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(303.12088f, 141.299606f); - path.lineTo(330.463562f, 217.659027f); - path.lineTo(303.12088f, 141.299606f); - path.close(); - path.moveTo(371.919067f, 205.854996f); - path.lineTo(326.236786f, 205.854996f); - path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); - path.lineTo(371.919067f, 205.854996f); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic55(skiatest::Reporter* reporter, const char* filename) { - SkPath path; -path.moveTo(303.12088f, 141.299606f); -path.lineTo(330.463562f, 217.659027f); -path.lineTo(358.606506f, 141.299606f); -path.lineTo(303.12088f, 141.299606f); -path.close(); -path.moveTo(326.236786f, 205.854996f); -path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); -path.lineTo(326.236786f, 205.854996f); -path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic56(skiatest::Reporter* reporter, const char* filename) { - SkPath path; -path.moveTo(366.608826f, 151.196014f); -path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f); -path.lineTo(354.009216f, 208.816208f); -path.lineTo(393.291473f, 102.232819f); -path.lineTo(359.978058f, 136.581512f); -path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f); -path.lineTo(364.390686f, 157.898193f); -path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f); -path.lineTo(350, 120); -path.lineTo(366.608826f, 151.196014f); -path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine80(skiatest::Reporter* reporter, const char* filename) { - SkPath path; -path.moveTo(4, 0); -path.lineTo(3, 7); -path.lineTo(7, 5); -path.lineTo(2, 2); -path.close(); -path.moveTo(0, 6); -path.lineTo(6, 12); -path.lineTo(8, 3); -path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic58(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(283.714233f, 240); - path.lineTo(283.714233f, 141.299606f); - path.lineTo(303.12088f, 141.299606f); - path.lineTo(330.463562f, 217.659027f); - path.lineTo(358.606506f, 141.299606f); - path.lineTo(362.874634f, 159.705902f); - path.lineTo(335.665344f, 233.397751f); - path.lineTo(322.12738f, 233.397751f); - path.lineTo(295.718353f, 159.505829f); - path.lineTo(295.718353f, 240); - path.lineTo(283.714233f, 240); - path.close(); - path.moveTo(322.935669f, 231.030273f); - path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f); - path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f); - path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f); - path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f); - path.lineTo(371.919067f, 205.854996f); - path.lineTo(326.236786f, 205.854996f); - path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f); - path.lineTo(322.935669f, 231.030273f); - path.close(); - path.moveTo(326.837006f, 195.984955f); - path.lineTo(358.78125f, 195.984955f); - path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f); - path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic59x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(2, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.quadTo(3, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic59(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(2, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.quadTo(3, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic63(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(3, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 1); - path.quadTo(2, 1, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic64(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(2, 3); - path.close(); - path.moveTo(1, 2); - path.lineTo(2, 2); - path.quadTo(0, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic65(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(3, 2); - path.close(); - path.moveTo(2, 1); - path.lineTo(2, 2); - path.quadTo(0, 3, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic67x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 1); - path.lineTo(2, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.quadTo(1, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic68(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 2, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic69(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(2, 0); - path.lineTo(1, 1); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic70x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 2, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic71(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 1, 3, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic72(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 2); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic73(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 0, 3); - path.lineTo(0, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic74(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 3); - path.lineTo(1, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 1); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic75(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 1); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic76(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(2, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 2); - path.quadTo(1, 2, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic77(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 1); - path.lineTo(3, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic78(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 2); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic79(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 1, 2); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(2, 2); - path.lineTo(0, 2); - path.lineTo(2, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(2, 0); - path.lineTo(0, 2); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 2); - path.lineTo(2, 0); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(2, 2); - path.lineTo(2, 0); - path.lineTo(0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.lineTo(1, 2); - path.lineTo(0, 2); - path.lineTo(2, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.lineTo(2, 0); - path.lineTo(0, 2); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight7(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 1); - path.lineTo(2, 1); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight8(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(2, 2); - path.lineTo(2, 1); - path.lineTo(0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight9(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.lineTo(1, 2); - path.lineTo(2, 1); - path.lineTo(0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testEight10(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.lineTo(0, 1); - path.lineTo(2, 1); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic80(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(1, 0, 2, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(3, 0); - path.quadTo(0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic81(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 0, 1, 1); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic82(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 0, 1, 1); - path.lineTo(0, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic83(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 0); - path.lineTo(2, 2); - path.close(); - path.moveTo(0, 1); - path.lineTo(0, 2); - path.quadTo(2, 2, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic84(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 0, 1, 1); - path.lineTo(2, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.quadTo(0, 1, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic85(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(3, 0, 1, 1); - path.lineTo(1, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(3, 0); - path.quadTo(0, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic86(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 1, 1, 1); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 1, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic87(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 1, 0, 2); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 1); - path.quadTo(0, 2, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic88(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(2, 1, 0, 2); - path.lineTo(2, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.quadTo(0, 2, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic89x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(3, 1, 2, 2); - path.lineTo(0, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 1); - path.quadTo(3, 1, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic90x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(3, 0, 2, 2); - path.lineTo(1, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 1); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic91(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(3, 2, 2, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 1); - path.quadTo(2, 1, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic92x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 0); - path.quadTo(3, 0, 2, 2); - path.lineTo(2, 2); - path.close(); - path.moveTo(2, 0); - path.lineTo(0, 1); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testLine82(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); - path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82a(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82c(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82d(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82e(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82f(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82g(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine82h(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction); - path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction); - path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine83(skiatest::Reporter* reporter, const char* filename) { - SkPath path; -path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction); -path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction); -path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine84(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); - path.addRect(10, 20, 40, 30, SkPath::kCW_Direction); - path.addRect(0, 12, 12, 12, SkPath::kCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine84x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction); - path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction); - path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction); - path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testLine85(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction); - path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction); - path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(0, 0); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 1); - path.lineTo(2, 2); - path.lineTo(2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testCubic1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.cubicTo(0, 1, 1, 1, 1, 0); - path.close(); - path.moveTo(1, 0); - path.cubicTo(0, 0, 0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic93(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(3, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(0, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.quadTo(1, 1, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testCubic2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,2); - path.cubicTo(0,3, 2,1, 4,0); - path.close(); - path.moveTo(1,2); - path.cubicTo(0,4, 2,0, 3,0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0,0); - path.quadTo(0,0, 0,1); - path.lineTo(1,1); - path.close(); - path.moveTo(0,0); - path.quadTo(1,1, 0,2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(2, 2); - path.lineTo(0, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(3, 0); - path.lineTo(0, 1); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic94(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(8, 8); - path.quadTo(8, 4, 4, 4); - path.quadTo(4, 0, 0, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic95(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(8, 8); - path.lineTo(0, 0); - path.quadTo(4, 0, 4, 4); - path.quadTo(8, 4, 8, 8); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic96(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(8, 0); - path.lineTo(0, 8); - path.quadTo(0, 4, 4, 4); - path.quadTo(4, 0, 8, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadratic97(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 8); - path.lineTo(8, 0); - path.quadTo(4, 0, 4, 4); - path.quadTo(0, 4, 0, 8); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testTriangles1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 2); - path.lineTo(1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testTriangles2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(3, 3); - path.close(); - path.moveTo(1, 1); - path.lineTo(2, 3); - path.lineTo(1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -// A test for this case: -// contourA has two segments that are coincident -// contourB has two segments that are coincident in the same place -// each ends up with +2/0 pairs for winding count -// since logic in OpSegment::addTCoincident doesn't transfer count (only increments/decrements) -// can this be resolved to +4/0 ? -static void testAddTCoincident1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.lineTo(2, 2); - path.lineTo(1, 1); - path.lineTo(2, 0); - path.lineTo(2, 2); - path.lineTo(1, 1); - path.close(); - path.moveTo(2, 0); - path.lineTo(2, 2); - path.lineTo(3, 1); - path.lineTo(2, 0); - path.lineTo(2, 2); - path.lineTo(3, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -// test with implicit close -static void testAddTCoincident2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.lineTo(2, 2); - path.lineTo(1, 1); - path.lineTo(2, 0); - path.lineTo(2, 2); - path.lineTo(1, 1); - path.moveTo(2, 0); - path.lineTo(2, 2); - path.lineTo(3, 1); - path.lineTo(2, 0); - path.lineTo(2, 2); - path.lineTo(3, 1); - testSimplify(reporter, path, filename); -} - -static void testQuad2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 1, 1); - path.close(); -} - -static void testQuad3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(0, 1, 1, 1); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.quadTo(0, 1, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(0, 1, 2, 2); - path.lineTo(1, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.quadTo(0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(0, 1, 2, 2); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.quadTo(0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad7(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(3, 0); - path.quadTo(0, 1, 1, 1); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(3, 0); - path.quadTo(0, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadLineIntersect1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(3, 1, 0, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(0, 1); - path.quadTo(3, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadLineIntersect2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(3, 1, 0, 3); - path.lineTo(0, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(0, 1); - path.quadTo(3, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadLineIntersect3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(3, 1, 0, 3); - path.lineTo(1, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(0, 1); - path.quadTo(3, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void skphealth_com76(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(708.099182f, 7.09919119f); - path.lineTo(708.099182f, 7.09920025f); - path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); - path.lineTo(704.000000f, 33.0000000f); - path.lineTo(705.000000f, 33.0000000f); - path.lineTo(705.000000f, 17.0000000f); - path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f); - path.lineTo(708.099182f, 7.09919119f); - path.close(); - path.moveTo(704.000000f, 3.00000000f); - path.lineTo(704.000000f, 33.0000000f); - path.lineTo(705.000000f, 33.0000000f); - path.lineTo(719.500000f, 3.00000000f); - testSimplify(reporter, path, filename); -} - -static void tooCloseTest(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 1); - path.lineTo(1,-1); - path.close(); - path.moveTo(0, 0); - path.lineTo(1,-2); - path.lineTo(1, 2); - path.lineTo(2, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testRect1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); - path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction); - path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); - path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testRect2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 0); - path.lineTo(60, 0); - path.lineTo(60, 60); - path.lineTo(0, 60); - path.close(); - path.moveTo(30, 20); - path.lineTo(30, 50); - path.lineTo(50, 50); - path.lineTo(50, 20); - path.close(); - path.moveTo(24, 20); - path.lineTo(24, 30); - path.lineTo(36, 30); - path.lineTo(36, 20); - path.close(); - path.moveTo(32, 24); - path.lineTo(32, 41); - path.lineTo(36, 41); - path.lineTo(36, 24); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testTriangles3x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(1, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 1); - path.quadTo(2, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad8(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(3, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(0, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(3, 0); - path.quadTo(1, 1, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testTriangles4x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(2, 0, 0, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 1); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad9(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.quadTo(2, 1, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad10(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(3, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(2, 0); - path.quadTo(2, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad11(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(0, 1, 1, 2); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 1); - path.quadTo(1, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad12(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 0); - path.lineTo(0, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.lineTo(0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - - -static void testDegenerate5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(1, 0); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(0, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(0, 0); - path.lineTo(3, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(0, 1); - path.lineTo(3, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testDegenerates1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad13(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 2, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad14(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 1, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuad15(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(1, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 0, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads16(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads17(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 2, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads18(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 2, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads19(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads20(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 1); - path.lineTo(1, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(2, 1, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads21(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 0, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads22(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads23(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads24(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(0, 1); - path.lineTo(0, 1); - path.quadTo(0, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads25(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 1); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 0, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads26(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 3, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads27(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(2, 0); - path.lineTo(2, 0); - path.quadTo(3, 0, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads28(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 0, 1); - path.lineTo(2, 2); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 0, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads29(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 3, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(3, 0); - path.lineTo(3, 0); - path.quadTo(3, 1, 0, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads30(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - - path.quadTo(0, 0, 2, 0); - path.lineTo(2, 2); - path.close(); - path.moveTo(2, 0); - path.lineTo(2, 0); - path.quadTo(3, 2, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads31(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 1); - path.lineTo(1, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(0, 1); - - path.quadTo(2, 1, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads32(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(1, 2); - path.close(); - path.moveTo(1, 1); - path.lineTo(1, 1); - path.quadTo(3, 1, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads33(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 1); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(3, 0, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads34(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 0); - path.quadTo(2, 0, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads35(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(1, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 0); - path.quadTo(3, 1, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads36(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(2, 0, 1, 2); - path.lineTo(2, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 0); - path.quadTo(3, 0, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads37(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(1, 0); - path.quadTo(2, 0, 1, 2); - path.lineTo(2, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 0); - path.quadTo(3, 0, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads38(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(3, 0, 0, 2); - path.lineTo(3, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 0); - path.quadTo(2, 1, 3, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads39(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(3, 0, 0, 3); - path.lineTo(0, 3); - path.close(); - path.moveTo(1, 1); - path.lineTo(0, 2); - path.quadTo(1, 2, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads40(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(3, 0, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(2, 1); - path.lineTo(2, 2); - path.quadTo(3, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads41(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 0, 1, 0); - path.lineTo(2, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} - - -static void testQuads54(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(2, 0, 1, 1); - path.lineTo(3, 1); - path.close(); - path.moveTo(2, 0); - path.lineTo(1, 1); - path.quadTo(1, 1, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads53(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(2, 0, 1, 1); - path.lineTo(3, 1); - path.close(); - path.moveTo(2, 0); - path.lineTo(1, 1); - path.quadTo(2, 3, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads52(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(2, 0, 1, 1); - path.lineTo(3, 1); - path.close(); - path.moveTo(2, 0); - path.lineTo(1, 1); - path.quadTo(2, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads51(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 0, 2, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(3, 0); - path.lineTo(3, 1); - path.quadTo(3, 1, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads50(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 0, 2, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(3, 0); - path.lineTo(3, 1); - path.quadTo(1, 2, 1, 2); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads49(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 0, 2, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(3, 0); - path.lineTo(2, 2); - path.quadTo(2, 2, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads48(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 0, 2, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(3, 0); - path.lineTo(2, 2); - path.quadTo(3, 2, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} -static void testQuads47(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 0, 2, 1); - path.lineTo(3, 2); - path.close(); - path.moveTo(3, 0); - path.lineTo(2, 2); - path.quadTo(0, 3, 0, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads46x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(2, 0); - path.quadTo(0, 1, 3, 2); - path.lineTo(1, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 1); - path.quadTo(3, 2, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads45(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 2, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 2); - path.quadTo(3, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads44(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 2, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(0, 2); - path.quadTo(3, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads43(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(2, 3, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 2); - path.lineTo(0, 2); - path.quadTo(2, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads42(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 2, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(0, 2); - path.quadTo(3, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads56(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 1, 0, 2); - path.lineTo(3, 2); - path.close(); - path.moveTo(3, 0); - path.lineTo(2, 1); - path.quadTo(2, 1, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads57(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(3, 0, 3, 1); - path.lineTo(2, 2); - path.close(); - path.moveTo(2, 0); - path.lineTo(3, 1); - path.quadTo(2, 2, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads58(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(3, 0, 3, 1); - path.lineTo(1, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(3, 1); - path.quadTo(2, 2, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads59(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(3, 0); - path.quadTo(3, 1, 3, 1); - path.lineTo(2, 2); - path.close(); - path.moveTo(2, 0); - path.lineTo(3, 1); - path.quadTo(2, 2, 3, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads60(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(2, 1); - path.quadTo(0, 2, 3, 2); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.quadTo(1, 1, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads61(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.moveTo(0, 0); - path.quadTo(0, 0, 2, 0); - path.lineTo(1, 1); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(1, 0, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuadralateral10(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kWinding_FillType); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.lineTo(0, 0); - path.lineTo(2, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.lineTo(2, 2); - path.lineTo(1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testRect3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); - path.addRect(10, 30, 40, 30, SkPath::kCCW_Direction); - path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction); - path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testRect4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - path.addRect(0, 0, 30, 60, SkPath::kCCW_Direction); - path.addRect(10, 0, 40, 30, SkPath::kCCW_Direction); - path.addRect(20, 0, 30, 40, SkPath::kCCW_Direction); - path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction); - testSimplify(reporter, path, filename); -} - -static void testQuads62(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(3, 2); - path.quadTo(1, 3, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(2, 0); - path.quadTo(1, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads63(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(3, 0); - path.quadTo(0, 1, 1, 2); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 1); - path.quadTo(0, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads64(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(3, 0); - path.quadTo(0, 1, 1, 2); - path.lineTo(2, 2); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 1); - path.quadTo(0, 2, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testTriangle1(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(2, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 2); - path.lineTo(1, 0); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testTriangle2(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.lineTo(1, 0); - path.lineTo(0, 1); - path.close(); - path.moveTo(2, 0); - path.lineTo(0, 2); - path.lineTo(2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testArc(skiatest::Reporter* reporter,const char* filename) { - SkRect r = SkRect::MakeWH(150, 100); - SkPath path; - path.arcTo(r, 0, 0.0025f, false); - testSimplify(reporter, path, filename); -} - -static void testIssue3838(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(220, 170); - path.lineTo(200, 170); - path.lineTo(200, 190); - path.lineTo(180, 190); - path.lineTo(180, 210); - path.lineTo(200, 210); - path.lineTo(200, 250); - path.lineTo(260, 250); - path.lineTo(260, 190); - path.lineTo(220, 190); - path.lineTo(220, 170); - path.close(); - path.moveTo(220, 210); - path.lineTo(220, 230); - path.lineTo(240, 230); - path.lineTo(240, 210); - path.lineTo(220, 210); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testIssue3838_3(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(40, 10); - path.lineTo(60, 10); - path.lineTo(60, 30); - path.lineTo(40, 30); - path.lineTo(40, 10); - path.moveTo(41, 11); - path.lineTo(41, 29); - path.lineTo(59, 29); - path.lineTo(59, 11); - path.lineTo(41, 11); - testSimplify(reporter, path, filename); -} - -static void testQuads65(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(1, 2); - path.quadTo(3, 2, 0, 3); - path.lineTo(1, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 2); - path.quadTo(3, 2, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void fuzz864a(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(10, 90); - path.lineTo(10, 90); - path.lineTo(10, 30); - path.lineTo(10, 30); - path.lineTo(10, 90); - path.close(); - path.moveTo(10, 90); - path.lineTo(10, 90); - path.lineTo(10, 30); - path.lineTo(10, 30); - path.lineTo(10, 90); - path.close(); - path.moveTo(10, 90); - path.lineTo(110, 90); - path.lineTo(110, 30); - path.lineTo(10, 30); - path.lineTo(10, 90); - path.close(); - path.moveTo(10, 30); - path.lineTo(32678, 30); - path.lineTo(32678, 30); - path.lineTo(10, 30); - path.close(); - path.moveTo(10, 3.35545e+07f); - path.lineTo(110, 3.35545e+07f); - path.lineTo(110, 30); - path.lineTo(10, 30); - path.lineTo(10, 3.35545e+07f); - path.close(); - path.moveTo(10, 315); - path.lineTo(110, 315); - path.lineTo(110, 255); - path.lineTo(10, 255); - path.lineTo(10, 315); - path.close(); - path.moveTo(0, 60); - path.lineTo(100, 60); - path.lineTo(100, 0); - path.lineTo(0, 0); - path.lineTo(0, 60); - path.close(); - path.moveTo(10, 90); - path.lineTo(110, 90); - path.lineTo(110, 30); - path.lineTo(10, 30); - path.lineTo(10, 90); - path.close(); - path.moveTo(10, 3.35545e+07f); - path.lineTo(110, 3.35545e+07f); - path.lineTo(110, 30); - path.lineTo(10, 30); - path.lineTo(10, 3.35545e+07f); - path.close(); - path.moveTo(10, 90); - path.lineTo(110, 90); - path.lineTo(110, 30); - path.lineTo(10, 30); - path.lineTo(10, 90); - path.close(); - testSimplify(reporter, path, filename); -} - -static void cr514118(skiatest::Reporter* reporter,const char* filename) { - SkPath path; -path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50 -path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f -path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f -path.close(); -path.moveTo(SkBits2Float(0x42c80133), SkBits2Float(0x42480000)); // 100.002f, 50 -path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x00000000), SkBits2Float(0x42480267), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.002f, 0, 50.0023f, 0, 0.707107f -path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x00000000), SkBits2Float(0x3b19b530), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 0, 0.00234539f, 50, 0.707107f -path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x42c80000), SkBits2Float(0x42480267), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 100, 50.0023f, 100, 0.707107f -path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x42c80000), SkBits2Float(0x42c80133), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.002f, 100, 100.002f, 50, 0.707107f -path.close(); - testSimplify(reporter, path, filename); -} - -static void fuzz994s_11(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30 -path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x439d8000)); // 110, 315 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x437f0000)); // 110, 255 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x437f0000)); // 10, 255 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315 -path.close(); -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60 -path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x42700000)); // 100, 60 -path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000)); // 100, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60 -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f -path.close(); -path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90 -path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30 -path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90 -path.close(); - - testSimplify(reporter, path, filename); -} - -static void fuzz994s_3414(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50 -path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f -path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f -path.close(); -path.moveTo(SkBits2Float(0x42c84964), SkBits2Float(0x42480000)); // 100.143f, 50 -path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x00000000), SkBits2Float(0x424892c8), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.143f, 0, 50.1433f, 0, 0.707107f -path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x00000000), SkBits2Float(0x3e12c788), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.143339f, 0, 0.143339f, 50, 0.707107f -path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x42c80000), SkBits2Float(0x424892c8), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.143339f, 100, 50.1433f, 100, 0.707107f -path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x42c80000), SkBits2Float(0x42c84964), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.143f, 100, 100.143f, 50, 0.707107f -path.close(); -path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50 -path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f -path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f -path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f -path.close(); -path.moveTo(SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000)); // 3.35549e+07f, 51 -path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0xcbffffe5), SkBits2Float(0x43d6e720), SkBits2Float(0xcbffffe5), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, -3.35544e+07f, 429.806f, -3.35544e+07f, 0.707107f -path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0xcbffffe5), SkBits2Float(0xcbffff28), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, -3.35544e+07f, -3.3554e+07f, 51, 0.707107f -path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0x4c00000c), SkBits2Float(0x43d6e720), SkBits2Float(0x4c00000c), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, 3.35545e+07f, 429.806f, 3.35545e+07f, 0.707107f -path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0x4c00000c), SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, 3.35545e+07f, 3.35549e+07f, 51, 0.707107f -path.close(); -path.moveTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42480000)); // 478.806f, 50 -path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x00000000), SkBits2Float(0x43d66720), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 478.806f, 0, 428.806f, 0, 0.707107f -path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x00000000), SkBits2Float(0x43bd6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 378.806f, 0, 378.806f, 50, 0.707107f -path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x42c80000), SkBits2Float(0x43d66720), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 378.806f, 100, 428.806f, 100, 0.707107f -path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42c80000), SkBits2Float(0x43ef6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 478.806f, 100, 478.806f, 50, 0.707107f -path.close(); - - testSimplify(reporter, path, filename); -} - -static void fuzz_twister(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(0, 600); -path.lineTo(3.35544e+07f, 600); -path.lineTo(3.35544e+07f, 0); -path.lineTo(0, 0); -path.lineTo(0, 600); -path.close(); -path.moveTo(63, 600); -path.lineTo(3.35545e+07f, 600); -path.lineTo(3.35545e+07f, 0); -path.lineTo(63, 0); -path.lineTo(63, 600); -path.close(); -path.moveTo(93, 600); -path.lineTo(3.35545e+07f, 600); -path.lineTo(3.35545e+07f, 0); -path.lineTo(93, 0); -path.lineTo(93, 600); -path.close(); -path.moveTo(123, 600); -path.lineTo(3.35546e+07f, 600); -path.lineTo(3.35546e+07f, 0); -path.lineTo(123, 0); -path.lineTo(123, 600); -path.close(); - testSimplify(reporter, path, filename); -} - -static void fuzz_twister2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600 -path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x44160000)); // 3.35544e+07f, 600 -path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x00000000)); // 3.35544e+07f, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 -path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600 -path.close(); - -path.moveTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0 -path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 -path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 -path.lineTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0 -path.close(); - -path.moveTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0 -path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 -path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0 -path.lineTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0 -path.close(); - -path.moveTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0 -path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0 -path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0 -path.lineTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0 -path.close(); - - testSimplify(reporter, path, filename); -} - -static void fuzz763_4713_b(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x42240000), SkBits2Float(0x42040000)); -path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x4211413d), SkBits2Float(0x421aa09e), SkBits2Float(0x421aa09e)); -path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x42040000), SkBits2Float(0x42240000)); -path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x41dabec3), SkBits2Float(0x421aa09e)); -path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x42040000)); -path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x41dabec3), SkBits2Float(0x41dabec3)); -path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x41c80000), SkBits2Float(0x42040000), SkBits2Float(0x41c80000)); -path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x421aa09e), SkBits2Float(0x41dabec3)); -path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x42040000)); -path.close(); - -path.moveTo(SkBits2Float(0x4204f72e), SkBits2Float(0x41c56cd2)); -path.quadTo(SkBits2Float(0x42123842), SkBits2Float(0x41c52adf), SkBits2Float(0x421baed7), SkBits2Float(0x41d7bac6)); -path.quadTo(SkBits2Float(0x4225256d), SkBits2Float(0x41ea4aad), SkBits2Float(0x42254667), SkBits2Float(0x4202666b)); -path.quadTo(SkBits2Float(0x42256760), SkBits2Float(0x420fa77f), SkBits2Float(0x421c1f6c), SkBits2Float(0x42191e14)); -path.quadTo(SkBits2Float(0x421bff97), SkBits2Float(0x42193e89), SkBits2Float(0x421bdf6b), SkBits2Float(0x42195eb8)); -path.quadTo(SkBits2Float(0x421bbff6), SkBits2Float(0x42197f32), SkBits2Float(0x421ba03b), SkBits2Float(0x42199f57)); -path.quadTo(SkBits2Float(0x421b605e), SkBits2Float(0x4219e00a), SkBits2Float(0x421b1fa8), SkBits2Float(0x421a1f22)); -path.quadTo(SkBits2Float(0x421ae0f1), SkBits2Float(0x421a604b), SkBits2Float(0x421aa09e), SkBits2Float(0x421aa09e)); -path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x42040000), SkBits2Float(0x42240000)); -path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x41dabec3), SkBits2Float(0x421aa09e)); -path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x42040000)); -path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x41dabec3), SkBits2Float(0x41dabec3)); -path.quadTo(SkBits2Float(0x41db19b1), SkBits2Float(0x41da63d5), SkBits2Float(0x41db755b), SkBits2Float(0x41da0a9b)); -path.quadTo(SkBits2Float(0x41dbce01), SkBits2Float(0x41d9ae59), SkBits2Float(0x41dc285e), SkBits2Float(0x41d952ce)); -path.quadTo(SkBits2Float(0x41dc55b6), SkBits2Float(0x41d924df), SkBits2Float(0x41dc82cd), SkBits2Float(0x41d8f7cd)); -path.quadTo(SkBits2Float(0x41dcaf1e), SkBits2Float(0x41d8ca01), SkBits2Float(0x41dcdc4c), SkBits2Float(0x41d89bf0)); -path.quadTo(SkBits2Float(0x41ef6c33), SkBits2Float(0x41c5aec5), SkBits2Float(0x4204f72e), SkBits2Float(0x41c56cd2)); -path.close(); -testSimplify(reporter, path, filename); -} - -static void dean4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - - // start region - // start loop, contour: 1 - // Segment 1145.3381097316742 2017.6783947944641 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.0033947825432 - path.moveTo(1145.3381347656250, 2017.6783447265625); - path.lineTo(1145.3381347656250, 2017.0034179687500); - // Segment 1145.3381097316742 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6927231521568 2017.0033947825432 - path.lineTo(1143.6927490234375, 2017.0034179687500); - // Segment 1143.6927231521568 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675112890 2018.1589246992417 - path.lineTo(1144.8640136718750, 2018.1589355468750); - // Segment 1144.8640675112890 2018.1589246992417 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.6783947944641 - path.lineTo(1145.3381347656250, 2017.6783447265625); - path.close(); - // start loop, contour: 2 - // Segment 1145.3381097316742 2016.3216052055359 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675258462 2015.8410752863977 - path.moveTo(1145.3381347656250, 2016.3216552734375); - path.lineTo(1144.8640136718750, 2015.8410644531250); - // Segment 1144.8640675258462 2015.8410752863977 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6927230811802 2016.9966052174568 - path.lineTo(1143.6927490234375, 2016.9965820312500); - // Segment 1143.6927230811802 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.9966052174568 - path.lineTo(1145.3381347656250, 2016.9965820312500); - // Segment 1145.3381097316742 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.3216052055359 - path.lineTo(1145.3381347656250, 2016.3216552734375); - path.close(); - // start loop, contour: 3 - // Segment 1147.3323798179626 2014.3542600870132 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220239557 2014.8347900059885 - path.moveTo(1147.3323974609375, 2014.3542480468750); - path.lineTo(1147.8063964843750, 2014.8348388671875); - // Segment 1147.8064220239557 2014.8347900059885 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2014.8347899786306 - path.lineTo(1147.8063964843750, 2014.8348388671875); - // Segment 1147.8064220516883 2014.8347899786306 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.3323798179626 2014.3542600870132 - path.lineTo(1147.3323974609375, 2014.3542480468750); - path.close(); - // start loop, contour: 4 - // Segment 1146.3696286678314 2013.4045072346926 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708778083 2013.8850371497379 - path.moveTo(1146.3696289062500, 2013.4045410156250); - path.lineTo(1146.8436279296875, 2013.8850097656250); - // Segment 1146.8436708778083 2013.8850371497379 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436709015571 2013.8850371263100 - path.lineTo(1146.8436279296875, 2013.8850097656250); - // Segment 1146.8436709015571 2013.8850371263100 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.3696286678314 2013.4045072346926 - path.lineTo(1146.3696289062500, 2013.4045410156250); - path.close(); - // start loop, contour: 5 - // Segment 1143.2063037902117 2016.5251235961914 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615802348 2016.0445936811461 - path.moveTo(1143.2062988281250, 2016.5251464843750); - path.lineTo(1142.7322998046875, 2016.0445556640625); - // Segment 1142.7322615802348 2016.0445936811461 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615564860 2016.0445937045740 - path.lineTo(1142.7322998046875, 2016.0445556640625); - // Segment 1142.7322615564860 2016.0445937045740 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.2063037902117 2016.5251235961914 - path.lineTo(1143.2062988281250, 2016.5251464843750); - path.close(); - // start loop, contour: 6 - // Segment 1143.0687679275870 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.5428101613127 2017.2091718784643 - path.moveTo(1143.0687255859375, 2016.7286376953125); - path.lineTo(1143.5428466796875, 2017.2092285156250); - // Segment 1143.5428101613127 2017.2091718784643 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2017.0109272411960 - path.lineTo(1143.7437744140625, 2017.0109863281250); - // Segment 1143.7437679395080 2017.0109272411960 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2016.7286419868469 - path.lineTo(1143.7437744140625, 2016.7286376953125); - // Segment 1143.7437679395080 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.0687679275870 2016.7286419868469 - path.lineTo(1143.0687255859375, 2016.7286376953125); - path.close(); - // start loop, contour: 7 - // Segment 1143.2063037902117 2017.4748764038086 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615603032 2017.9554062991915 - path.moveTo(1143.2062988281250, 2017.4748535156250); - path.lineTo(1142.7322998046875, 2017.9554443359375); - // Segment 1142.7322615603032 2017.9554062991915 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615746241 2017.9554063133189 - path.lineTo(1142.7322998046875, 2017.9554443359375); - // Segment 1142.7322615746241 2017.9554063133189 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.2063037902117 2017.4748764038086 - path.lineTo(1143.2062988281250, 2017.4748535156250); - path.close(); - // start loop, contour: 8 - // Segment 1146.3696286678314 2020.5954928398132 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708977399 2020.1149629444303 - path.moveTo(1146.3696289062500, 2020.5954589843750); - path.lineTo(1146.8436279296875, 2020.1149902343750); - // Segment 1146.8436708977399 2020.1149629444303 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708834190 2020.1149629303029 - path.lineTo(1146.8436279296875, 2020.1149902343750); - // Segment 1146.8436708834190 2020.1149629303029 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.3696286678314 2020.5954928398132 - path.lineTo(1146.3696289062500, 2020.5954589843750); - path.close(); - // start loop, contour: 9 - // Segment 1147.3323798179626 2019.6457400321960 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220484741 2019.1652101374082 - path.moveTo(1147.3323974609375, 2019.6457519531250); - path.lineTo(1147.8063964843750, 2019.1651611328125); - // Segment 1147.8064220484741 2019.1652101374082 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220383478 2019.1652101274185 - path.lineTo(1147.8063964843750, 2019.1651611328125); - // Segment 1147.8064220383478 2019.1652101274185 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.3323798179626 2019.6457400321960 - path.lineTo(1147.3323974609375, 2019.6457519531250); - path.close(); - // start loop, contour: 10 - // Segment 1145.3381097316742 2018.3533948063850 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2018.3533948063850 - path.moveTo(1145.3381347656250, 2018.3533935546875); - path.lineTo(1156.6848144531250, 2018.3533935546875); - // Segment 1156.6848182678223 2018.3533948063850 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2017.0033947825432 - path.lineTo(1156.6848144531250, 2017.0034179687500); - // Segment 1156.6848182678223 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.0033947825432 - path.lineTo(1145.3381347656250, 2017.0034179687500); - // Segment 1145.3381097316742 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2018.3533948063850 - path.lineTo(1145.3381347656250, 2018.3533935546875); - path.close(); - // start loop, contour: 11 - // Segment 1156.6848182678223 2018.3533948063850 0.3569631313191 0.0000000000000 -0.2645167304388 0.2609454237780 1157.6574279406423 2017.9723661860094 - path.moveTo(1156.6848144531250, 2018.3533935546875); - path.cubicTo(1157.0417480468750, 2018.3533935546875, 1157.3929443359375, 2018.2332763671875, 1157.6574707031250, 2017.9724121093750); - // Segment 1157.6574279406423 2017.9723661860094 0.2653344079822 -0.2617520616521 0.0000000000000 0.3596905289350 1158.0474975705147 2017.0000000000000 - path.cubicTo(1157.9227294921875, 2017.7105712890625, 1158.0474853515625, 2017.3597412109375, 1158.0474853515625, 2017.0000000000000); - // Segment 1158.0474975705147 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6974975466728 2017.0000000000000 - path.lineTo(1156.6975097656250, 2017.0000000000000); - // Segment 1156.6974975466728 2017.0000000000000 0.0028009248351 0.0403311981485 0.0118595244351 -0.0220843520393 1156.6941780622435 2017.0325257649940 - path.cubicTo(1156.7003173828125, 2017.0402832031250, 1156.7060546875000, 2017.0104980468750, 1156.6942138671875, 2017.0324707031250); - // Segment 1156.6941780622435 2017.0325257649940 -0.0032637855860 0.0184860248562 0.0120617528380 -0.0065934603083 1156.7093435710913 2017.0113063061967 - path.cubicTo(1156.6909179687500, 2017.0510253906250, 1156.7214355468750, 2017.0047607421875, 1156.7093505859375, 2017.0113525390625); - // split at 0.4496445953846 - // path.cubicTo(1156.6927490234375, 2017.0407714843750, 1156.6981201171875, 2017.0360107421875, 1156.7033691406250, 2017.0289306640625); - // path.cubicTo(1156.7097167968750, 2017.0201416015625, 1156.7159423828125, 2017.0076904296875, 1156.7093505859375, 2017.0113525390625); - // Segment 1156.7093435710913 2017.0113063061967 -0.0070717276929 0.0122220954353 0.0203483811973 -0.0039136894418 1156.7268834554304 2016.9985353221975 - path.cubicTo(1156.7022705078125, 2017.0235595703125, 1156.7471923828125, 2016.9946289062500, 1156.7269287109375, 2016.9985351562500); - // Segment 1156.7268834554304 2016.9985353221975 -0.0244396787691 0.0123649140586 0.0433322464027 0.0026558844666 1156.6848182678223 2017.0033947825432 - path.cubicTo(1156.7023925781250, 2017.0108642578125, 1156.7281494140625, 2017.0061035156250, 1156.6848144531250, 2017.0034179687500); - // split at 0.4418420493603 - // path.cubicTo(1156.7160644531250, 2017.0040283203125, 1156.7150878906250, 2017.0061035156250, 1156.7136230468750, 2017.0065917968750); - // path.cubicTo(1156.7116699218750, 2017.0070800781250, 1156.7089843750000, 2017.0048828125000, 1156.6848144531250, 2017.0034179687500); - // Segment 1156.6848182678223 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2018.3533948063850 - path.lineTo(1156.6848144531250, 2018.3533935546875); - path.close(); - // start loop, contour: 12 - // Segment 1158.0474975705147 2017.0000000000000 0.0000000000000 -0.3596905289350 0.2653344079822 0.2617520616521 1157.6574279406423 2016.0276338139906 - path.moveTo(1158.0474853515625, 2017.0000000000000); - path.cubicTo(1158.0474853515625, 2016.6402587890625, 1157.9227294921875, 2016.2894287109375, 1157.6574707031250, 2016.0275878906250); - // Segment 1157.6574279406423 2016.0276338139906 -0.2645167304388 -0.2609454237780 0.3569631313191 0.0000000000000 1156.6848182678223 2015.6466051936150 - path.cubicTo(1157.3929443359375, 2015.7667236328125, 1157.0417480468750, 2015.6466064453125, 1156.6848144531250, 2015.6466064453125); - // split at 0.5481675863266 - // path.cubicTo(1157.5124511718750, 2015.8846435546875, 1157.3414306640625, 2015.7839355468750, 1157.1577148437500, 2015.7220458984375); - // path.cubicTo(1157.0062255859375, 2015.6711425781250, 1156.8460693359375, 2015.6466064453125, 1156.6848144531250, 2015.6466064453125); - // Segment 1156.6848182678223 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2016.9966052174568 - path.lineTo(1156.6848144531250, 2016.9965820312500); - // Segment 1156.6848182678223 2016.9966052174568 0.0433322464027 -0.0026558844666 -0.0244396787691 -0.0123649140586 1156.7268834554304 2017.0014646778025 - path.cubicTo(1156.7281494140625, 2016.9938964843750, 1156.7023925781250, 2016.9891357421875, 1156.7269287109375, 2017.0014648437500); - // split at 0.5581579208374 - // path.cubicTo(1156.7089843750000, 2016.9951171875000, 1156.7116699218750, 2016.9929199218750, 1156.7136230468750, 2016.9934082031250); - // path.cubicTo(1156.7150878906250, 2016.9938964843750, 1156.7160644531250, 2016.9959716796875, 1156.7269287109375, 2017.0014648437500); - // Segment 1156.7268834554304 2017.0014646778025 0.0203483811973 0.0039136894418 -0.0070717276929 -0.0122220954353 1156.7093435710913 2016.9886936938033 - path.cubicTo(1156.7471923828125, 2017.0053710937500, 1156.7022705078125, 2016.9764404296875, 1156.7093505859375, 2016.9886474609375); - // Segment 1156.7093435710913 2016.9886936938033 0.0120617528380 0.0065934603083 -0.0032637855860 -0.0184860248562 1156.6941780622435 2016.9674742350060 - path.cubicTo(1156.7214355468750, 2016.9952392578125, 1156.6909179687500, 2016.9489746093750, 1156.6942138671875, 2016.9675292968750); - // Segment 1156.6941780622435 2016.9674742350060 0.0118595244351 0.0220843520393 0.0028009248351 -0.0403311981485 1156.6974975466728 2017.0000000000000 - path.cubicTo(1156.7060546875000, 2016.9895019531250, 1156.7003173828125, 2016.9597167968750, 1156.6975097656250, 2017.0000000000000); - // split at 0.4572408795357 - // path.cubicTo(1156.6995849609375, 2016.9775390625000, 1156.7014160156250, 2016.9768066406250, 1156.7014160156250, 2016.9768066406250); - // path.cubicTo(1156.7014160156250, 2016.9769287109375, 1156.6989746093750, 2016.9781494140625, 1156.6975097656250, 2017.0000000000000); - // Segment 1156.6974975466728 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1158.0474975705147 2017.0000000000000 - path.lineTo(1158.0474853515625, 2017.0000000000000); - path.close(); - // start loop, contour: 13 - // Segment 1156.6848182678223 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2015.6466051936150 - path.moveTo(1156.6848144531250, 2015.6466064453125); - path.lineTo(1145.3381347656250, 2015.6466064453125); - // Segment 1145.3381097316742 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.9966052174568 - path.lineTo(1145.3381347656250, 2016.9965820312500); - // Segment 1145.3381097316742 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2016.9966052174568 - path.lineTo(1156.6848144531250, 2016.9965820312500); - // Segment 1156.6848182678223 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2015.6466051936150 - path.lineTo(1156.6848144531250, 2015.6466064453125); - path.close(); - // start loop, contour: 14 - // Segment 1145.8121519375022 2016.8021351246741 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220237907 2014.8347900061515 - path.moveTo(1145.8121337890625, 2016.8021240234375); - path.lineTo(1147.8063964843750, 2014.8348388671875); - // Segment 1147.8064220237907 2014.8347900061515 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583376121346 2013.8737301678750 - path.lineTo(1146.8583984375000, 2013.8737792968750); - // Segment 1146.8583376121346 2013.8737301678750 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675258462 2015.8410752863977 - path.lineTo(1144.8640136718750, 2015.8410644531250); - // Segment 1144.8640675258462 2015.8410752863977 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8121519375022 2016.8021351246741 - path.lineTo(1145.8121337890625, 2016.8021240234375); - path.close(); - // start loop, contour: 15 - // Segment 1147.8064220516883 2014.8347899786306 0.5430154146087 -0.5356841365729 0.5430154146087 0.5356841365729 1147.8064220516883 2012.9239773430752 - path.moveTo(1147.8063964843750, 2014.8348388671875); - path.cubicTo(1148.3494873046875, 2014.2990722656250, 1148.3494873046875, 2013.4597167968750, 1147.8063964843750, 2012.9239501953125); - // Segment 1147.8064220516883 2012.9239773430752 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2013.8850371263100 - path.lineTo(1146.8583984375000, 2013.8850097656250); - // Segment 1146.8583375842370 2013.8850371263100 0.0071280060876 0.0070317705240 0.0071280060876 -0.0070317705240 1146.8583375842370 2013.8737301953959 - path.cubicTo(1146.8654785156250, 2013.8920898437500, 1146.8654785156250, 2013.8666992187500, 1146.8583984375000, 2013.8737792968750); - // Segment 1146.8583375842370 2013.8737301953959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2014.8347899786306 - path.lineTo(1147.8063964843750, 2014.8348388671875); - path.close(); - // start loop, contour: 16 - // Segment 1147.8064220516883 2012.9239773430752 -0.5379138488298 -0.5306514472866 0.5379138488298 -0.5306514472866 1145.8955864341058 2012.9239773430752 - path.moveTo(1147.8063964843750, 2012.9239501953125); - path.cubicTo(1147.2685546875000, 2012.3933105468750, 1146.4334716796875, 2012.3933105468750, 1145.8956298828125, 2012.9239501953125); - // Segment 1145.8955864341058 2012.9239773430752 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436709015571 2013.8850371263100 - path.lineTo(1146.8436279296875, 2013.8850097656250); - // Segment 1146.8436709015571 2013.8850371263100 0.0122295718664 -0.0120644598103 -0.0122295718664 -0.0120644598103 1146.8583375842370 2013.8850371263100 - path.cubicTo(1146.8559570312500, 2013.8729248046875, 1146.8460693359375, 2013.8729248046875, 1146.8583984375000, 2013.8850097656250); - // Segment 1146.8583375842370 2013.8850371263100 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2012.9239773430752 - path.lineTo(1147.8063964843750, 2012.9239501953125); - path.close(); - // start loop, contour: 17 - // Segment 1145.8955864579798 2012.9239773195236 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615803600 2016.0445936810224 - path.moveTo(1145.8956298828125, 2012.9239501953125); - path.lineTo(1142.7322998046875, 2016.0445556640625); - // Segment 1142.7322615803600 2016.0445936810224 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460000633 2017.0056535113604 - path.lineTo(1143.6802978515625, 2017.0056152343750); - // Segment 1143.6803460000633 2017.0056535113604 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708776831 2013.8850371498615 - path.lineTo(1146.8436279296875, 2013.8850097656250); - // Segment 1146.8436708776831 2013.8850371498615 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864579798 2012.9239773195236 - path.lineTo(1145.8956298828125, 2012.9239501953125); - path.close(); - // start loop, contour: 18 - // Segment 1142.7322615564860 2016.0445937045740 -0.0343838913237 0.0339196727021 0.0561572931720 -0.0710493024751 1142.5744069596683 2016.2183613784646 - path.moveTo(1142.7322998046875, 2016.0445556640625); - path.cubicTo(1142.6978759765625, 2016.0784912109375, 1142.6306152343750, 2016.1473388671875, 1142.5744628906250, 2016.2183837890625); - // Segment 1142.5744069596683 2016.2183613784646 -0.0547779032556 0.0720510806539 0.0000000000000 -0.2570904015602 1142.3937679156661 2016.7286419868469 - path.cubicTo(1142.5196533203125, 2016.2904052734375, 1142.3937988281250, 2016.4715576171875, 1142.3937988281250, 2016.7286376953125); - // Segment 1142.3937679156661 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2016.7286419868469 - path.lineTo(1143.7437744140625, 2016.7286376953125); - // Segment 1143.7437679395080 2016.7286419868469 -0.0051909534315 0.0665915567290 0.0133980913650 -0.0361675066532 1143.6976291086639 2016.9514128270803 - path.cubicTo(1143.7385253906250, 2016.7952880859375, 1143.7110595703125, 2016.9152832031250, 1143.6976318359375, 2016.9514160156250); - // Segment 1143.6976291086639 2016.9514128270803 -0.0142876819622 0.0277028472317 0.0040377216094 -0.0063254385208 1143.6490888124401 2017.0354042045738 - path.cubicTo(1143.6833496093750, 2016.9791259765625, 1143.6530761718750, 2017.0290527343750, 1143.6490478515625, 2017.0354003906250); - // Segment 1143.6490888124401 2017.0354042045738 -0.0045813437564 0.0032098513409 -0.0343840362634 0.0339198156850 1143.6803460239373 2017.0056534878088 - path.cubicTo(1143.6445312500000, 2017.0385742187500, 1143.6459960937500, 2017.0395507812500, 1143.6802978515625, 2017.0056152343750); - // Segment 1143.6803460239373 2017.0056534878088 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615564860 2016.0445937045740 - path.lineTo(1142.7322998046875, 2016.0445556640625); - path.close(); - // start loop, contour: 19 - // Segment 1142.5947256938614 2016.2481120952295 -0.1857487117715 0.1832409092043 0.0167379373694 -0.0990717748979 1142.3430278987244 2016.7518748698508 - path.moveTo(1142.5947265625000, 2016.2481689453125); - path.cubicTo(1142.4089355468750, 2016.4313964843750, 1142.3597412109375, 2016.6528320312500, 1142.3430175781250, 2016.7518310546875); - // Segment 1142.3430278987244 2016.7518748698508 -0.0156657977007 0.1069052535795 0.0000000000000 -0.0339197441936 1142.3249999880791 2017.0000000000000 - path.cubicTo(1142.3273925781250, 2016.8587646484375, 1142.3249511718750, 2016.9660644531250, 1142.3249511718750, 2017.0000000000000); - // Segment 1142.3249999880791 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6750000119209 2017.0000000000000 - path.lineTo(1143.6750488281250, 2017.0000000000000); - // Segment 1143.6750000119209 2017.0000000000000 0.0000000000000 -0.0339197441936 -0.0015261841961 -0.0051459911965 1143.6741640831724 2016.9767671169961 - path.cubicTo(1143.6750488281250, 2016.9660644531250, 1143.6726074218750, 2016.9716796875000, 1143.6741943359375, 2016.9768066406250); - // Segment 1143.6741640831724 2016.9767671169961 -0.0007886982052 0.0013596649622 0.0074114058388 -0.0224954551713 1143.6525251830094 2017.0486861571169 - path.cubicTo(1143.6733398437500, 2016.9781494140625, 1143.6599121093750, 2017.0262451171875, 1143.6524658203125, 2017.0487060546875); - // split at 0.4203657805920 - // path.cubicTo(1143.6738281250000, 2016.9774169921875, 1143.6712646484375, 2016.9862060546875, 1143.6678466796875, 2016.9979248046875); - // path.cubicTo(1143.6630859375000, 2017.0140380859375, 1143.6567382812500, 2017.0356445312500, 1143.6524658203125, 2017.0487060546875); - // Segment 1143.6525251830094 2017.0486861571169 -0.0119644334077 0.0236755853369 0.0381324473830 -0.0447670202574 1143.5428101613127 2017.2091718784643 - path.cubicTo(1143.6405029296875, 2017.0723876953125, 1143.5809326171875, 2017.1644287109375, 1143.5428466796875, 2017.2092285156250); - // Segment 1143.5428101613127 2017.2091718784643 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.5947256938614 2016.2481120952295 - path.lineTo(1142.5947265625000, 2016.2481689453125); - path.close(); - // start loop, contour: 20 - // Segment 1142.3249999880791 2017.0000000000000 0.0000000000000 0.0339197441936 -0.0156657977007 -0.1069052535795 1142.3430278987244 2017.2481251301492 - path.moveTo(1142.3249511718750, 2017.0000000000000); - path.cubicTo(1142.3249511718750, 2017.0339355468750, 1142.3273925781250, 2017.1412353515625, 1142.3430175781250, 2017.2481689453125); - // Segment 1142.3430278987244 2017.2481251301492 0.0167379373694 0.0990717748979 -0.1857487117715 -0.1832409092043 1142.5947256938614 2017.7518879047705 - path.cubicTo(1142.3597412109375, 2017.3471679687500, 1142.4089355468750, 2017.5686035156250, 1142.5947265625000, 2017.7518310546875); - // split at 0.4008532166481 - // path.cubicTo(1142.3497314453125, 2017.2878417968750, 1142.3616943359375, 2017.3471679687500, 1142.3854980468750, 2017.4158935546875); - // path.cubicTo(1142.4211425781250, 2017.5185546875000, 1142.4833984375000, 2017.6420898437500, 1142.5947265625000, 2017.7518310546875); - // Segment 1142.5947256938614 2017.7518879047705 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.5428101613127 2016.7908281215357 - path.lineTo(1143.5428466796875, 2016.7907714843750); - // Segment 1143.5428101613127 2016.7908281215357 0.0381324473830 0.0447670202574 -0.0119644334077 -0.0236755853369 1143.6525251830094 2016.9513138428831 - path.cubicTo(1143.5809326171875, 2016.8355712890625, 1143.6405029296875, 2016.9276123046875, 1143.6524658203125, 2016.9512939453125); - // Segment 1143.6525251830094 2016.9513138428831 0.0074114058388 0.0224954551713 -0.0007886982052 -0.0013596649622 1143.6741640831724 2017.0232328830039 - path.cubicTo(1143.6599121093750, 2016.9737548828125, 1143.6733398437500, 2017.0218505859375, 1143.6741943359375, 2017.0231933593750); - // Segment 1143.6741640831724 2017.0232328830039 -0.0015261841961 0.0051459911965 0.0000000000000 0.0339197441936 1143.6750000119209 2017.0000000000000 - path.cubicTo(1143.6726074218750, 2017.0283203125000, 1143.6750488281250, 2017.0339355468750, 1143.6750488281250, 2017.0000000000000); - // Segment 1143.6750000119209 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.3249999880791 2017.0000000000000 - path.lineTo(1142.3249511718750, 2017.0000000000000); - path.close(); - // start loop, contour: 21 - // Segment 1142.5947256938614 2017.7518879047705 -0.0799271403989 -0.1522613934208 -0.2174629955730 -0.2879403701950 1142.7322615564860 2017.9554062954260 - path.moveTo(1142.5947265625000, 2017.7518310546875); - path.cubicTo(1142.5147705078125, 2017.5996093750000, 1142.5147705078125, 2017.6674804687500, 1142.7322998046875, 2017.9554443359375); - // Segment 1142.7322615564860 2017.9554062954260 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460239373 2016.9943465121912 - path.lineTo(1143.6802978515625, 2016.9943847656250); - // Segment 1143.6803460239373 2016.9943465121912 0.0799271403989 0.1522613934208 0.2174629955730 0.2879403701950 1143.5428101613127 2016.7908281215357 - path.cubicTo(1143.7602539062500, 2017.1466064453125, 1143.7602539062500, 2017.0787353515625, 1143.5428466796875, 2016.7907714843750); - // Segment 1143.5428101613127 2016.7908281215357 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.5947256938614 2017.7518879047705 - path.lineTo(1142.5947265625000, 2017.7518310546875); - path.close(); - // start loop, contour: 22 - // Segment 1142.7322615746241 2017.9554063133189 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864522438 2021.0760227493236 - path.moveTo(1142.7322998046875, 2017.9554443359375); - path.lineTo(1145.8956298828125, 2021.0760498046875); - // Segment 1145.8955864522438 2021.0760227493236 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708834190 2020.1149629303029 - path.lineTo(1146.8436279296875, 2020.1149902343750); - // Segment 1146.8436708834190 2020.1149629303029 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460057993 2016.9943464942983 - path.lineTo(1143.6802978515625, 2016.9943847656250); - // Segment 1143.6803460057993 2016.9943464942983 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615746241 2017.9554063133189 - path.lineTo(1142.7322998046875, 2017.9554443359375); - path.close(); - // start loop, contour: 23 - // Segment 1145.8955864341058 2021.0760227314306 0.2730164534637 0.2693304447891 -0.3016608168437 0.0000000000000 1146.8510041236877 2021.4740112423897 - path.moveTo(1145.8956298828125, 2021.0760498046875); - path.cubicTo(1146.1685791015625, 2021.3453369140625, 1146.5493164062500, 2021.4739990234375, 1146.8509521484375, 2021.4739990234375); - // Segment 1146.8510041236877 2021.4740112423897 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8510041236877 2020.1240112185478 - path.lineTo(1146.8509521484375, 2020.1240234375000); - // Segment 1146.8510041236877 2020.1240112185478 -0.0031276099109 0.0031991747760 0.0281856144058 0.0140930868099 1146.8580791488898 2020.1202473991566 - path.cubicTo(1146.8479003906250, 2020.1271972656250, 1146.8862304687500, 2020.1343994140625, 1146.8580322265625, 2020.1202392578125); - // split at 0.3845077157021 - // path.cubicTo(1146.8497314453125, 2020.1252441406250, 1146.8547363281250, 2020.1270751953125, 1146.8596191406250, 2020.1280517578125); - // path.cubicTo(1146.8675537109375, 2020.1296386718750, 1146.8753662109375, 2020.1289062500000, 1146.8580322265625, 2020.1202392578125); - // Segment 1146.8580791488898 2020.1202473991566 -0.0369995545027 -0.0123195805663 0.0067223483810 0.0136883790721 1146.8436709015571 2020.1149629481959 - path.cubicTo(1146.8210449218750, 2020.1079101562500, 1146.8503417968750, 2020.1286621093750, 1146.8436279296875, 2020.1149902343750); - // Segment 1146.8436709015571 2020.1149629481959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864341058 2021.0760227314306 - path.lineTo(1145.8956298828125, 2021.0760498046875); - path.close(); - // start loop, contour: 24 - // Segment 1146.8510041236877 2021.4740112423897 0.3016605789999 0.0000000000000 -0.2730166120260 0.2693306012106 1147.8064220516883 2021.0760227314306 - path.moveTo(1146.8509521484375, 2021.4739990234375); - path.cubicTo(1147.1527099609375, 2021.4739990234375, 1147.5334472656250, 2021.3453369140625, 1147.8063964843750, 2021.0760498046875); - // Segment 1147.8064220516883 2021.0760227314306 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2020.1149629481959 - path.lineTo(1146.8583984375000, 2020.1149902343750); - // Segment 1146.8583375842370 2020.1149629481959 -0.0067222671256 0.0136883164611 0.0369996293611 -0.0123196021258 1146.8439293663473 2020.1202473404985 - path.cubicTo(1146.8515625000000, 2020.1286621093750, 1146.8809814453125, 2020.1079101562500, 1146.8438720703125, 2020.1202392578125); - // Segment 1146.8439293663473 2020.1202473404985 -0.0281857033438 0.0140931104690 0.0031276541428 0.0031991704542 1146.8510041236877 2020.1240112185478 - path.cubicTo(1146.8157958984375, 2020.1343994140625, 1146.8541259765625, 2020.1271972656250, 1146.8509521484375, 2020.1240234375000); - // Segment 1146.8510041236877 2020.1240112185478 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8510041236877 2021.4740112423897 - path.lineTo(1146.8509521484375, 2021.4739990234375); - path.close(); - // start loop, contour: 25 - // Segment 1147.8064220516883 2021.0760227314306 0.5430154146087 -0.5356841365729 0.5430154146087 0.5356841365729 1147.8064220516883 2019.1652101405787 - path.moveTo(1147.8063964843750, 2021.0760498046875); - path.cubicTo(1148.3494873046875, 2020.5402832031250, 1148.3494873046875, 2019.7009277343750, 1147.8063964843750, 2019.1651611328125); - // Segment 1147.8064220516883 2019.1652101405787 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2020.1262699238134 - path.lineTo(1146.8583984375000, 2020.1262207031250); - // Segment 1146.8583375842370 2020.1262699238134 0.0071280060876 0.0070317705240 0.0071280060876 -0.0070317705240 1146.8583375842370 2020.1149629481959 - path.cubicTo(1146.8654785156250, 2020.1333007812500, 1146.8654785156250, 2020.1079101562500, 1146.8583984375000, 2020.1149902343750); - // Segment 1146.8583375842370 2020.1149629481959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2021.0760227314306 - path.lineTo(1147.8063964843750, 2021.0760498046875); - path.close(); - // start loop, contour: 26 - // Segment 1147.8064220383478 2019.1652101274185 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8121519520594 2017.1978648896866 - path.moveTo(1147.8063964843750, 2019.1651611328125); - path.lineTo(1145.8121337890625, 2017.1978759765625); - // Segment 1145.8121519520594 2017.1978648896866 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675112890 2018.1589246992417 - path.lineTo(1144.8640136718750, 2018.1589355468750); - // Segment 1144.8640675112890 2018.1589246992417 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375975775 2020.1262699369736 - path.lineTo(1146.8583984375000, 2020.1262207031250); - // Segment 1146.8583375975775 2020.1262699369736 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220383478 2019.1652101274185 - path.lineTo(1147.8063964843750, 2019.1651611328125); - path.close(); - -testSimplify(reporter, path, filename); -} - -static void testQuads66(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(2, 0); - path.quadTo(3, 1, 2, 2); - path.lineTo(2, 3); - path.close(); - path.moveTo(2, 1); - path.lineTo(2, 1); - path.quadTo(1, 2, 2, 2); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads67(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(3, 2); - path.quadTo(1, 3, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(1, 0); - path.quadTo(2, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads68(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(1, 2); - path.quadTo(0, 3, 2, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(0, 1); - path.quadTo(1, 3, 2, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads69(skiatest::Reporter* reporter,const char* filename) { - SkPath path; - path.moveTo(1, 0); - path.quadTo(2, 2, 2, 3); - path.lineTo(2, 3); - path.close(); - path.moveTo(1, 0); - path.lineTo(1, 0); - path.quadTo(3, 0, 1, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads70(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 1); - path.quadTo(2, 3, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(2, 0); - path.lineTo(2, 2); - path.quadTo(1, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads71(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 1); - path.quadTo(2, 3, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(3, 0); - path.lineTo(2, 2); - path.quadTo(1, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads72(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(1, 1); - path.quadTo(2, 3, 3, 3); - path.lineTo(3, 3); - path.close(); - path.moveTo(0, 1); - path.lineTo(2, 2); - path.quadTo(1, 3, 3, 3); - path.close(); - testSimplify(reporter, path, filename); -} - -static void testQuads73(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.moveTo(0, 0); - path.quadTo(0, 1, 1, 2); - path.lineTo(0, 3); - path.close(); - path.moveTo(0, 0); - path.lineTo(0, 0); - path.quadTo(0, 1, 1, 1); - path.close(); - testSimplify(reporter, path, filename); -} - -static void bug5169(skiatest::Reporter* reporter, const char* filename) { - SkPath path; -path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 0, 64.8889f -path.cubicTo(SkBits2Float(0x434e0000), SkBits2Float(0x4281c71c), SkBits2Float(0x00000000), SkBits2Float(0xc2a238e4), SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 206, 64.8889f, 0, -81.1111f, 0, 64.8889f -path.moveTo(SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // 176, 18.8889f -path.cubicTo(SkBits2Float(0xc29e0000), SkBits2Float(0xc25c71c7), SkBits2Float(0x42b20000), SkBits2Float(0x42fbc71c), SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // -79, -55.1111f, 89, 125.889f, 176, 18.8889f - testSimplify(reporter, path, filename); -} - -static void tiger8_393(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666)); // 92.6f, 427.3f -path.cubicTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666), SkBits2Float(0x42b5cccd), SkBits2Float(0x43da1999), SkBits2Float(0x42b80000), SkBits2Float(0x43ddf333)); // 92.6f, 427.3f, 90.9f, 436.2f, 92, 443.9f -path.cubicTo(SkBits2Float(0x42b80000), SkBits2Float(0x43ddf333), SkBits2Float(0x42b30000), SkBits2Float(0x43e17333), SkBits2Float(0x42cf999a), SkBits2Float(0x43e1b333)); // 92, 443.9f, 89.5f, 450.9f, 103.8f, 451.4f -path.cubicTo(SkBits2Float(0x42ec3334), SkBits2Float(0x43e14ccd), SkBits2Float(0x42e73334), SkBits2Float(0x43ddf333), SkBits2Float(0x42e73334), SkBits2Float(0x43ddf333)); // 118.1f, 450.6f, 115.6f, 443.9f, 115.6f, 443.9f -path.cubicTo(SkBits2Float(0x42e7999a), SkBits2Float(0x43de8000), SkBits2Float(0x42ea6667), SkBits2Float(0x43db4000), SkBits2Float(0x42e60001), SkBits2Float(0x43d5a666)); // 115.8f, 445, 117.2f, 438.5f, 115, 427.3f - testSimplify(reporter, path, filename); -} - -// triggers angle assert from distance field code -static void carsvg_1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 462.82f -path.cubicTo(SkBits2Float(0x4396b50e), SkBits2Float(0x43e63c20), SkBits2Float(0x43998931), SkBits2Float(0x43e6c43e), SkBits2Float(0x439cb6a8), SkBits2Float(0x43e70ef9)); // 301.414f, 460.47f, 307.072f, 461.533f, 313.427f, 462.117f -path.cubicTo(SkBits2Float(0x439dfc1e), SkBits2Float(0x43e72ce0), SkBits2Float(0x439a285c), SkBits2Float(0x43e717fb), SkBits2Float(0x4398e23c), SkBits2Float(0x43e7027c)); // 315.97f, 462.351f, 308.315f, 462.187f, 305.767f, 462.019f -path.cubicTo(SkBits2Float(0x4398136f), SkBits2Float(0x43e6f4db), SkBits2Float(0x439a7e14), SkBits2Float(0x43e6d390), SkBits2Float(0x439b4ba9), SkBits2Float(0x43e6b956)); // 304.152f, 461.913f, 308.985f, 461.653f, 310.591f, 461.448f -path.cubicTo(SkBits2Float(0x439c2b19), SkBits2Float(0x43e68603), SkBits2Float(0x43abf4df), SkBits2Float(0x43e9ca9e), SkBits2Float(0x43a1daea), SkBits2Float(0x43e912a5)); // 312.337f, 461.047f, 343.913f, 467.583f, 323.71f, 466.146f -path.cubicTo(SkBits2Float(0x43a4f45a), SkBits2Float(0x43e78baf), SkBits2Float(0x43a2a391), SkBits2Float(0x43e86a82), SkBits2Float(0x43a946bd), SkBits2Float(0x43e90c56)); // 329.909f, 463.091f, 325.278f, 464.832f, 338.553f, 466.096f -path.lineTo(SkBits2Float(0x43a4250b), SkBits2Float(0x43e998dc)); // 328.289f, 467.194f -path.cubicTo(SkBits2Float(0x43a8a9c8), SkBits2Float(0x43e8f06c), SkBits2Float(0x43a95cb5), SkBits2Float(0x43e84ea6), SkBits2Float(0x43a6f7c1), SkBits2Float(0x43e9bdb5)); // 337.326f, 465.878f, 338.724f, 464.614f, 333.936f, 467.482f -path.cubicTo(SkBits2Float(0x43a59ed0), SkBits2Float(0x43e9d2ca), SkBits2Float(0x4395ea4d), SkBits2Float(0x43e92afe), SkBits2Float(0x43a06569), SkBits2Float(0x43e7773d)); // 331.241f, 467.647f, 299.83f, 466.336f, 320.792f, 462.932f -path.cubicTo(SkBits2Float(0x438bf0ff), SkBits2Float(0x43ea0fef), SkBits2Float(0x43a0e17a), SkBits2Float(0x43e5f41b), SkBits2Float(0x4398f3fb), SkBits2Float(0x43e804c8)); // 279.883f, 468.124f, 321.762f, 459.907f, 305.906f, 464.037f -path.lineTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 462.82f -path.close(); - - testSimplify(reporter, path, filename); -} - -static void simplifyTest_1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); -path.moveTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 119.752f -path.quadTo(SkBits2Float(0x42c26810), SkBits2Float(0x42e214b8), SkBits2Float(0x42cdcad5), SkBits2Float(0x42d82aa2)); // 97.2032f, 113.04f, 102.896f, 108.083f -path.lineTo(SkBits2Float(0x42cdcb21), SkBits2Float(0x42d82a61)); // 102.897f, 108.083f -path.quadTo(SkBits2Float(0x42d5e3c8), SkBits2Float(0x42d12140), SkBits2Float(0x42e20ee8), SkBits2Float(0x42cdc937)); // 106.945f, 104.565f, 113.029f, 102.893f -path.lineTo(SkBits2Float(0x42e256e3), SkBits2Float(0x42cdbc92)); // 113.17f, 102.868f -path.lineTo(SkBits2Float(0x42f5eadb), SkBits2Float(0x42cc2cb3)); // 122.959f, 102.087f -path.lineTo(SkBits2Float(0x42f746a6), SkBits2Float(0x42cccf85)); // 123.638f, 102.405f -path.quadTo(SkBits2Float(0x42fa586c), SkBits2Float(0x42d126c4), SkBits2Float(0x42f6c657), SkBits2Float(0x42d5d315)); // 125.173f, 104.576f, 123.387f, 106.912f -path.lineTo(SkBits2Float(0x42f591eb), SkBits2Float(0x42d4e76d)); // 122.785f, 106.452f -path.lineTo(SkBits2Float(0x42f6c6e0), SkBits2Float(0x42d5d261)); // 123.388f, 106.911f -path.quadTo(SkBits2Float(0x42f6bb33), SkBits2Float(0x42d5e1bb), SkBits2Float(0x42f6a3d8), SkBits2Float(0x42d6007c)); // 123.366f, 106.941f, 123.32f, 107.001f -path.quadTo(SkBits2Float(0x42ea3850), SkBits2Float(0x42e65af0), SkBits2Float(0x42d97a6e), SkBits2Float(0x42ed841c)); // 117.11f, 115.178f, 108.739f, 118.758f -path.lineTo(SkBits2Float(0x42d91d92), SkBits2Float(0x42ed9ec0)); // 108.558f, 118.81f -path.lineTo(SkBits2Float(0x42c1a959), SkBits2Float(0x42f146b0)); // 96.8308f, 120.638f -path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80f0)); // 95.9684f, 119.752f -path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 119.752f -path.close(); -path.moveTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 120.026f -path.lineTo(SkBits2Float(0x42c16d91), SkBits2Float(0x42efc72c)); // 96.714f, 119.889f -path.lineTo(SkBits2Float(0x42c131c9), SkBits2Float(0x42ee47a8)); // 96.5972f, 119.14f -path.lineTo(SkBits2Float(0x42d8a602), SkBits2Float(0x42ea9fb8)); // 108.324f, 117.312f -path.lineTo(SkBits2Float(0x42d8e1ca), SkBits2Float(0x42ec1f3c)); // 108.441f, 118.061f -path.lineTo(SkBits2Float(0x42d84926), SkBits2Float(0x42eaba5c)); // 108.143f, 117.364f -path.quadTo(SkBits2Float(0x42e84a40), SkBits2Float(0x42e3e1f0), SkBits2Float(0x42f439a2), SkBits2Float(0x42d42af8)); // 116.145f, 113.941f, 122.113f, 106.084f -path.quadTo(SkBits2Float(0x42f45121), SkBits2Float(0x42d40c08), SkBits2Float(0x42f45cf6), SkBits2Float(0x42d3fc79)); // 122.158f, 106.023f, 122.182f, 105.993f -path.lineTo(SkBits2Float(0x42f45d7f), SkBits2Float(0x42d3fbc5)); // 122.183f, 105.992f -path.quadTo(SkBits2Float(0x42f69510), SkBits2Float(0x42d114f4), SkBits2Float(0x42f4ccce), SkBits2Float(0x42ce8fb7)); // 123.291f, 104.541f, 122.4f, 103.281f -path.lineTo(SkBits2Float(0x42f609ba), SkBits2Float(0x42cdaf9e)); // 123.019f, 102.843f -path.lineTo(SkBits2Float(0x42f62899), SkBits2Float(0x42cf3289)); // 123.079f, 103.599f -path.lineTo(SkBits2Float(0x42e294a1), SkBits2Float(0x42d0c268)); // 113.29f, 104.38f -path.lineTo(SkBits2Float(0x42e275c2), SkBits2Float(0x42cf3f7d)); // 113.23f, 103.624f -path.lineTo(SkBits2Float(0x42e2dc9c), SkBits2Float(0x42d0b5c3)); // 113.431f, 104.355f -path.quadTo(SkBits2Float(0x42d75bb8), SkBits2Float(0x42d3df08), SkBits2Float(0x42cfc853), SkBits2Float(0x42da7457)); // 107.679f, 105.936f, 103.891f, 109.227f -path.lineTo(SkBits2Float(0x42cec9ba), SkBits2Float(0x42d94f5c)); // 103.394f, 108.655f -path.lineTo(SkBits2Float(0x42cfc89f), SkBits2Float(0x42da7416)); // 103.892f, 109.227f -path.quadTo(SkBits2Float(0x42c53268), SkBits2Float(0x42e3ac00), SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d67)); // 98.5984f, 113.836f, 97.4596f, 120.026f -path.lineTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 120.026f -path.close(); - - testSimplify(reporter, path, filename); -} -
-static void joel_1(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); +/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#include "PathOpsExtendedTest.h"
+
+#define TEST(name) { name, #name }
+
+static void testLine1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2,0);
+ path.lineTo(1,1);
+ path.lineTo(0,0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine1x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(2,0);
+ path.lineTo(1,1);
+ path.lineTo(0,0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void addInnerCWTriangle(SkPath& path) {
+ path.moveTo(3,0);
+ path.lineTo(4,1);
+ path.lineTo(2,1);
+ path.close();
+}
+
+static void addInnerCCWTriangle(SkPath& path) {
+ path.moveTo(3,0);
+ path.lineTo(2,1);
+ path.lineTo(4,1);
+ path.close();
+}
+
+static void addOuterCWTriangle(SkPath& path) {
+ path.moveTo(3,0);
+ path.lineTo(6,2);
+ path.lineTo(0,2);
+ path.close();
+}
+
+static void addOuterCCWTriangle(SkPath& path) {
+ path.moveTo(3,0);
+ path.lineTo(0,2);
+ path.lineTo(6,2);
+ path.close();
+}
+
+static void testLine2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addInnerCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine2x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addInnerCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addInnerCCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine3x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addInnerCCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine3a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addInnerCWTriangle(path);
+ addOuterCCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine3ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addInnerCWTriangle(path);
+ addOuterCCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine3b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addInnerCCWTriangle(path);
+ addOuterCCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine3bx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addInnerCCWTriangle(path);
+ addOuterCCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addOuterCCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine4x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addOuterCCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addOuterCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine5x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addOuterCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(2,0);
+ path.lineTo(6,0);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine6x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(2,0);
+ path.lineTo(6,0);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(6,0);
+ path.lineTo(2,0);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine7x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(6,0);
+ path.lineTo(2,0);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine7a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.lineTo(2,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine7ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.lineTo(2,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine7b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.close();
+ path.moveTo(6,0);
+ path.lineTo(2,0);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine7bx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,0);
+ path.lineTo(4,0);
+ path.close();
+ path.moveTo(6,0);
+ path.lineTo(2,0);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,4);
+ path.lineTo(4,4);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(2,4);
+ path.lineTo(6,4);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine8x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,4);
+ path.lineTo(4,4);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(2,4);
+ path.lineTo(6,4);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine9(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,4);
+ path.lineTo(4,4);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(6,4);
+ path.lineTo(2,4);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine9x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,4);
+ path.lineTo(4,4);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(6,4);
+ path.lineTo(2,4);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine10(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,4);
+ path.lineTo(4,4);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(2,1);
+ path.lineTo(3,4);
+ path.lineTo(6,1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine10x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,4);
+ path.lineTo(4,4);
+ path.lineTo(2,2);
+ path.close();
+ path.moveTo(2,1);
+ path.lineTo(3,4);
+ path.lineTo(6,1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine10a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,4);
+ path.lineTo(8,4);
+ path.lineTo(4,0);
+ path.close();
+ path.moveTo(2,2);
+ path.lineTo(3,3);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine10ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0,4);
+ path.lineTo(8,4);
+ path.lineTo(4,0);
+ path.close();
+ path.moveTo(2,2);
+ path.lineTo(3,3);
+ path.lineTo(4,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void addCWContainer(SkPath& path) {
+ path.moveTo(6,4);
+ path.lineTo(0,4);
+ path.lineTo(3,1);
+ path.close();
+}
+
+static void addCCWContainer(SkPath& path) {
+ path.moveTo(0,4);
+ path.lineTo(6,4);
+ path.lineTo(3,1);
+ path.close();
+}
+
+static void addCWContents(SkPath& path) {
+ path.moveTo(2,3);
+ path.lineTo(3,2);
+ path.lineTo(4,3);
+ path.close();
+}
+
+static void addCCWContents(SkPath& path) {
+ path.moveTo(3,2);
+ path.lineTo(2,3);
+ path.lineTo(4,3);
+ path.close();
+}
+
+static void testLine11(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addCWContainer(path);
+ addCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine11x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addCWContainer(path);
+ addCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine12(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addCCWContainer(path);
+ addCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine12x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addCCWContainer(path);
+ addCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine13(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addCWContainer(path);
+ addCCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine13x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addCWContainer(path);
+ addCCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine14(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ addCCWContainer(path);
+ addCCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine14x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ addCCWContainer(path);
+ addCCWContents(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine15(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine15x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine16(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine16x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine17(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine17x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine18(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine18x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine19(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine19x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine20(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine20x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine21(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine21x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine22(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine22x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine23(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine23x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine24a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2,0);
+ path.lineTo(4,4);
+ path.lineTo(0,4);
+ path.close();
+ path.moveTo(2,0);
+ path.lineTo(1,2);
+ path.lineTo(2,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine24ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(2,0);
+ path.lineTo(4,4);
+ path.lineTo(0,4);
+ path.close();
+ path.moveTo(2,0);
+ path.lineTo(1,2);
+ path.lineTo(2,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine24(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine24x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine25(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine25x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine26(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine26x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine27(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine27x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine28(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine28x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine29(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine29x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine30(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine30x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine31(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine31x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine32(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine32x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine33(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine33x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine34(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine34x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine35(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine35x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine36(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine36x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine37(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
+ path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine37x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
+ path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine38(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
+ path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine38x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
+ path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine40(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine40x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
+ path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine41(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine41x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine42(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine42x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine43(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine43x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine44(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine44x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine45(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine45x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine46(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
+ path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine46x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
+ path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine47(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine47x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine48(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine48x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine49(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine49x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine50(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine50x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine51(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine51x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine52(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine52x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine53(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine53x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine54(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
+ path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine54x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
+ path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine55(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
+ path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine55x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
+ path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine56(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
+ path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine56x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
+ path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine57(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
+ path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine57x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
+ path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine58(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
+ path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine58x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
+ path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine59(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
+ path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine59x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
+ path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine60(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine60x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine61(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine61x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine62(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine62x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine63(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine63x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine64(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine64x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine65(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
+ path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine65x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
+ path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine66(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
+ path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine66x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
+ path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine67(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine67x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
+ path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
+ path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68bx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68c(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
+ path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68cx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
+ path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68dx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68e(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68ex(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68f(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68fx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68g(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68gx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68h(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine68hx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
+ path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine69(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine69x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine70(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine70x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine71(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine71x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
+ path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
+ path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine72(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine72x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
+ path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine73(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine73x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
+ path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine74(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+ path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine74x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+ path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine75(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine75x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
+ path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine76(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
+ path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+ path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine76x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
+ path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+ path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine77(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
+ path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
+ path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine77x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
+ path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
+ path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine78(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
+ path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine78x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
+ path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine79(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
+ path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
+ path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine79x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
+ path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
+ path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine81(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(2, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(2, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate1x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(2, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(2, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate2x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.lineTo(1, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(3, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate3x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.lineTo(1, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(3, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerate4x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(2, 1);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate1x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(2, 1);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.lineTo(0, 1);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 2);
+ path.lineTo(0, 3);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate2x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 0);
+ path.lineTo(0, 1);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 2);
+ path.lineTo(0, 3);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 1);
+ path.lineTo(1, 1);
+ path.lineTo(0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate3x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 1);
+ path.lineTo(1, 1);
+ path.lineTo(0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.lineTo(0, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 2);
+ path.lineTo(0, 3);
+ path.lineTo(1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testNondegenerate4x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 0);
+ path.lineTo(0, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 2);
+ path.lineTo(0, 3);
+ path.lineTo(1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 2);
+ path.lineTo(3, 2);
+ path.lineTo(3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral5x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 2);
+ path.lineTo(3, 2);
+ path.lineTo(3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.lineTo(0, 2);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral6x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.lineTo(0, 2);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.lineTo(1 + 1.0f/3, 2.0f/3);
+ path.close();
+ path.moveTo(1 + 1.0f/3, 2.0f/3);
+ path.lineTo(0, 2);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.lineTo(1 + 1.0f/3, 2.0f/3);
+ path.close();
+ path.moveTo(1 + 1.0f/3, 2.0f/3);
+ path.lineTo(0, 2);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(0, 6);
+ path.lineTo(6, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(0, 6);
+ path.lineTo(6, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(6, 6);
+ path.lineTo(0, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6bx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(6, 6);
+ path.lineTo(0, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6c(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(3, 3);
+ path.lineTo(3, 0);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(0, 6);
+ path.lineTo(6, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6cx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(3, 3);
+ path.lineTo(3, 0);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(0, 6);
+ path.lineTo(6, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(3, 3);
+ path.lineTo(3, 0);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(6, 6);
+ path.lineTo(0, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testFauxQuadralateral6dx(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(3, 3);
+ path.lineTo(3, 0);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(4, 2);
+ path.close();
+ path.moveTo(4, 2);
+ path.lineTo(6, 6);
+ path.lineTo(0, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral6a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(0, 6);
+ path.lineTo(6, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(3, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(6, 0);
+ path.lineTo(0, 6);
+ path.lineTo(6, 6);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.lineTo(2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral7x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.lineTo(2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(3, 1);
+ path.lineTo(1, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(2, 1);
+ path.lineTo(0, 2);
+ path.lineTo(3, 2);
+ path.lineTo(2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral8x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(3, 1);
+ path.lineTo(1, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(2, 1);
+ path.lineTo(0, 2);
+ path.lineTo(3, 2);
+ path.lineTo(2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral9(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 2);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(2, 1);
+ path.lineTo(1, 3);
+ path.lineTo(2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral9x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(1, 2);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(2, 1);
+ path.lineTo(1, 3);
+ path.lineTo(2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine1a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine1ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine2ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
+ path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
+ path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine3aax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
+ path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine4ax(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+ path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(1, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic1x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(1, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(3, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic2x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(3, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic3x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic4x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(3, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 0, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic9(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(3, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(1, 2, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic14(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(3, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic15(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(0, 1);
+ path.quadTo(1, 1, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic17x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 3, 1);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(3, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic18(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic19(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic20(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic21(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic22(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 2, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic23(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 2, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic24(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(2, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic25(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 1);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic26(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 1);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic27(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 1);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic28(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 2);
+ path.quadTo(1, 2, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic29(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 2, 1);
+ path.lineTo(0, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic30(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 2);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic31(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 2);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic32(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 2, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic33(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.quadTo(2, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic34(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 0, 0, 1);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.quadTo(2, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic35(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(3, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic36(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 1, 2, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(3, 1);
+ path.lineTo(1, 2);
+ path.quadTo(3, 2, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic37(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 2, 1, 2);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(3, 1);
+ path.quadTo(0, 2, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic38(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 2);
+ path.quadTo(2, 2, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic51(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(369.863983f, 145.645813f);
+ path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f);
+ path.lineTo(369.863983f, 145.645813f);
+ path.close();
+ path.moveTo(369.970581f, 137.94342f);
+ path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f);
+ path.lineTo(369.970581f, 137.94342f);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic53(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(303.12088f, 141.299606f);
+ path.lineTo(330.463562f, 217.659027f);
+ path.lineTo(303.12088f, 141.299606f);
+ path.close();
+ path.moveTo(371.919067f, 205.854996f);
+ path.lineTo(326.236786f, 205.854996f);
+ path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
+ path.lineTo(371.919067f, 205.854996f);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic55(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+path.moveTo(303.12088f, 141.299606f);
+path.lineTo(330.463562f, 217.659027f);
+path.lineTo(358.606506f, 141.299606f);
+path.lineTo(303.12088f, 141.299606f);
+path.close();
+path.moveTo(326.236786f, 205.854996f);
+path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
+path.lineTo(326.236786f, 205.854996f);
+path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic56(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+path.moveTo(366.608826f, 151.196014f);
+path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f);
+path.lineTo(354.009216f, 208.816208f);
+path.lineTo(393.291473f, 102.232819f);
+path.lineTo(359.978058f, 136.581512f);
+path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f);
+path.lineTo(364.390686f, 157.898193f);
+path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f);
+path.lineTo(350, 120);
+path.lineTo(366.608826f, 151.196014f);
+path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine80(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+path.moveTo(4, 0);
+path.lineTo(3, 7);
+path.lineTo(7, 5);
+path.lineTo(2, 2);
+path.close();
+path.moveTo(0, 6);
+path.lineTo(6, 12);
+path.lineTo(8, 3);
+path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic58(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(283.714233f, 240);
+ path.lineTo(283.714233f, 141.299606f);
+ path.lineTo(303.12088f, 141.299606f);
+ path.lineTo(330.463562f, 217.659027f);
+ path.lineTo(358.606506f, 141.299606f);
+ path.lineTo(362.874634f, 159.705902f);
+ path.lineTo(335.665344f, 233.397751f);
+ path.lineTo(322.12738f, 233.397751f);
+ path.lineTo(295.718353f, 159.505829f);
+ path.lineTo(295.718353f, 240);
+ path.lineTo(283.714233f, 240);
+ path.close();
+ path.moveTo(322.935669f, 231.030273f);
+ path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f);
+ path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f);
+ path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f);
+ path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f);
+ path.lineTo(371.919067f, 205.854996f);
+ path.lineTo(326.236786f, 205.854996f);
+ path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
+ path.lineTo(322.935669f, 231.030273f);
+ path.close();
+ path.moveTo(326.837006f, 195.984955f);
+ path.lineTo(358.78125f, 195.984955f);
+ path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f);
+ path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic59x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(3, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic59(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(3, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic63(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 1);
+ path.quadTo(2, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic64(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(1, 2);
+ path.lineTo(2, 2);
+ path.quadTo(0, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic65(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(2, 1);
+ path.lineTo(2, 2);
+ path.quadTo(0, 3, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic67x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 1);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(1, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic68(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 2, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic69(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(1, 1);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic70x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 2, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic71(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 1, 3, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic72(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 2);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic73(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 0, 3);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic74(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 3);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic75(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic76(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 2);
+ path.quadTo(1, 2, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic77(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 1);
+ path.lineTo(3, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic78(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 2);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic79(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 1, 2);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(2, 2);
+ path.lineTo(0, 2);
+ path.lineTo(2, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.lineTo(0, 2);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 2);
+ path.lineTo(2, 0);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(2, 2);
+ path.lineTo(2, 0);
+ path.lineTo(0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.lineTo(1, 2);
+ path.lineTo(0, 2);
+ path.lineTo(2, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.lineTo(0, 2);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 1);
+ path.lineTo(2, 1);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(2, 2);
+ path.lineTo(2, 1);
+ path.lineTo(0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight9(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.lineTo(1, 2);
+ path.lineTo(2, 1);
+ path.lineTo(0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testEight10(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.lineTo(0, 1);
+ path.lineTo(2, 1);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic80(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(1, 0, 2, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(3, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic81(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 0, 1, 1);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic82(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 0, 1, 1);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic83(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 0);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(0, 1);
+ path.lineTo(0, 2);
+ path.quadTo(2, 2, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic84(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 0, 1, 1);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.quadTo(0, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic85(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(3, 0, 1, 1);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(3, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic86(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 1, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic87(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 1, 0, 2);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.quadTo(0, 2, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic88(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(2, 1, 0, 2);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.quadTo(0, 2, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic89x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(3, 1, 2, 2);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 1);
+ path.quadTo(3, 1, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic90x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(3, 0, 2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic91(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(3, 2, 2, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.quadTo(2, 1, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic92x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 0);
+ path.quadTo(3, 0, 2, 2);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+ path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82a(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82c(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82d(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82e(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82f(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82g(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine82h(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
+ path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
+ path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine83(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction);
+path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction);
+path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine84(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
+ path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
+ path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine84x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
+ path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction);
+ path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction);
+ path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testLine85(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction);
+ path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
+ path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 1);
+ path.lineTo(2, 2);
+ path.lineTo(2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testCubic1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.cubicTo(0, 1, 1, 1, 1, 0);
+ path.close();
+ path.moveTo(1, 0);
+ path.cubicTo(0, 0, 0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic93(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(3, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.quadTo(1, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testCubic2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,2);
+ path.cubicTo(0,3, 2,1, 4,0);
+ path.close();
+ path.moveTo(1,2);
+ path.cubicTo(0,4, 2,0, 3,0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0,0);
+ path.quadTo(0,0, 0,1);
+ path.lineTo(1,1);
+ path.close();
+ path.moveTo(0,0);
+ path.quadTo(1,1, 0,2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(2, 2);
+ path.lineTo(0, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(3, 0);
+ path.lineTo(0, 1);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic94(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(8, 8);
+ path.quadTo(8, 4, 4, 4);
+ path.quadTo(4, 0, 0, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic95(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(8, 8);
+ path.lineTo(0, 0);
+ path.quadTo(4, 0, 4, 4);
+ path.quadTo(8, 4, 8, 8);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic96(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(8, 0);
+ path.lineTo(0, 8);
+ path.quadTo(0, 4, 4, 4);
+ path.quadTo(4, 0, 8, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadratic97(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 8);
+ path.lineTo(8, 0);
+ path.quadTo(4, 0, 4, 4);
+ path.quadTo(0, 4, 0, 8);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testTriangles1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 2);
+ path.lineTo(1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testTriangles2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(2, 3);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+// A test for this case:
+// contourA has two segments that are coincident
+// contourB has two segments that are coincident in the same place
+// each ends up with +2/0 pairs for winding count
+// since logic in OpSegment::addTCoincident doesn't transfer count (only increments/decrements)
+// can this be resolved to +4/0 ?
+static void testAddTCoincident1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(1, 1);
+ path.lineTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(3, 1);
+ path.lineTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(3, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+// test with implicit close
+static void testAddTCoincident2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(1, 1);
+ path.lineTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(1, 1);
+ path.moveTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(3, 1);
+ path.lineTo(2, 0);
+ path.lineTo(2, 2);
+ path.lineTo(3, 1);
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+}
+
+static void testQuad3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(0, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(3, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(3, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadLineIntersect1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(3, 1, 0, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadLineIntersect2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(3, 1, 0, 3);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadLineIntersect3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(3, 1, 0, 3);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void skphealth_com76(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(708.099182f, 7.09919119f);
+ path.lineTo(708.099182f, 7.09920025f);
+ path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f);
+ path.lineTo(704.000000f, 33.0000000f);
+ path.lineTo(705.000000f, 33.0000000f);
+ path.lineTo(705.000000f, 17.0000000f);
+ path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f);
+ path.lineTo(708.099182f, 7.09919119f);
+ path.close();
+ path.moveTo(704.000000f, 3.00000000f);
+ path.lineTo(704.000000f, 33.0000000f);
+ path.lineTo(705.000000f, 33.0000000f);
+ path.lineTo(719.500000f, 3.00000000f);
+ testSimplify(reporter, path, filename);
+}
+
+static void tooCloseTest(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.lineTo(1,-1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1,-2);
+ path.lineTo(1, 2);
+ path.lineTo(2, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testRect1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
+ path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction);
+ path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
+ path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testRect2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(60, 0);
+ path.lineTo(60, 60);
+ path.lineTo(0, 60);
+ path.close();
+ path.moveTo(30, 20);
+ path.lineTo(30, 50);
+ path.lineTo(50, 50);
+ path.lineTo(50, 20);
+ path.close();
+ path.moveTo(24, 20);
+ path.lineTo(24, 30);
+ path.lineTo(36, 30);
+ path.lineTo(36, 20);
+ path.close();
+ path.moveTo(32, 24);
+ path.lineTo(32, 41);
+ path.lineTo(36, 41);
+ path.lineTo(36, 24);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testTriangles3x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.quadTo(2, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(3, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(3, 0);
+ path.quadTo(1, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testTriangles4x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(2, 0, 0, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 1);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad9(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.quadTo(2, 1, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad10(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.quadTo(2, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad11(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.quadTo(1, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad12(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 0);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+
+static void testDegenerate5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(1, 0);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(0, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(3, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 1);
+ path.lineTo(3, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testDegenerates1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad13(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 2, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad14(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 1, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuad15(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 0, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads16(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads17(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 2, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads18(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 2, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads19(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads20(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 1);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(2, 1, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads21(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 0, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads22(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads23(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads24(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(0, 1);
+ path.lineTo(0, 1);
+ path.quadTo(0, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads25(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 1);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 0, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads26(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 3, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads27(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(2, 0);
+ path.quadTo(3, 0, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads28(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 0, 1);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 0, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads29(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 3, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(3, 0);
+ path.quadTo(3, 1, 0, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads30(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+
+ path.quadTo(0, 0, 2, 0);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(2, 0);
+ path.quadTo(3, 2, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads31(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 1);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(0, 1);
+
+ path.quadTo(2, 1, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads32(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(1, 1);
+ path.quadTo(3, 1, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads33(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 1);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(3, 0, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads34(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 0);
+ path.quadTo(2, 0, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads35(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(1, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 0);
+ path.quadTo(3, 1, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads36(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(2, 0, 1, 2);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 0);
+ path.quadTo(3, 0, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads37(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(1, 0);
+ path.quadTo(2, 0, 1, 2);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 0);
+ path.quadTo(3, 0, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads38(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(3, 0, 0, 2);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 0);
+ path.quadTo(2, 1, 3, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads39(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(3, 0, 0, 3);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(0, 2);
+ path.quadTo(1, 2, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads40(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(3, 0, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(2, 1);
+ path.lineTo(2, 2);
+ path.quadTo(3, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads41(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 1, 0);
+ path.lineTo(2, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+
+static void testQuads54(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(2, 0, 1, 1);
+ path.lineTo(3, 1);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(1, 1);
+ path.quadTo(1, 1, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads53(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(2, 0, 1, 1);
+ path.lineTo(3, 1);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(1, 1);
+ path.quadTo(2, 3, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads52(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(2, 0, 1, 1);
+ path.lineTo(3, 1);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(1, 1);
+ path.quadTo(2, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads51(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 0, 2, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(3, 1);
+ path.quadTo(3, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads50(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 0, 2, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(3, 1);
+ path.quadTo(1, 2, 1, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads49(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 0, 2, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(2, 2);
+ path.quadTo(2, 2, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads48(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 0, 2, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(2, 2);
+ path.quadTo(3, 2, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+static void testQuads47(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 0, 2, 1);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(2, 2);
+ path.quadTo(0, 3, 0, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads46x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.quadTo(3, 2, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads45(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 2, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 2);
+ path.quadTo(3, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads44(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 2, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(0, 2);
+ path.quadTo(3, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads43(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(2, 3, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 2);
+ path.lineTo(0, 2);
+ path.quadTo(2, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads42(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 2, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(0, 2);
+ path.quadTo(3, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads56(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 1, 0, 2);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(2, 1);
+ path.quadTo(2, 1, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads57(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(3, 0, 3, 1);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(3, 1);
+ path.quadTo(2, 2, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads58(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(3, 0, 3, 1);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(3, 1);
+ path.quadTo(2, 2, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads59(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(3, 0);
+ path.quadTo(3, 1, 3, 1);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(3, 1);
+ path.quadTo(2, 2, 3, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads60(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(2, 1);
+ path.quadTo(0, 2, 3, 2);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(1, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads61(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.moveTo(0, 0);
+ path.quadTo(0, 0, 2, 0);
+ path.lineTo(1, 1);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(1, 0, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuadralateral10(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.lineTo(2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testRect3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
+ path.addRect(10, 30, 40, 30, SkPath::kCCW_Direction);
+ path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
+ path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testRect4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ path.addRect(0, 0, 30, 60, SkPath::kCCW_Direction);
+ path.addRect(10, 0, 40, 30, SkPath::kCCW_Direction);
+ path.addRect(20, 0, 30, 40, SkPath::kCCW_Direction);
+ path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads62(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(3, 2);
+ path.quadTo(1, 3, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(1, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads63(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(3, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 1);
+ path.quadTo(0, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads64(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(3, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.lineTo(2, 2);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 1);
+ path.quadTo(0, 2, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testTriangle1(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 2);
+ path.lineTo(1, 0);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testTriangle2(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(0, 1);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(0, 2);
+ path.lineTo(2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testArc(skiatest::Reporter* reporter,const char* filename) {
+ SkRect r = SkRect::MakeWH(150, 100);
+ SkPath path;
+ path.arcTo(r, 0, 0.0025f, false);
+ testSimplify(reporter, path, filename);
+}
+
+static void testIssue3838(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(220, 170);
+ path.lineTo(200, 170);
+ path.lineTo(200, 190);
+ path.lineTo(180, 190);
+ path.lineTo(180, 210);
+ path.lineTo(200, 210);
+ path.lineTo(200, 250);
+ path.lineTo(260, 250);
+ path.lineTo(260, 190);
+ path.lineTo(220, 190);
+ path.lineTo(220, 170);
+ path.close();
+ path.moveTo(220, 210);
+ path.lineTo(220, 230);
+ path.lineTo(240, 230);
+ path.lineTo(240, 210);
+ path.lineTo(220, 210);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testIssue3838_3(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(40, 10);
+ path.lineTo(60, 10);
+ path.lineTo(60, 30);
+ path.lineTo(40, 30);
+ path.lineTo(40, 10);
+ path.moveTo(41, 11);
+ path.lineTo(41, 29);
+ path.lineTo(59, 29);
+ path.lineTo(59, 11);
+ path.lineTo(41, 11);
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads65(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(1, 2);
+ path.quadTo(3, 2, 0, 3);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 2);
+ path.quadTo(3, 2, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void fuzz864a(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(10, 90);
+ path.lineTo(10, 90);
+ path.lineTo(10, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(10, 90);
+ path.lineTo(10, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(110, 90);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 30);
+ path.lineTo(32678, 30);
+ path.lineTo(32678, 30);
+ path.lineTo(10, 30);
+ path.close();
+ path.moveTo(10, 3.35545e+07f);
+ path.lineTo(110, 3.35545e+07f);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 3.35545e+07f);
+ path.close();
+ path.moveTo(10, 315);
+ path.lineTo(110, 315);
+ path.lineTo(110, 255);
+ path.lineTo(10, 255);
+ path.lineTo(10, 315);
+ path.close();
+ path.moveTo(0, 60);
+ path.lineTo(100, 60);
+ path.lineTo(100, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 60);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(110, 90);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 3.35545e+07f);
+ path.lineTo(110, 3.35545e+07f);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 3.35545e+07f);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(110, 90);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void cr514118(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50
+path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f
+path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f
+path.close();
+path.moveTo(SkBits2Float(0x42c80133), SkBits2Float(0x42480000)); // 100.002f, 50
+path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x00000000), SkBits2Float(0x42480267), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.002f, 0, 50.0023f, 0, 0.707107f
+path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x00000000), SkBits2Float(0x3b19b530), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 0, 0.00234539f, 50, 0.707107f
+path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x42c80000), SkBits2Float(0x42480267), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.00234539f, 100, 50.0023f, 100, 0.707107f
+path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x42c80000), SkBits2Float(0x42c80133), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.002f, 100, 100.002f, 50, 0.707107f
+path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void fuzz994s_11(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30
+path.lineTo(SkBits2Float(0x46ff4c00), SkBits2Float(0x41f00000)); // 32678, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x439d8000)); // 110, 315
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x437f0000)); // 110, 255
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x437f0000)); // 10, 255
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x439d8000)); // 10, 315
+path.close();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60
+path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x42700000)); // 100, 60
+path.lineTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000)); // 100, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x42700000)); // 0, 60
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x4c000006)); // 110, 3.35545e+07f
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x4c000006)); // 10, 3.35545e+07f
+path.close();
+path.moveTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x42b40000)); // 110, 90
+path.lineTo(SkBits2Float(0x42dc0000), SkBits2Float(0x41f00000)); // 110, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x41f00000)); // 10, 30
+path.lineTo(SkBits2Float(0x41200000), SkBits2Float(0x42b40000)); // 10, 90
+path.close();
+
+ testSimplify(reporter, path, filename);
+}
+
+static void fuzz994s_3414(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50
+path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f
+path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f
+path.close();
+path.moveTo(SkBits2Float(0x42c84964), SkBits2Float(0x42480000)); // 100.143f, 50
+path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x00000000), SkBits2Float(0x424892c8), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.143f, 0, 50.1433f, 0, 0.707107f
+path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x00000000), SkBits2Float(0x3e12c788), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.143339f, 0, 0.143339f, 50, 0.707107f
+path.conicTo(SkBits2Float(0x3e12c788), SkBits2Float(0x42c80000), SkBits2Float(0x424892c8), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.143339f, 100, 50.1433f, 100, 0.707107f
+path.conicTo(SkBits2Float(0x42c84964), SkBits2Float(0x42c80000), SkBits2Float(0x42c84964), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.143f, 100, 100.143f, 50, 0.707107f
+path.close();
+path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50
+path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50, 0, 0.707107f
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50, 0.707107f
+path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50, 100, 0.707107f
+path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 100, 50, 0.707107f
+path.close();
+path.moveTo(SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000)); // 3.35549e+07f, 51
+path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0xcbffffe5), SkBits2Float(0x43d6e720), SkBits2Float(0xcbffffe5), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, -3.35544e+07f, 429.806f, -3.35544e+07f, 0.707107f
+path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0xcbffffe5), SkBits2Float(0xcbffff28), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, -3.35544e+07f, -3.3554e+07f, 51, 0.707107f
+path.conicTo(SkBits2Float(0xcbffff28), SkBits2Float(0x4c00000c), SkBits2Float(0x43d6e720), SkBits2Float(0x4c00000c), SkBits2Float(0x3f3504f3)); // -3.3554e+07f, 3.35545e+07f, 429.806f, 3.35545e+07f, 0.707107f
+path.conicTo(SkBits2Float(0x4c00006b), SkBits2Float(0x4c00000c), SkBits2Float(0x4c00006b), SkBits2Float(0x424c0000), SkBits2Float(0x3f3504f3)); // 3.35549e+07f, 3.35545e+07f, 3.35549e+07f, 51, 0.707107f
+path.close();
+path.moveTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42480000)); // 478.806f, 50
+path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x00000000), SkBits2Float(0x43d66720), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 478.806f, 0, 428.806f, 0, 0.707107f
+path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x00000000), SkBits2Float(0x43bd6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 378.806f, 0, 378.806f, 50, 0.707107f
+path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x42c80000), SkBits2Float(0x43d66720), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 378.806f, 100, 428.806f, 100, 0.707107f
+path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42c80000), SkBits2Float(0x43ef6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 478.806f, 100, 478.806f, 50, 0.707107f
+path.close();
+
+ testSimplify(reporter, path, filename);
+}
+
+static void fuzz_twister(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(0, 600);
+path.lineTo(3.35544e+07f, 600);
+path.lineTo(3.35544e+07f, 0);
+path.lineTo(0, 0);
+path.lineTo(0, 600);
+path.close();
+path.moveTo(63, 600);
+path.lineTo(3.35545e+07f, 600);
+path.lineTo(3.35545e+07f, 0);
+path.lineTo(63, 0);
+path.lineTo(63, 600);
+path.close();
+path.moveTo(93, 600);
+path.lineTo(3.35545e+07f, 600);
+path.lineTo(3.35545e+07f, 0);
+path.lineTo(93, 0);
+path.lineTo(93, 600);
+path.close();
+path.moveTo(123, 600);
+path.lineTo(3.35546e+07f, 600);
+path.lineTo(3.35546e+07f, 0);
+path.lineTo(123, 0);
+path.lineTo(123, 600);
+path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void fuzz_twister2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600
+path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x44160000)); // 3.35544e+07f, 600
+path.lineTo(SkBits2Float(0x4bfffffe), SkBits2Float(0x00000000)); // 3.35544e+07f, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x44160000)); // 0, 600
+path.close();
+
+path.moveTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0
+path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
+path.lineTo(SkBits2Float(0x4c00000f), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
+path.lineTo(SkBits2Float(0x427c0000), SkBits2Float(0x00000000)); // 63, 0
+path.close();
+
+path.moveTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0
+path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
+path.lineTo(SkBits2Float(0x4c000016), SkBits2Float(0x00000000)); // 3.35545e+07f, 0
+path.lineTo(SkBits2Float(0x42ba0000), SkBits2Float(0x00000000)); // 93, 0
+path.close();
+
+path.moveTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0
+path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0
+path.lineTo(SkBits2Float(0x4c00001e), SkBits2Float(0x00000000)); // 3.35546e+07f, 0
+path.lineTo(SkBits2Float(0x42f60000), SkBits2Float(0x00000000)); // 123, 0
+path.close();
+
+ testSimplify(reporter, path, filename);
+}
+
+static void fuzz763_4713_b(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x42240000), SkBits2Float(0x42040000));
+path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x4211413d), SkBits2Float(0x421aa09e), SkBits2Float(0x421aa09e));
+path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x42040000), SkBits2Float(0x42240000));
+path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x41dabec3), SkBits2Float(0x421aa09e));
+path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x42040000));
+path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x41dabec3), SkBits2Float(0x41dabec3));
+path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x41c80000), SkBits2Float(0x42040000), SkBits2Float(0x41c80000));
+path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x421aa09e), SkBits2Float(0x41dabec3));
+path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x42040000));
+path.close();
+
+path.moveTo(SkBits2Float(0x4204f72e), SkBits2Float(0x41c56cd2));
+path.quadTo(SkBits2Float(0x42123842), SkBits2Float(0x41c52adf), SkBits2Float(0x421baed7), SkBits2Float(0x41d7bac6));
+path.quadTo(SkBits2Float(0x4225256d), SkBits2Float(0x41ea4aad), SkBits2Float(0x42254667), SkBits2Float(0x4202666b));
+path.quadTo(SkBits2Float(0x42256760), SkBits2Float(0x420fa77f), SkBits2Float(0x421c1f6c), SkBits2Float(0x42191e14));
+path.quadTo(SkBits2Float(0x421bff97), SkBits2Float(0x42193e89), SkBits2Float(0x421bdf6b), SkBits2Float(0x42195eb8));
+path.quadTo(SkBits2Float(0x421bbff6), SkBits2Float(0x42197f32), SkBits2Float(0x421ba03b), SkBits2Float(0x42199f57));
+path.quadTo(SkBits2Float(0x421b605e), SkBits2Float(0x4219e00a), SkBits2Float(0x421b1fa8), SkBits2Float(0x421a1f22));
+path.quadTo(SkBits2Float(0x421ae0f1), SkBits2Float(0x421a604b), SkBits2Float(0x421aa09e), SkBits2Float(0x421aa09e));
+path.quadTo(SkBits2Float(0x4211413d), SkBits2Float(0x42240000), SkBits2Float(0x42040000), SkBits2Float(0x42240000));
+path.quadTo(SkBits2Float(0x41ed7d86), SkBits2Float(0x42240000), SkBits2Float(0x41dabec3), SkBits2Float(0x421aa09e));
+path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x4211413d), SkBits2Float(0x41c80000), SkBits2Float(0x42040000));
+path.quadTo(SkBits2Float(0x41c80000), SkBits2Float(0x41ed7d86), SkBits2Float(0x41dabec3), SkBits2Float(0x41dabec3));
+path.quadTo(SkBits2Float(0x41db19b1), SkBits2Float(0x41da63d5), SkBits2Float(0x41db755b), SkBits2Float(0x41da0a9b));
+path.quadTo(SkBits2Float(0x41dbce01), SkBits2Float(0x41d9ae59), SkBits2Float(0x41dc285e), SkBits2Float(0x41d952ce));
+path.quadTo(SkBits2Float(0x41dc55b6), SkBits2Float(0x41d924df), SkBits2Float(0x41dc82cd), SkBits2Float(0x41d8f7cd));
+path.quadTo(SkBits2Float(0x41dcaf1e), SkBits2Float(0x41d8ca01), SkBits2Float(0x41dcdc4c), SkBits2Float(0x41d89bf0));
+path.quadTo(SkBits2Float(0x41ef6c33), SkBits2Float(0x41c5aec5), SkBits2Float(0x4204f72e), SkBits2Float(0x41c56cd2));
+path.close();
+testSimplify(reporter, path, filename);
+}
+
+static void dean4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+
+ // start region
+ // start loop, contour: 1
+ // Segment 1145.3381097316742 2017.6783947944641 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.0033947825432
+ path.moveTo(1145.3381347656250, 2017.6783447265625);
+ path.lineTo(1145.3381347656250, 2017.0034179687500);
+ // Segment 1145.3381097316742 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6927231521568 2017.0033947825432
+ path.lineTo(1143.6927490234375, 2017.0034179687500);
+ // Segment 1143.6927231521568 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675112890 2018.1589246992417
+ path.lineTo(1144.8640136718750, 2018.1589355468750);
+ // Segment 1144.8640675112890 2018.1589246992417 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.6783947944641
+ path.lineTo(1145.3381347656250, 2017.6783447265625);
+ path.close();
+ // start loop, contour: 2
+ // Segment 1145.3381097316742 2016.3216052055359 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675258462 2015.8410752863977
+ path.moveTo(1145.3381347656250, 2016.3216552734375);
+ path.lineTo(1144.8640136718750, 2015.8410644531250);
+ // Segment 1144.8640675258462 2015.8410752863977 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6927230811802 2016.9966052174568
+ path.lineTo(1143.6927490234375, 2016.9965820312500);
+ // Segment 1143.6927230811802 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.9966052174568
+ path.lineTo(1145.3381347656250, 2016.9965820312500);
+ // Segment 1145.3381097316742 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.3216052055359
+ path.lineTo(1145.3381347656250, 2016.3216552734375);
+ path.close();
+ // start loop, contour: 3
+ // Segment 1147.3323798179626 2014.3542600870132 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220239557 2014.8347900059885
+ path.moveTo(1147.3323974609375, 2014.3542480468750);
+ path.lineTo(1147.8063964843750, 2014.8348388671875);
+ // Segment 1147.8064220239557 2014.8347900059885 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2014.8347899786306
+ path.lineTo(1147.8063964843750, 2014.8348388671875);
+ // Segment 1147.8064220516883 2014.8347899786306 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.3323798179626 2014.3542600870132
+ path.lineTo(1147.3323974609375, 2014.3542480468750);
+ path.close();
+ // start loop, contour: 4
+ // Segment 1146.3696286678314 2013.4045072346926 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708778083 2013.8850371497379
+ path.moveTo(1146.3696289062500, 2013.4045410156250);
+ path.lineTo(1146.8436279296875, 2013.8850097656250);
+ // Segment 1146.8436708778083 2013.8850371497379 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436709015571 2013.8850371263100
+ path.lineTo(1146.8436279296875, 2013.8850097656250);
+ // Segment 1146.8436709015571 2013.8850371263100 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.3696286678314 2013.4045072346926
+ path.lineTo(1146.3696289062500, 2013.4045410156250);
+ path.close();
+ // start loop, contour: 5
+ // Segment 1143.2063037902117 2016.5251235961914 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615802348 2016.0445936811461
+ path.moveTo(1143.2062988281250, 2016.5251464843750);
+ path.lineTo(1142.7322998046875, 2016.0445556640625);
+ // Segment 1142.7322615802348 2016.0445936811461 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615564860 2016.0445937045740
+ path.lineTo(1142.7322998046875, 2016.0445556640625);
+ // Segment 1142.7322615564860 2016.0445937045740 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.2063037902117 2016.5251235961914
+ path.lineTo(1143.2062988281250, 2016.5251464843750);
+ path.close();
+ // start loop, contour: 6
+ // Segment 1143.0687679275870 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.5428101613127 2017.2091718784643
+ path.moveTo(1143.0687255859375, 2016.7286376953125);
+ path.lineTo(1143.5428466796875, 2017.2092285156250);
+ // Segment 1143.5428101613127 2017.2091718784643 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2017.0109272411960
+ path.lineTo(1143.7437744140625, 2017.0109863281250);
+ // Segment 1143.7437679395080 2017.0109272411960 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2016.7286419868469
+ path.lineTo(1143.7437744140625, 2016.7286376953125);
+ // Segment 1143.7437679395080 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.0687679275870 2016.7286419868469
+ path.lineTo(1143.0687255859375, 2016.7286376953125);
+ path.close();
+ // start loop, contour: 7
+ // Segment 1143.2063037902117 2017.4748764038086 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615603032 2017.9554062991915
+ path.moveTo(1143.2062988281250, 2017.4748535156250);
+ path.lineTo(1142.7322998046875, 2017.9554443359375);
+ // Segment 1142.7322615603032 2017.9554062991915 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615746241 2017.9554063133189
+ path.lineTo(1142.7322998046875, 2017.9554443359375);
+ // Segment 1142.7322615746241 2017.9554063133189 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.2063037902117 2017.4748764038086
+ path.lineTo(1143.2062988281250, 2017.4748535156250);
+ path.close();
+ // start loop, contour: 8
+ // Segment 1146.3696286678314 2020.5954928398132 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708977399 2020.1149629444303
+ path.moveTo(1146.3696289062500, 2020.5954589843750);
+ path.lineTo(1146.8436279296875, 2020.1149902343750);
+ // Segment 1146.8436708977399 2020.1149629444303 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708834190 2020.1149629303029
+ path.lineTo(1146.8436279296875, 2020.1149902343750);
+ // Segment 1146.8436708834190 2020.1149629303029 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.3696286678314 2020.5954928398132
+ path.lineTo(1146.3696289062500, 2020.5954589843750);
+ path.close();
+ // start loop, contour: 9
+ // Segment 1147.3323798179626 2019.6457400321960 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220484741 2019.1652101374082
+ path.moveTo(1147.3323974609375, 2019.6457519531250);
+ path.lineTo(1147.8063964843750, 2019.1651611328125);
+ // Segment 1147.8064220484741 2019.1652101374082 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220383478 2019.1652101274185
+ path.lineTo(1147.8063964843750, 2019.1651611328125);
+ // Segment 1147.8064220383478 2019.1652101274185 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.3323798179626 2019.6457400321960
+ path.lineTo(1147.3323974609375, 2019.6457519531250);
+ path.close();
+ // start loop, contour: 10
+ // Segment 1145.3381097316742 2018.3533948063850 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2018.3533948063850
+ path.moveTo(1145.3381347656250, 2018.3533935546875);
+ path.lineTo(1156.6848144531250, 2018.3533935546875);
+ // Segment 1156.6848182678223 2018.3533948063850 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2017.0033947825432
+ path.lineTo(1156.6848144531250, 2017.0034179687500);
+ // Segment 1156.6848182678223 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2017.0033947825432
+ path.lineTo(1145.3381347656250, 2017.0034179687500);
+ // Segment 1145.3381097316742 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2018.3533948063850
+ path.lineTo(1145.3381347656250, 2018.3533935546875);
+ path.close();
+ // start loop, contour: 11
+ // Segment 1156.6848182678223 2018.3533948063850 0.3569631313191 0.0000000000000 -0.2645167304388 0.2609454237780 1157.6574279406423 2017.9723661860094
+ path.moveTo(1156.6848144531250, 2018.3533935546875);
+ path.cubicTo(1157.0417480468750, 2018.3533935546875, 1157.3929443359375, 2018.2332763671875, 1157.6574707031250, 2017.9724121093750);
+ // Segment 1157.6574279406423 2017.9723661860094 0.2653344079822 -0.2617520616521 0.0000000000000 0.3596905289350 1158.0474975705147 2017.0000000000000
+ path.cubicTo(1157.9227294921875, 2017.7105712890625, 1158.0474853515625, 2017.3597412109375, 1158.0474853515625, 2017.0000000000000);
+ // Segment 1158.0474975705147 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6974975466728 2017.0000000000000
+ path.lineTo(1156.6975097656250, 2017.0000000000000);
+ // Segment 1156.6974975466728 2017.0000000000000 0.0028009248351 0.0403311981485 0.0118595244351 -0.0220843520393 1156.6941780622435 2017.0325257649940
+ path.cubicTo(1156.7003173828125, 2017.0402832031250, 1156.7060546875000, 2017.0104980468750, 1156.6942138671875, 2017.0324707031250);
+ // Segment 1156.6941780622435 2017.0325257649940 -0.0032637855860 0.0184860248562 0.0120617528380 -0.0065934603083 1156.7093435710913 2017.0113063061967
+ path.cubicTo(1156.6909179687500, 2017.0510253906250, 1156.7214355468750, 2017.0047607421875, 1156.7093505859375, 2017.0113525390625);
+ // split at 0.4496445953846
+ // path.cubicTo(1156.6927490234375, 2017.0407714843750, 1156.6981201171875, 2017.0360107421875, 1156.7033691406250, 2017.0289306640625);
+ // path.cubicTo(1156.7097167968750, 2017.0201416015625, 1156.7159423828125, 2017.0076904296875, 1156.7093505859375, 2017.0113525390625);
+ // Segment 1156.7093435710913 2017.0113063061967 -0.0070717276929 0.0122220954353 0.0203483811973 -0.0039136894418 1156.7268834554304 2016.9985353221975
+ path.cubicTo(1156.7022705078125, 2017.0235595703125, 1156.7471923828125, 2016.9946289062500, 1156.7269287109375, 2016.9985351562500);
+ // Segment 1156.7268834554304 2016.9985353221975 -0.0244396787691 0.0123649140586 0.0433322464027 0.0026558844666 1156.6848182678223 2017.0033947825432
+ path.cubicTo(1156.7023925781250, 2017.0108642578125, 1156.7281494140625, 2017.0061035156250, 1156.6848144531250, 2017.0034179687500);
+ // split at 0.4418420493603
+ // path.cubicTo(1156.7160644531250, 2017.0040283203125, 1156.7150878906250, 2017.0061035156250, 1156.7136230468750, 2017.0065917968750);
+ // path.cubicTo(1156.7116699218750, 2017.0070800781250, 1156.7089843750000, 2017.0048828125000, 1156.6848144531250, 2017.0034179687500);
+ // Segment 1156.6848182678223 2017.0033947825432 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2018.3533948063850
+ path.lineTo(1156.6848144531250, 2018.3533935546875);
+ path.close();
+ // start loop, contour: 12
+ // Segment 1158.0474975705147 2017.0000000000000 0.0000000000000 -0.3596905289350 0.2653344079822 0.2617520616521 1157.6574279406423 2016.0276338139906
+ path.moveTo(1158.0474853515625, 2017.0000000000000);
+ path.cubicTo(1158.0474853515625, 2016.6402587890625, 1157.9227294921875, 2016.2894287109375, 1157.6574707031250, 2016.0275878906250);
+ // Segment 1157.6574279406423 2016.0276338139906 -0.2645167304388 -0.2609454237780 0.3569631313191 0.0000000000000 1156.6848182678223 2015.6466051936150
+ path.cubicTo(1157.3929443359375, 2015.7667236328125, 1157.0417480468750, 2015.6466064453125, 1156.6848144531250, 2015.6466064453125);
+ // split at 0.5481675863266
+ // path.cubicTo(1157.5124511718750, 2015.8846435546875, 1157.3414306640625, 2015.7839355468750, 1157.1577148437500, 2015.7220458984375);
+ // path.cubicTo(1157.0062255859375, 2015.6711425781250, 1156.8460693359375, 2015.6466064453125, 1156.6848144531250, 2015.6466064453125);
+ // Segment 1156.6848182678223 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2016.9966052174568
+ path.lineTo(1156.6848144531250, 2016.9965820312500);
+ // Segment 1156.6848182678223 2016.9966052174568 0.0433322464027 -0.0026558844666 -0.0244396787691 -0.0123649140586 1156.7268834554304 2017.0014646778025
+ path.cubicTo(1156.7281494140625, 2016.9938964843750, 1156.7023925781250, 2016.9891357421875, 1156.7269287109375, 2017.0014648437500);
+ // split at 0.5581579208374
+ // path.cubicTo(1156.7089843750000, 2016.9951171875000, 1156.7116699218750, 2016.9929199218750, 1156.7136230468750, 2016.9934082031250);
+ // path.cubicTo(1156.7150878906250, 2016.9938964843750, 1156.7160644531250, 2016.9959716796875, 1156.7269287109375, 2017.0014648437500);
+ // Segment 1156.7268834554304 2017.0014646778025 0.0203483811973 0.0039136894418 -0.0070717276929 -0.0122220954353 1156.7093435710913 2016.9886936938033
+ path.cubicTo(1156.7471923828125, 2017.0053710937500, 1156.7022705078125, 2016.9764404296875, 1156.7093505859375, 2016.9886474609375);
+ // Segment 1156.7093435710913 2016.9886936938033 0.0120617528380 0.0065934603083 -0.0032637855860 -0.0184860248562 1156.6941780622435 2016.9674742350060
+ path.cubicTo(1156.7214355468750, 2016.9952392578125, 1156.6909179687500, 2016.9489746093750, 1156.6942138671875, 2016.9675292968750);
+ // Segment 1156.6941780622435 2016.9674742350060 0.0118595244351 0.0220843520393 0.0028009248351 -0.0403311981485 1156.6974975466728 2017.0000000000000
+ path.cubicTo(1156.7060546875000, 2016.9895019531250, 1156.7003173828125, 2016.9597167968750, 1156.6975097656250, 2017.0000000000000);
+ // split at 0.4572408795357
+ // path.cubicTo(1156.6995849609375, 2016.9775390625000, 1156.7014160156250, 2016.9768066406250, 1156.7014160156250, 2016.9768066406250);
+ // path.cubicTo(1156.7014160156250, 2016.9769287109375, 1156.6989746093750, 2016.9781494140625, 1156.6975097656250, 2017.0000000000000);
+ // Segment 1156.6974975466728 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1158.0474975705147 2017.0000000000000
+ path.lineTo(1158.0474853515625, 2017.0000000000000);
+ path.close();
+ // start loop, contour: 13
+ // Segment 1156.6848182678223 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2015.6466051936150
+ path.moveTo(1156.6848144531250, 2015.6466064453125);
+ path.lineTo(1145.3381347656250, 2015.6466064453125);
+ // Segment 1145.3381097316742 2015.6466051936150 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.3381097316742 2016.9966052174568
+ path.lineTo(1145.3381347656250, 2016.9965820312500);
+ // Segment 1145.3381097316742 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2016.9966052174568
+ path.lineTo(1156.6848144531250, 2016.9965820312500);
+ // Segment 1156.6848182678223 2016.9966052174568 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1156.6848182678223 2015.6466051936150
+ path.lineTo(1156.6848144531250, 2015.6466064453125);
+ path.close();
+ // start loop, contour: 14
+ // Segment 1145.8121519375022 2016.8021351246741 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220237907 2014.8347900061515
+ path.moveTo(1145.8121337890625, 2016.8021240234375);
+ path.lineTo(1147.8063964843750, 2014.8348388671875);
+ // Segment 1147.8064220237907 2014.8347900061515 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583376121346 2013.8737301678750
+ path.lineTo(1146.8583984375000, 2013.8737792968750);
+ // Segment 1146.8583376121346 2013.8737301678750 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675258462 2015.8410752863977
+ path.lineTo(1144.8640136718750, 2015.8410644531250);
+ // Segment 1144.8640675258462 2015.8410752863977 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8121519375022 2016.8021351246741
+ path.lineTo(1145.8121337890625, 2016.8021240234375);
+ path.close();
+ // start loop, contour: 15
+ // Segment 1147.8064220516883 2014.8347899786306 0.5430154146087 -0.5356841365729 0.5430154146087 0.5356841365729 1147.8064220516883 2012.9239773430752
+ path.moveTo(1147.8063964843750, 2014.8348388671875);
+ path.cubicTo(1148.3494873046875, 2014.2990722656250, 1148.3494873046875, 2013.4597167968750, 1147.8063964843750, 2012.9239501953125);
+ // Segment 1147.8064220516883 2012.9239773430752 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2013.8850371263100
+ path.lineTo(1146.8583984375000, 2013.8850097656250);
+ // Segment 1146.8583375842370 2013.8850371263100 0.0071280060876 0.0070317705240 0.0071280060876 -0.0070317705240 1146.8583375842370 2013.8737301953959
+ path.cubicTo(1146.8654785156250, 2013.8920898437500, 1146.8654785156250, 2013.8666992187500, 1146.8583984375000, 2013.8737792968750);
+ // Segment 1146.8583375842370 2013.8737301953959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2014.8347899786306
+ path.lineTo(1147.8063964843750, 2014.8348388671875);
+ path.close();
+ // start loop, contour: 16
+ // Segment 1147.8064220516883 2012.9239773430752 -0.5379138488298 -0.5306514472866 0.5379138488298 -0.5306514472866 1145.8955864341058 2012.9239773430752
+ path.moveTo(1147.8063964843750, 2012.9239501953125);
+ path.cubicTo(1147.2685546875000, 2012.3933105468750, 1146.4334716796875, 2012.3933105468750, 1145.8956298828125, 2012.9239501953125);
+ // Segment 1145.8955864341058 2012.9239773430752 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436709015571 2013.8850371263100
+ path.lineTo(1146.8436279296875, 2013.8850097656250);
+ // Segment 1146.8436709015571 2013.8850371263100 0.0122295718664 -0.0120644598103 -0.0122295718664 -0.0120644598103 1146.8583375842370 2013.8850371263100
+ path.cubicTo(1146.8559570312500, 2013.8729248046875, 1146.8460693359375, 2013.8729248046875, 1146.8583984375000, 2013.8850097656250);
+ // Segment 1146.8583375842370 2013.8850371263100 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2012.9239773430752
+ path.lineTo(1147.8063964843750, 2012.9239501953125);
+ path.close();
+ // start loop, contour: 17
+ // Segment 1145.8955864579798 2012.9239773195236 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615803600 2016.0445936810224
+ path.moveTo(1145.8956298828125, 2012.9239501953125);
+ path.lineTo(1142.7322998046875, 2016.0445556640625);
+ // Segment 1142.7322615803600 2016.0445936810224 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460000633 2017.0056535113604
+ path.lineTo(1143.6802978515625, 2017.0056152343750);
+ // Segment 1143.6803460000633 2017.0056535113604 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708776831 2013.8850371498615
+ path.lineTo(1146.8436279296875, 2013.8850097656250);
+ // Segment 1146.8436708776831 2013.8850371498615 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864579798 2012.9239773195236
+ path.lineTo(1145.8956298828125, 2012.9239501953125);
+ path.close();
+ // start loop, contour: 18
+ // Segment 1142.7322615564860 2016.0445937045740 -0.0343838913237 0.0339196727021 0.0561572931720 -0.0710493024751 1142.5744069596683 2016.2183613784646
+ path.moveTo(1142.7322998046875, 2016.0445556640625);
+ path.cubicTo(1142.6978759765625, 2016.0784912109375, 1142.6306152343750, 2016.1473388671875, 1142.5744628906250, 2016.2183837890625);
+ // Segment 1142.5744069596683 2016.2183613784646 -0.0547779032556 0.0720510806539 0.0000000000000 -0.2570904015602 1142.3937679156661 2016.7286419868469
+ path.cubicTo(1142.5196533203125, 2016.2904052734375, 1142.3937988281250, 2016.4715576171875, 1142.3937988281250, 2016.7286376953125);
+ // Segment 1142.3937679156661 2016.7286419868469 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.7437679395080 2016.7286419868469
+ path.lineTo(1143.7437744140625, 2016.7286376953125);
+ // Segment 1143.7437679395080 2016.7286419868469 -0.0051909534315 0.0665915567290 0.0133980913650 -0.0361675066532 1143.6976291086639 2016.9514128270803
+ path.cubicTo(1143.7385253906250, 2016.7952880859375, 1143.7110595703125, 2016.9152832031250, 1143.6976318359375, 2016.9514160156250);
+ // Segment 1143.6976291086639 2016.9514128270803 -0.0142876819622 0.0277028472317 0.0040377216094 -0.0063254385208 1143.6490888124401 2017.0354042045738
+ path.cubicTo(1143.6833496093750, 2016.9791259765625, 1143.6530761718750, 2017.0290527343750, 1143.6490478515625, 2017.0354003906250);
+ // Segment 1143.6490888124401 2017.0354042045738 -0.0045813437564 0.0032098513409 -0.0343840362634 0.0339198156850 1143.6803460239373 2017.0056534878088
+ path.cubicTo(1143.6445312500000, 2017.0385742187500, 1143.6459960937500, 2017.0395507812500, 1143.6802978515625, 2017.0056152343750);
+ // Segment 1143.6803460239373 2017.0056534878088 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615564860 2016.0445937045740
+ path.lineTo(1142.7322998046875, 2016.0445556640625);
+ path.close();
+ // start loop, contour: 19
+ // Segment 1142.5947256938614 2016.2481120952295 -0.1857487117715 0.1832409092043 0.0167379373694 -0.0990717748979 1142.3430278987244 2016.7518748698508
+ path.moveTo(1142.5947265625000, 2016.2481689453125);
+ path.cubicTo(1142.4089355468750, 2016.4313964843750, 1142.3597412109375, 2016.6528320312500, 1142.3430175781250, 2016.7518310546875);
+ // Segment 1142.3430278987244 2016.7518748698508 -0.0156657977007 0.1069052535795 0.0000000000000 -0.0339197441936 1142.3249999880791 2017.0000000000000
+ path.cubicTo(1142.3273925781250, 2016.8587646484375, 1142.3249511718750, 2016.9660644531250, 1142.3249511718750, 2017.0000000000000);
+ // Segment 1142.3249999880791 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6750000119209 2017.0000000000000
+ path.lineTo(1143.6750488281250, 2017.0000000000000);
+ // Segment 1143.6750000119209 2017.0000000000000 0.0000000000000 -0.0339197441936 -0.0015261841961 -0.0051459911965 1143.6741640831724 2016.9767671169961
+ path.cubicTo(1143.6750488281250, 2016.9660644531250, 1143.6726074218750, 2016.9716796875000, 1143.6741943359375, 2016.9768066406250);
+ // Segment 1143.6741640831724 2016.9767671169961 -0.0007886982052 0.0013596649622 0.0074114058388 -0.0224954551713 1143.6525251830094 2017.0486861571169
+ path.cubicTo(1143.6733398437500, 2016.9781494140625, 1143.6599121093750, 2017.0262451171875, 1143.6524658203125, 2017.0487060546875);
+ // split at 0.4203657805920
+ // path.cubicTo(1143.6738281250000, 2016.9774169921875, 1143.6712646484375, 2016.9862060546875, 1143.6678466796875, 2016.9979248046875);
+ // path.cubicTo(1143.6630859375000, 2017.0140380859375, 1143.6567382812500, 2017.0356445312500, 1143.6524658203125, 2017.0487060546875);
+ // Segment 1143.6525251830094 2017.0486861571169 -0.0119644334077 0.0236755853369 0.0381324473830 -0.0447670202574 1143.5428101613127 2017.2091718784643
+ path.cubicTo(1143.6405029296875, 2017.0723876953125, 1143.5809326171875, 2017.1644287109375, 1143.5428466796875, 2017.2092285156250);
+ // Segment 1143.5428101613127 2017.2091718784643 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.5947256938614 2016.2481120952295
+ path.lineTo(1142.5947265625000, 2016.2481689453125);
+ path.close();
+ // start loop, contour: 20
+ // Segment 1142.3249999880791 2017.0000000000000 0.0000000000000 0.0339197441936 -0.0156657977007 -0.1069052535795 1142.3430278987244 2017.2481251301492
+ path.moveTo(1142.3249511718750, 2017.0000000000000);
+ path.cubicTo(1142.3249511718750, 2017.0339355468750, 1142.3273925781250, 2017.1412353515625, 1142.3430175781250, 2017.2481689453125);
+ // Segment 1142.3430278987244 2017.2481251301492 0.0167379373694 0.0990717748979 -0.1857487117715 -0.1832409092043 1142.5947256938614 2017.7518879047705
+ path.cubicTo(1142.3597412109375, 2017.3471679687500, 1142.4089355468750, 2017.5686035156250, 1142.5947265625000, 2017.7518310546875);
+ // split at 0.4008532166481
+ // path.cubicTo(1142.3497314453125, 2017.2878417968750, 1142.3616943359375, 2017.3471679687500, 1142.3854980468750, 2017.4158935546875);
+ // path.cubicTo(1142.4211425781250, 2017.5185546875000, 1142.4833984375000, 2017.6420898437500, 1142.5947265625000, 2017.7518310546875);
+ // Segment 1142.5947256938614 2017.7518879047705 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.5428101613127 2016.7908281215357
+ path.lineTo(1143.5428466796875, 2016.7907714843750);
+ // Segment 1143.5428101613127 2016.7908281215357 0.0381324473830 0.0447670202574 -0.0119644334077 -0.0236755853369 1143.6525251830094 2016.9513138428831
+ path.cubicTo(1143.5809326171875, 2016.8355712890625, 1143.6405029296875, 2016.9276123046875, 1143.6524658203125, 2016.9512939453125);
+ // Segment 1143.6525251830094 2016.9513138428831 0.0074114058388 0.0224954551713 -0.0007886982052 -0.0013596649622 1143.6741640831724 2017.0232328830039
+ path.cubicTo(1143.6599121093750, 2016.9737548828125, 1143.6733398437500, 2017.0218505859375, 1143.6741943359375, 2017.0231933593750);
+ // Segment 1143.6741640831724 2017.0232328830039 -0.0015261841961 0.0051459911965 0.0000000000000 0.0339197441936 1143.6750000119209 2017.0000000000000
+ path.cubicTo(1143.6726074218750, 2017.0283203125000, 1143.6750488281250, 2017.0339355468750, 1143.6750488281250, 2017.0000000000000);
+ // Segment 1143.6750000119209 2017.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.3249999880791 2017.0000000000000
+ path.lineTo(1142.3249511718750, 2017.0000000000000);
+ path.close();
+ // start loop, contour: 21
+ // Segment 1142.5947256938614 2017.7518879047705 -0.0799271403989 -0.1522613934208 -0.2174629955730 -0.2879403701950 1142.7322615564860 2017.9554062954260
+ path.moveTo(1142.5947265625000, 2017.7518310546875);
+ path.cubicTo(1142.5147705078125, 2017.5996093750000, 1142.5147705078125, 2017.6674804687500, 1142.7322998046875, 2017.9554443359375);
+ // Segment 1142.7322615564860 2017.9554062954260 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460239373 2016.9943465121912
+ path.lineTo(1143.6802978515625, 2016.9943847656250);
+ // Segment 1143.6803460239373 2016.9943465121912 0.0799271403989 0.1522613934208 0.2174629955730 0.2879403701950 1143.5428101613127 2016.7908281215357
+ path.cubicTo(1143.7602539062500, 2017.1466064453125, 1143.7602539062500, 2017.0787353515625, 1143.5428466796875, 2016.7907714843750);
+ // Segment 1143.5428101613127 2016.7908281215357 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.5947256938614 2017.7518879047705
+ path.lineTo(1142.5947265625000, 2017.7518310546875);
+ path.close();
+ // start loop, contour: 22
+ // Segment 1142.7322615746241 2017.9554063133189 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864522438 2021.0760227493236
+ path.moveTo(1142.7322998046875, 2017.9554443359375);
+ path.lineTo(1145.8956298828125, 2021.0760498046875);
+ // Segment 1145.8955864522438 2021.0760227493236 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8436708834190 2020.1149629303029
+ path.lineTo(1146.8436279296875, 2020.1149902343750);
+ // Segment 1146.8436708834190 2020.1149629303029 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1143.6803460057993 2016.9943464942983
+ path.lineTo(1143.6802978515625, 2016.9943847656250);
+ // Segment 1143.6803460057993 2016.9943464942983 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1142.7322615746241 2017.9554063133189
+ path.lineTo(1142.7322998046875, 2017.9554443359375);
+ path.close();
+ // start loop, contour: 23
+ // Segment 1145.8955864341058 2021.0760227314306 0.2730164534637 0.2693304447891 -0.3016608168437 0.0000000000000 1146.8510041236877 2021.4740112423897
+ path.moveTo(1145.8956298828125, 2021.0760498046875);
+ path.cubicTo(1146.1685791015625, 2021.3453369140625, 1146.5493164062500, 2021.4739990234375, 1146.8509521484375, 2021.4739990234375);
+ // Segment 1146.8510041236877 2021.4740112423897 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8510041236877 2020.1240112185478
+ path.lineTo(1146.8509521484375, 2020.1240234375000);
+ // Segment 1146.8510041236877 2020.1240112185478 -0.0031276099109 0.0031991747760 0.0281856144058 0.0140930868099 1146.8580791488898 2020.1202473991566
+ path.cubicTo(1146.8479003906250, 2020.1271972656250, 1146.8862304687500, 2020.1343994140625, 1146.8580322265625, 2020.1202392578125);
+ // split at 0.3845077157021
+ // path.cubicTo(1146.8497314453125, 2020.1252441406250, 1146.8547363281250, 2020.1270751953125, 1146.8596191406250, 2020.1280517578125);
+ // path.cubicTo(1146.8675537109375, 2020.1296386718750, 1146.8753662109375, 2020.1289062500000, 1146.8580322265625, 2020.1202392578125);
+ // Segment 1146.8580791488898 2020.1202473991566 -0.0369995545027 -0.0123195805663 0.0067223483810 0.0136883790721 1146.8436709015571 2020.1149629481959
+ path.cubicTo(1146.8210449218750, 2020.1079101562500, 1146.8503417968750, 2020.1286621093750, 1146.8436279296875, 2020.1149902343750);
+ // Segment 1146.8436709015571 2020.1149629481959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8955864341058 2021.0760227314306
+ path.lineTo(1145.8956298828125, 2021.0760498046875);
+ path.close();
+ // start loop, contour: 24
+ // Segment 1146.8510041236877 2021.4740112423897 0.3016605789999 0.0000000000000 -0.2730166120260 0.2693306012106 1147.8064220516883 2021.0760227314306
+ path.moveTo(1146.8509521484375, 2021.4739990234375);
+ path.cubicTo(1147.1527099609375, 2021.4739990234375, 1147.5334472656250, 2021.3453369140625, 1147.8063964843750, 2021.0760498046875);
+ // Segment 1147.8064220516883 2021.0760227314306 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2020.1149629481959
+ path.lineTo(1146.8583984375000, 2020.1149902343750);
+ // Segment 1146.8583375842370 2020.1149629481959 -0.0067222671256 0.0136883164611 0.0369996293611 -0.0123196021258 1146.8439293663473 2020.1202473404985
+ path.cubicTo(1146.8515625000000, 2020.1286621093750, 1146.8809814453125, 2020.1079101562500, 1146.8438720703125, 2020.1202392578125);
+ // Segment 1146.8439293663473 2020.1202473404985 -0.0281857033438 0.0140931104690 0.0031276541428 0.0031991704542 1146.8510041236877 2020.1240112185478
+ path.cubicTo(1146.8157958984375, 2020.1343994140625, 1146.8541259765625, 2020.1271972656250, 1146.8509521484375, 2020.1240234375000);
+ // Segment 1146.8510041236877 2020.1240112185478 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8510041236877 2021.4740112423897
+ path.lineTo(1146.8509521484375, 2021.4739990234375);
+ path.close();
+ // start loop, contour: 25
+ // Segment 1147.8064220516883 2021.0760227314306 0.5430154146087 -0.5356841365729 0.5430154146087 0.5356841365729 1147.8064220516883 2019.1652101405787
+ path.moveTo(1147.8063964843750, 2021.0760498046875);
+ path.cubicTo(1148.3494873046875, 2020.5402832031250, 1148.3494873046875, 2019.7009277343750, 1147.8063964843750, 2019.1651611328125);
+ // Segment 1147.8064220516883 2019.1652101405787 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375842370 2020.1262699238134
+ path.lineTo(1146.8583984375000, 2020.1262207031250);
+ // Segment 1146.8583375842370 2020.1262699238134 0.0071280060876 0.0070317705240 0.0071280060876 -0.0070317705240 1146.8583375842370 2020.1149629481959
+ path.cubicTo(1146.8654785156250, 2020.1333007812500, 1146.8654785156250, 2020.1079101562500, 1146.8583984375000, 2020.1149902343750);
+ // Segment 1146.8583375842370 2020.1149629481959 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220516883 2021.0760227314306
+ path.lineTo(1147.8063964843750, 2021.0760498046875);
+ path.close();
+ // start loop, contour: 26
+ // Segment 1147.8064220383478 2019.1652101274185 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1145.8121519520594 2017.1978648896866
+ path.moveTo(1147.8063964843750, 2019.1651611328125);
+ path.lineTo(1145.8121337890625, 2017.1978759765625);
+ // Segment 1145.8121519520594 2017.1978648896866 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1144.8640675112890 2018.1589246992417
+ path.lineTo(1144.8640136718750, 2018.1589355468750);
+ // Segment 1144.8640675112890 2018.1589246992417 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1146.8583375975775 2020.1262699369736
+ path.lineTo(1146.8583984375000, 2020.1262207031250);
+ // Segment 1146.8583375975775 2020.1262699369736 0.0000000000000 0.0000000000000 0.0000000000000 0.0000000000000 1147.8064220383478 2019.1652101274185
+ path.lineTo(1147.8063964843750, 2019.1651611328125);
+ path.close();
+
+testSimplify(reporter, path, filename);
+}
+
+static void testQuads66(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(3, 1, 2, 2);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(2, 1);
+ path.lineTo(2, 1);
+ path.quadTo(1, 2, 2, 2);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads67(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(3, 2);
+ path.quadTo(1, 3, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(2, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads68(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(1, 2);
+ path.quadTo(0, 3, 2, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(0, 1);
+ path.quadTo(1, 3, 2, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads69(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(2, 2, 2, 3);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(1, 0);
+ path.quadTo(3, 0, 1, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads70(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 1);
+ path.quadTo(2, 3, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(2, 2);
+ path.quadTo(1, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads71(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 1);
+ path.quadTo(2, 3, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(3, 0);
+ path.lineTo(2, 2);
+ path.quadTo(1, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads72(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(1, 1);
+ path.quadTo(2, 3, 3, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 1);
+ path.lineTo(2, 2);
+ path.quadTo(1, 3, 3, 3);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void testQuads73(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.lineTo(0, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
+static void bug5169(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 0, 64.8889f
+path.cubicTo(SkBits2Float(0x434e0000), SkBits2Float(0x4281c71c), SkBits2Float(0x00000000), SkBits2Float(0xc2a238e4), SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 206, 64.8889f, 0, -81.1111f, 0, 64.8889f
+path.moveTo(SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // 176, 18.8889f
+path.cubicTo(SkBits2Float(0xc29e0000), SkBits2Float(0xc25c71c7), SkBits2Float(0x42b20000), SkBits2Float(0x42fbc71c), SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // -79, -55.1111f, 89, 125.889f, 176, 18.8889f
+ testSimplify(reporter, path, filename);
+}
+
+static void tiger8_393(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666)); // 92.6f, 427.3f
+path.cubicTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666), SkBits2Float(0x42b5cccd), SkBits2Float(0x43da1999), SkBits2Float(0x42b80000), SkBits2Float(0x43ddf333)); // 92.6f, 427.3f, 90.9f, 436.2f, 92, 443.9f
+path.cubicTo(SkBits2Float(0x42b80000), SkBits2Float(0x43ddf333), SkBits2Float(0x42b30000), SkBits2Float(0x43e17333), SkBits2Float(0x42cf999a), SkBits2Float(0x43e1b333)); // 92, 443.9f, 89.5f, 450.9f, 103.8f, 451.4f
+path.cubicTo(SkBits2Float(0x42ec3334), SkBits2Float(0x43e14ccd), SkBits2Float(0x42e73334), SkBits2Float(0x43ddf333), SkBits2Float(0x42e73334), SkBits2Float(0x43ddf333)); // 118.1f, 450.6f, 115.6f, 443.9f, 115.6f, 443.9f
+path.cubicTo(SkBits2Float(0x42e7999a), SkBits2Float(0x43de8000), SkBits2Float(0x42ea6667), SkBits2Float(0x43db4000), SkBits2Float(0x42e60001), SkBits2Float(0x43d5a666)); // 115.8f, 445, 117.2f, 438.5f, 115, 427.3f
+ testSimplify(reporter, path, filename);
+}
+
+// triggers angle assert from distance field code
+static void carsvg_1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 462.82f
+path.cubicTo(SkBits2Float(0x4396b50e), SkBits2Float(0x43e63c20), SkBits2Float(0x43998931), SkBits2Float(0x43e6c43e), SkBits2Float(0x439cb6a8), SkBits2Float(0x43e70ef9)); // 301.414f, 460.47f, 307.072f, 461.533f, 313.427f, 462.117f
+path.cubicTo(SkBits2Float(0x439dfc1e), SkBits2Float(0x43e72ce0), SkBits2Float(0x439a285c), SkBits2Float(0x43e717fb), SkBits2Float(0x4398e23c), SkBits2Float(0x43e7027c)); // 315.97f, 462.351f, 308.315f, 462.187f, 305.767f, 462.019f
+path.cubicTo(SkBits2Float(0x4398136f), SkBits2Float(0x43e6f4db), SkBits2Float(0x439a7e14), SkBits2Float(0x43e6d390), SkBits2Float(0x439b4ba9), SkBits2Float(0x43e6b956)); // 304.152f, 461.913f, 308.985f, 461.653f, 310.591f, 461.448f
+path.cubicTo(SkBits2Float(0x439c2b19), SkBits2Float(0x43e68603), SkBits2Float(0x43abf4df), SkBits2Float(0x43e9ca9e), SkBits2Float(0x43a1daea), SkBits2Float(0x43e912a5)); // 312.337f, 461.047f, 343.913f, 467.583f, 323.71f, 466.146f
+path.cubicTo(SkBits2Float(0x43a4f45a), SkBits2Float(0x43e78baf), SkBits2Float(0x43a2a391), SkBits2Float(0x43e86a82), SkBits2Float(0x43a946bd), SkBits2Float(0x43e90c56)); // 329.909f, 463.091f, 325.278f, 464.832f, 338.553f, 466.096f
+path.lineTo(SkBits2Float(0x43a4250b), SkBits2Float(0x43e998dc)); // 328.289f, 467.194f
+path.cubicTo(SkBits2Float(0x43a8a9c8), SkBits2Float(0x43e8f06c), SkBits2Float(0x43a95cb5), SkBits2Float(0x43e84ea6), SkBits2Float(0x43a6f7c1), SkBits2Float(0x43e9bdb5)); // 337.326f, 465.878f, 338.724f, 464.614f, 333.936f, 467.482f
+path.cubicTo(SkBits2Float(0x43a59ed0), SkBits2Float(0x43e9d2ca), SkBits2Float(0x4395ea4d), SkBits2Float(0x43e92afe), SkBits2Float(0x43a06569), SkBits2Float(0x43e7773d)); // 331.241f, 467.647f, 299.83f, 466.336f, 320.792f, 462.932f
+path.cubicTo(SkBits2Float(0x438bf0ff), SkBits2Float(0x43ea0fef), SkBits2Float(0x43a0e17a), SkBits2Float(0x43e5f41b), SkBits2Float(0x4398f3fb), SkBits2Float(0x43e804c8)); // 279.883f, 468.124f, 321.762f, 459.907f, 305.906f, 464.037f
+path.lineTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 462.82f
+path.close();
+
+ testSimplify(reporter, path, filename);
+}
+
+static void simplifyTest_1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
+path.moveTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 119.752f
+path.quadTo(SkBits2Float(0x42c26810), SkBits2Float(0x42e214b8), SkBits2Float(0x42cdcad5), SkBits2Float(0x42d82aa2)); // 97.2032f, 113.04f, 102.896f, 108.083f
+path.lineTo(SkBits2Float(0x42cdcb21), SkBits2Float(0x42d82a61)); // 102.897f, 108.083f
+path.quadTo(SkBits2Float(0x42d5e3c8), SkBits2Float(0x42d12140), SkBits2Float(0x42e20ee8), SkBits2Float(0x42cdc937)); // 106.945f, 104.565f, 113.029f, 102.893f
+path.lineTo(SkBits2Float(0x42e256e3), SkBits2Float(0x42cdbc92)); // 113.17f, 102.868f
+path.lineTo(SkBits2Float(0x42f5eadb), SkBits2Float(0x42cc2cb3)); // 122.959f, 102.087f
+path.lineTo(SkBits2Float(0x42f746a6), SkBits2Float(0x42cccf85)); // 123.638f, 102.405f
+path.quadTo(SkBits2Float(0x42fa586c), SkBits2Float(0x42d126c4), SkBits2Float(0x42f6c657), SkBits2Float(0x42d5d315)); // 125.173f, 104.576f, 123.387f, 106.912f
+path.lineTo(SkBits2Float(0x42f591eb), SkBits2Float(0x42d4e76d)); // 122.785f, 106.452f
+path.lineTo(SkBits2Float(0x42f6c6e0), SkBits2Float(0x42d5d261)); // 123.388f, 106.911f
+path.quadTo(SkBits2Float(0x42f6bb33), SkBits2Float(0x42d5e1bb), SkBits2Float(0x42f6a3d8), SkBits2Float(0x42d6007c)); // 123.366f, 106.941f, 123.32f, 107.001f
+path.quadTo(SkBits2Float(0x42ea3850), SkBits2Float(0x42e65af0), SkBits2Float(0x42d97a6e), SkBits2Float(0x42ed841c)); // 117.11f, 115.178f, 108.739f, 118.758f
+path.lineTo(SkBits2Float(0x42d91d92), SkBits2Float(0x42ed9ec0)); // 108.558f, 118.81f
+path.lineTo(SkBits2Float(0x42c1a959), SkBits2Float(0x42f146b0)); // 96.8308f, 120.638f
+path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80f0)); // 95.9684f, 119.752f
+path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 119.752f
+path.close();
+path.moveTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 120.026f
+path.lineTo(SkBits2Float(0x42c16d91), SkBits2Float(0x42efc72c)); // 96.714f, 119.889f
+path.lineTo(SkBits2Float(0x42c131c9), SkBits2Float(0x42ee47a8)); // 96.5972f, 119.14f
+path.lineTo(SkBits2Float(0x42d8a602), SkBits2Float(0x42ea9fb8)); // 108.324f, 117.312f
+path.lineTo(SkBits2Float(0x42d8e1ca), SkBits2Float(0x42ec1f3c)); // 108.441f, 118.061f
+path.lineTo(SkBits2Float(0x42d84926), SkBits2Float(0x42eaba5c)); // 108.143f, 117.364f
+path.quadTo(SkBits2Float(0x42e84a40), SkBits2Float(0x42e3e1f0), SkBits2Float(0x42f439a2), SkBits2Float(0x42d42af8)); // 116.145f, 113.941f, 122.113f, 106.084f
+path.quadTo(SkBits2Float(0x42f45121), SkBits2Float(0x42d40c08), SkBits2Float(0x42f45cf6), SkBits2Float(0x42d3fc79)); // 122.158f, 106.023f, 122.182f, 105.993f
+path.lineTo(SkBits2Float(0x42f45d7f), SkBits2Float(0x42d3fbc5)); // 122.183f, 105.992f
+path.quadTo(SkBits2Float(0x42f69510), SkBits2Float(0x42d114f4), SkBits2Float(0x42f4ccce), SkBits2Float(0x42ce8fb7)); // 123.291f, 104.541f, 122.4f, 103.281f
+path.lineTo(SkBits2Float(0x42f609ba), SkBits2Float(0x42cdaf9e)); // 123.019f, 102.843f
+path.lineTo(SkBits2Float(0x42f62899), SkBits2Float(0x42cf3289)); // 123.079f, 103.599f
+path.lineTo(SkBits2Float(0x42e294a1), SkBits2Float(0x42d0c268)); // 113.29f, 104.38f
+path.lineTo(SkBits2Float(0x42e275c2), SkBits2Float(0x42cf3f7d)); // 113.23f, 103.624f
+path.lineTo(SkBits2Float(0x42e2dc9c), SkBits2Float(0x42d0b5c3)); // 113.431f, 104.355f
+path.quadTo(SkBits2Float(0x42d75bb8), SkBits2Float(0x42d3df08), SkBits2Float(0x42cfc853), SkBits2Float(0x42da7457)); // 107.679f, 105.936f, 103.891f, 109.227f
+path.lineTo(SkBits2Float(0x42cec9ba), SkBits2Float(0x42d94f5c)); // 103.394f, 108.655f
+path.lineTo(SkBits2Float(0x42cfc89f), SkBits2Float(0x42da7416)); // 103.892f, 109.227f
+path.quadTo(SkBits2Float(0x42c53268), SkBits2Float(0x42e3ac00), SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d67)); // 98.5984f, 113.836f, 97.4596f, 120.026f
+path.lineTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 120.026f
+path.close();
+
+ testSimplify(reporter, path, filename);
+}
+
+static void joel_1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
path.moveTo(144.859f, 285.172f);
path.lineTo(144.859f, 285.172f);
path.lineTo(144.859f, 285.172f);
@@ -5677,12 +5677,12 @@ path.lineTo(139.742f, 275.118f); path.cubicTo(143.937f, 276.493f, 146.219f, 280.977f, 144.859f, 285.173f);
path.lineTo(141.406f, 284.055f);
path.close();
- testSimplify(reporter, path, filename); + testSimplify(reporter, path, filename);
}
-static void joel_2(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); +static void joel_2(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
path.moveTo(403.283f, 497.197f);
path.cubicTo(403.424f, 497.244f, 391.111f, 495.556f, 391.111f, 495.556f);
@@ -5712,12 +5712,12 @@ path.lineTo(398.375f, 501.976f); path.lineTo(403.283f, 497.197f);
path.lineTo(403.283f, 497.197f);
path.close();
- testSimplify(reporter, path, filename); + testSimplify(reporter, path, filename);
}
-static void joel_3(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); +static void joel_3(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
path.moveTo(391.097f, 334.453f);
path.lineTo(390.761f, 334.617f);
path.lineTo(390.425f, 333.937f);
@@ -5774,13 +5774,13 @@ path.lineTo(450.979f, 295.89f); path.lineTo(451.385f, 296.531f);
path.lineTo(391.127f, 334.437f);
path.lineTo(390.729f, 333.781f);
-path.close(); - testSimplify(reporter, path, filename); +path.close();
+ testSimplify(reporter, path, filename);
}
- -static void joel_4(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); +
+static void joel_4(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
path.moveTo(SkBits2Float(0x4199d4fe), SkBits2Float(0x4265ac08)); // 19.229f, 57.418f
path.cubicTo(SkBits2Float(0x419be979), SkBits2Float(0x426574bc), SkBits2Float(0x419c2b02), SkBits2Float(0x42653c6a), SkBits2Float(0x419af5c3), SkBits2Float(0x42645f3b)); // 19.489f, 57.364f, 19.521f, 57.309f, 19.37f, 57.093f
path.cubicTo(SkBits2Float(0x419a1894), SkBits2Float(0x4263a3d7), SkBits2Float(0x4198cccd), SkBits2Float(0x4262f2b0), SkBits2Float(0x4197c290), SkBits2Float(0x4262374b)); // 19.262f, 56.91f, 19.1f, 56.737f, 18.97f, 56.554f
@@ -6529,12 +6529,12 @@ path.cubicTo(SkBits2Float(0x41b64391), SkBits2Float(0x426f645b), SkBits2Float(0x path.cubicTo(SkBits2Float(0x41b5a7ea), SkBits2Float(0x426f5917), SkBits2Float(0x41b57adc), SkBits2Float(0x426f374d), SkBits2Float(0x41b53953), SkBits2Float(0x426f1688)); // 22.707f, 59.837f, 22.685f, 59.804f, 22.653f, 59.772f
path.lineTo(SkBits2Float(0x41b53953), SkBits2Float(0x426f0107)); // 22.653f, 59.751f
path.cubicTo(SkBits2Float(0x41b472ab), SkBits2Float(0x426ea7f0), SkBits2Float(0x41b3ac03), SkBits2Float(0x426e5a1e), SkBits2Float(0x41b3105d), SkBits2Float(0x426e020d)); // 22.556f, 59.664f, 22.459f, 59.588f, 22.383f, 59.502f
- testSimplify(reporter, path, filename); + testSimplify(reporter, path, filename);
}
- -static void joel_5(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType((SkPath::FillType) 0); +
+static void joel_5(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType((SkPath::FillType) 0);
path.moveTo(SkBits2Float(0x43c5145a), SkBits2Float(0x43dc82f2)); // 394.159f, 441.023f
path.lineTo(SkBits2Float(0x43c5145a), SkBits2Float(0x43dc82f2)); // 394.159f, 441.023f
path.close();
@@ -6779,12 +6779,12 @@ path.close(); path.moveTo(SkBits2Float(0x43c5145c), SkBits2Float(0x43dc82f2)); // 394.159f, 441.023f
path.lineTo(SkBits2Float(0x43c44562), SkBits2Float(0x43ddb0e6)); // 392.542f, 443.382f
path.lineTo(SkBits2Float(0x43c5145c), SkBits2Float(0x43dc82f2)); // 394.159f, 441.023f
-path.close(); - testSimplify(reporter, path, filename); +path.close();
+ testSimplify(reporter, path, filename);
}
- -static void joel_6(skiatest::Reporter* reporter, const char* filename) { - SkPath path; +
+static void joel_6(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
path.moveTo(SkBits2Float(0x43c38c6a), SkBits2Float(0x43a739fc)); // 391.097f, 334.453f
path.lineTo(SkBits2Float(0x43c36168), SkBits2Float(0x43a74efa)); // 390.761f, 334.617f
path.lineTo(SkBits2Float(0x43c33666), SkBits2Float(0x43a6f7f0)); // 390.425f, 333.937f
@@ -6841,12 +6841,12 @@ path.lineTo(SkBits2Float(0x43e17d50), SkBits2Float(0x4393f1ec)); // 450.979f, 2 path.lineTo(SkBits2Float(0x43e1b148), SkBits2Float(0x439443f8)); // 451.385f, 296.531f
path.lineTo(SkBits2Float(0x43c39042), SkBits2Float(0x43a737f0)); // 391.127f, 334.437f
path.lineTo(SkBits2Float(0x43c35d50), SkBits2Float(0x43a6e3f8)); // 390.729f, 333.781f
-path.close(); -testSimplify(reporter, path, filename); +path.close();
+testSimplify(reporter, path, filename);
}
- -static void joel_7(skiatest::Reporter* reporter, const char* filename) { - SkPath path; +
+static void joel_7(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
path.moveTo(SkBits2Float(0x4321220c), SkBits2Float(0x43eac70a)); // 161.133f, 469.555f
path.lineTo(SkBits2Float(0x4321220c), SkBits2Float(0x43eac70a)); // 161.133f, 469.555f
path.lineTo(SkBits2Float(0x431f8e14), SkBits2Float(0x43eb3b02)); // 159.555f, 470.461f
@@ -6896,12 +6896,12 @@ path.cubicTo(SkBits2Float(0x431a420d), SkBits2Float(0x43ea8810), SkBits2Float(0x path.lineTo(SkBits2Float(0x43163a1d), SkBits2Float(0x43e95126)); // 150.227f, 466.634f
path.cubicTo(SkBits2Float(0x431a0c09), SkBits2Float(0x43e8372a), SkBits2Float(0x431eec08), SkBits2Float(0x43e8de34), SkBits2Float(0x4321220d), SkBits2Float(0x43eac72a)); // 154.047f, 464.431f, 158.922f, 465.736f, 161.133f, 469.556f
path.lineTo(SkBits2Float(0x431dfa1d), SkBits2Float(0x43ebb000)); // 157.977f, 471.375f
-path.close(); -testSimplify(reporter, path, filename); +path.close();
+testSimplify(reporter, path, filename);
}
-static void joel_8(skiatest::Reporter* reporter, const char* filename) { - SkPath path; +static void joel_8(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
path.moveTo(SkBits2Float(0x42d97520), SkBits2Float(0x410ac429)); // 108.729f, 8.67289f
path.cubicTo(SkBits2Float(0x42d97520), SkBits2Float(0x410ac429), SkBits2Float(0x42e9a9ce), SkBits2Float(0x41834e87), SkBits2Float(0x42e99c8c), SkBits2Float(0x41c5c960)); // 108.729f, 8.67289f, 116.832f, 16.4133f, 116.806f, 24.7233f
path.cubicTo(SkBits2Float(0x42e98f49), SkBits2Float(0x4204221c), SkBits2Float(0x42d97520), SkBits2Float(0x4223825f), SkBits2Float(0x42d97520), SkBits2Float(0x4223825f)); // 116.78f, 33.0333f, 108.729f, 40.8773f, 108.729f, 40.8773f
@@ -6915,13 +6915,13 @@ path.cubicTo(SkBits2Float(0x42b1b1a1), SkBits2Float(0x41b95c48), SkBits2Float(0x path.cubicTo(SkBits2Float(0x42db9490), SkBits2Float(0x416c84c2), SkBits2Float(0x42d97520), SkBits2Float(0x410ac42a), SkBits2Float(0x42d97520), SkBits2Float(0x410ac42a)); // 109.79f, 14.7824f, 108.729f, 8.67289f, 108.729f, 8.67289f
path.lineTo(SkBits2Float(0x42d97520), SkBits2Float(0x410ac429)); // 108.729f, 8.67289f
path.close();
-testSimplify(reporter, path, filename); +testSimplify(reporter, path, filename);
}
- -static void joel_9(skiatest::Reporter* reporter, const char* filename) { -#if DEBUG_UNDER_DEVELOPMENT -// fails with image mismatch - SkPath path; +
+static void joel_9(skiatest::Reporter* reporter, const char* filename) {
+#if DEBUG_UNDER_DEVELOPMENT
+// fails with image mismatch
+ SkPath path;
path.moveTo(SkBits2Float(0x4310dbe7), SkBits2Float(0x438e9604)); // 144.859f, 285.172f
path.lineTo(SkBits2Float(0x4310dbe7), SkBits2Float(0x438e9604)); // 144.859f, 285.172f
path.lineTo(SkBits2Float(0x4310dbe7), SkBits2Float(0x438e9604)); // 144.859f, 285.172f
@@ -6972,15 +6972,15 @@ path.cubicTo(SkBits2Float(0x430ca001), SkBits2Float(0x438bde14), SkBits2Float(0x path.lineTo(SkBits2Float(0x430bbdf4), SkBits2Float(0x43898f1a)); // 139.742f, 275.118f
path.cubicTo(SkBits2Float(0x430fefe0), SkBits2Float(0x438a3f1a), SkBits2Float(0x43123811), SkBits2Float(0x438c7d0e), SkBits2Float(0x4310dbe8), SkBits2Float(0x438e9624)); // 143.937f, 276.493f, 146.219f, 280.977f, 144.859f, 285.173f
path.lineTo(SkBits2Float(0x430d67f0), SkBits2Float(0x438e070a)); // 141.406f, 284.055f
-path.close(); -testSimplify(reporter, path, filename); -#endif -}
- -static void joel_10(skiatest::Reporter* reporter, const char* filename) { -#if DEBUG_UNDER_DEVELOPMENT -// fails with image mismatch - SkPath path; +path.close();
+testSimplify(reporter, path, filename);
+#endif
+}
+
+static void joel_10(skiatest::Reporter* reporter, const char* filename) {
+#if DEBUG_UNDER_DEVELOPMENT
+// fails with image mismatch
+ SkPath path;
path.moveTo(SkBits2Float(0x440fc979), SkBits2Float(0x43d88000)); // 575.148f, 433
path.lineTo(SkBits2Float(0x440fc979), SkBits2Float(0x43d88000)); // 575.148f, 433
path.lineTo(SkBits2Float(0x440fc979), SkBits2Float(0x43d88000)); // 575.148f, 433
@@ -7031,15 +7031,15 @@ path.cubicTo(SkBits2Float(0x4410d78d), SkBits2Float(0x43db37f0), SkBits2Float(0x path.lineTo(SkBits2Float(0x44111106), SkBits2Float(0x43dd86ea)); // 580.266f, 443.054f
path.cubicTo(SkBits2Float(0x4410048b), SkBits2Float(0x43dcd7f0), SkBits2Float(0x440f720c), SkBits2Float(0x43da99dc), SkBits2Float(0x440fc989), SkBits2Float(0x43d87fe0)); // 576.071f, 441.687f, 573.782f, 437.202f, 575.149f, 432.999f
path.lineTo(SkBits2Float(0x4410a687), SkBits2Float(0x43d91000)); // 578.602f, 434.125f
-path.close(); -testSimplify(reporter, path, filename); -#endif -}
- -static void joel_11(skiatest::Reporter* reporter, const char* filename) { -#if DEBUG_UNDER_DEVELOPMENT -// fails with image mismatch - SkPath path; +path.close();
+testSimplify(reporter, path, filename);
+#endif
+}
+
+static void joel_11(skiatest::Reporter* reporter, const char* filename) {
+#if DEBUG_UNDER_DEVELOPMENT
+// fails with image mismatch
+ SkPath path;
path.moveTo(SkBits2Float(0x43c9d000), SkBits2Float(0x4411977d)); // 403.625f, 582.367f
path.lineTo(SkBits2Float(0x43c9d000), SkBits2Float(0x4411977d)); // 403.625f, 582.367f
path.lineTo(SkBits2Float(0x43c9d000), SkBits2Float(0x4411977d)); // 403.625f, 582.367f
@@ -7091,12 +7091,12 @@ path.cubicTo(SkBits2Float(0x43c88418), SkBits2Float(0x44133010), SkBits2Float(0x path.lineTo(SkBits2Float(0x43c6bd0e), SkBits2Float(0x4413f591)); // 397.477f, 591.837f
path.cubicTo(SkBits2Float(0x43c64810), SkBits2Float(0x4412e116), SkBits2Float(0x43c7a70a), SkBits2Float(0x4411d28f), SkBits2Float(0x43c9d000), SkBits2Float(0x4411978d)); // 396.563f, 587.517f, 399.305f, 583.29f, 403.625f, 582.368f
path.lineTo(SkBits2Float(0x43ca3106), SkBits2Float(0x44127b02)); // 404.383f, 585.922f
-path.close(); -testSimplify(reporter, path, filename); -#endif +path.close();
+testSimplify(reporter, path, filename);
+#endif
}
- -static void make_joel_12(SkPath& path) { +
+static void make_joel_12(SkPath& path) {
path.moveTo(SkBits2Float(0x4324e9fc), SkBits2Float(0x437211ec)); // 164.914f, 242.07f
path.lineTo(SkBits2Float(0x4324e9fc), SkBits2Float(0x437211ec)); // 164.914f, 242.07f
path.lineTo(SkBits2Float(0x4324e9fc), SkBits2Float(0x437211ec)); // 164.914f, 242.07f
@@ -7148,46 +7148,46 @@ path.cubicTo(SkBits2Float(0x4321ec08), SkBits2Float(0x436be000), SkBits2Float(0x path.lineTo(SkBits2Float(0x43220000), SkBits2Float(0x436729fc)); // 162, 231.164f
path.cubicTo(SkBits2Float(0x4325d1ec), SkBits2Float(0x43696000), SkBits2Float(0x4327220c), SkBits2Float(0x436e4000), SkBits2Float(0x4324e9fc), SkBits2Float(0x437211ec)); // 165.82f, 233.375f, 167.133f, 238.25f, 164.914f, 242.07f
path.lineTo(SkBits2Float(0x4321c5e3), SkBits2Float(0x43704000)); // 161.773f, 240.25f
-path.close(); -} - -static void joel_12(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - make_joel_12(path); - testSimplify(reporter, path, filename); -}
- -static void joel_12x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - make_joel_12(path); - testSimplify(reporter, path, filename); -} - -static void make_joel_13(SkPath& path) { +path.close();
+}
+
+static void joel_12(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ make_joel_12(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void joel_12x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ make_joel_12(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void make_joel_13(SkPath& path) {
path.moveTo(SkBits2Float(0x43b4126f), SkBits2Float(0x43c058f6)); // 360.144f, 384.695f
path.cubicTo(SkBits2Float(0x43bd7c6b), SkBits2Float(0x43c05b02), SkBits2Float(0x43c51d71), SkBits2Float(0x43b8e8f6), SkBits2Float(0x43c5276d), SkBits2Float(0x43afc1ec)); // 378.972f, 384.711f, 394.23f, 369.82f, 394.308f, 351.515f
path.cubicTo(SkBits2Float(0x43c51d71), SkBits2Float(0x43a688f6), SkBits2Float(0x43bd7c6b), SkBits2Float(0x439f16ea), SkBits2Float(0x43b4126f), SkBits2Float(0x439f16ea)); // 394.23f, 333.07f, 378.972f, 318.179f, 360.144f, 318.179f
path.cubicTo(SkBits2Float(0x43aaa979), SkBits2Float(0x439f16ea), SkBits2Float(0x43a3076d), SkBits2Float(0x43a688f6), SkBits2Float(0x43a31063), SkBits2Float(0x43afc1ec)); // 341.324f, 318.179f, 326.058f, 333.07f, 326.128f, 351.515f
path.cubicTo(SkBits2Float(0x43a3076d), SkBits2Float(0x43b8e8f6), SkBits2Float(0x43aaa959), SkBits2Float(0x43c05b02), SkBits2Float(0x43b4126f), SkBits2Float(0x43c058f6)); // 326.058f, 369.82f, 341.323f, 384.711f, 360.144f, 384.695f
-path.close(); -} - -static void joel_13(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - make_joel_13(path); - testSimplify(reporter, path, filename); -}
- - -static void joel_13x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - make_joel_13(path); - testSimplify(reporter, path, filename); -} - -static void make_joel_14(SkPath& path) { +path.close();
+}
+
+static void joel_13(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ make_joel_13(path);
+ testSimplify(reporter, path, filename);
+}
+
+
+static void joel_13x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ make_joel_13(path);
+ testSimplify(reporter, path, filename);
+}
+
+static void make_joel_14(SkPath& path) {
path.moveTo(SkBits2Float(0x43f3b354), SkBits2Float(0x43d6770a)); // 487.401f, 428.93f
path.lineTo(SkBits2Float(0x43f3b354), SkBits2Float(0x43d6770a)); // 487.401f, 428.93f
path.close();
@@ -7369,23 +7369,23 @@ path.close(); path.moveTo(SkBits2Float(0x43f3b353), SkBits2Float(0x43d67709)); // 487.401f, 428.93f
path.cubicTo(SkBits2Float(0x43f39957), SkBits2Float(0x43d79ef9), SkBits2Float(0x43f3ca5d), SkBits2Float(0x43d8a603), SkBits2Float(0x43f48061), SkBits2Float(0x43d97d0d)); // 487.198f, 431.242f, 487.581f, 433.297f, 489.003f, 434.977f
path.cubicTo(SkBits2Float(0x43f3ca5d), SkBits2Float(0x43d8a603), SkBits2Float(0x43f39957), SkBits2Float(0x43d79ef9), SkBits2Float(0x43f3b353), SkBits2Float(0x43d67709)); // 487.581f, 433.297f, 487.198f, 431.242f, 487.401f, 428.93f
-path.close(); -} - -static void joel_14(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - make_joel_14(path); -testSimplify(reporter, path, filename); -}
- -static void joel_14x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - make_joel_14(path); -testSimplify(reporter, path, filename); -}
- -static void make_joel_15(SkPath& path) { +path.close();
+}
+
+static void joel_14(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ make_joel_14(path);
+testSimplify(reporter, path, filename);
+}
+
+static void joel_14x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ make_joel_14(path);
+testSimplify(reporter, path, filename);
+}
+
+static void make_joel_15(SkPath& path) {
path.moveTo(SkBits2Float(0x439e276d), SkBits2Float(0x43dad106)); // 316.308f, 437.633f
path.lineTo(SkBits2Float(0x439e276d), SkBits2Float(0x43dad106)); // 316.308f, 437.633f
path.close();
@@ -7525,23 +7525,23 @@ path.close(); path.moveTo(SkBits2Float(0x439e276d), SkBits2Float(0x43dad105)); // 316.308f, 437.633f
path.cubicTo(SkBits2Float(0x439e4979), SkBits2Float(0x43dba4fd), SkBits2Float(0x439dc375), SkBits2Float(0x43dce915), SkBits2Float(0x439ecf5d), SkBits2Float(0x43dd3fff)); // 316.574f, 439.289f, 315.527f, 441.821f, 317.62f, 442.5f
path.cubicTo(SkBits2Float(0x439dc355), SkBits2Float(0x43dce8f5), SkBits2Float(0x439e4959), SkBits2Float(0x43dba4fd), SkBits2Float(0x439e276d), SkBits2Float(0x43dad105)); // 315.526f, 441.82f, 316.573f, 439.289f, 316.308f, 437.633f
-path.close(); -} - -static void joel_15(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - make_joel_15(path); -testSimplify(reporter, path, filename); -}
- -static void joel_15x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - make_joel_15(path); -testSimplify(reporter, path, filename); -}
- -static void make_joel_16(SkPath& path) { +path.close();
+}
+
+static void joel_15(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ make_joel_15(path);
+testSimplify(reporter, path, filename);
+}
+
+static void joel_15x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ make_joel_15(path);
+testSimplify(reporter, path, filename);
+}
+
+static void make_joel_16(SkPath& path) {
path.moveTo(SkBits2Float(0x420e6c8b), SkBits2Float(0x426bdf3b)); // 35.606f, 58.968f
path.lineTo(SkBits2Float(0x420fcccd), SkBits2Float(0x426c7ef9)); // 35.95f, 59.124f
path.cubicTo(SkBits2Float(0x420fcccd), SkBits2Float(0x426c7ef9), SkBits2Float(0x42093d71), SkBits2Float(0x426c6e97), SkBits2Float(0x42036c8b), SkBits2Float(0x426cbf7c)); // 35.95f, 59.124f, 34.31f, 59.108f, 32.856f, 59.187f
@@ -7663,513 +7663,513 @@ path.cubicTo(SkBits2Float(0x41b60416), SkBits2Float(0x427ad603), SkBits2Float(0x path.moveTo(SkBits2Float(0x41bed2ef), SkBits2Float(0x4274cbc6)); // 23.853f, 61.199f
path.close();
path.moveTo(SkBits2Float(0x41c04fdd), SkBits2Float(0x42746560)); // 24.039f, 61.099f
-path.close(); -} - -static void joel_16(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - make_joel_16(path); -testSimplify(reporter, path, filename); -}
- -static void joel_16x(skiatest::Reporter* reporter, const char* filename) { - SkPath path; - path.setFillType(SkPath::kEvenOdd_FillType); - make_joel_16(path); -testSimplify(reporter, path, filename); -} - -static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; - -static TestDesc tests[] = { - TEST(joel_16x), - TEST(joel_16), - TEST(joel_15x), - TEST(joel_15), - TEST(joel_14x), - TEST(joel_14), - TEST(joel_13x), - TEST(joel_13), - TEST(joel_12x), - TEST(joel_12), - TEST(joel_11), - TEST(joel_10), - TEST(joel_9), - TEST(joel_8), - TEST(joel_7), - TEST(joel_6), - TEST(joel_5), - TEST(joel_4), - TEST(joel_3), - TEST(joel_2), - TEST(joel_1), - TEST(simplifyTest_1), - TEST(carsvg_1), - TEST(tiger8_393), - TEST(bug5169), - TEST(testQuads73), - TEST(testQuads72), - TEST(testQuads71), - TEST(testQuads70), - TEST(testQuads69), - TEST(testQuads68), - TEST(testQuads67), - TEST(testQuads66), - TEST(dean4), - TEST(fuzz763_4713_b), - TEST(fuzz_twister2), - TEST(fuzz_twister), - TEST(fuzz994s_3414), - TEST(fuzz994s_11), - TEST(cr514118), - TEST(fuzz864a), - TEST(testQuads65), - TEST(testIssue3838_3), - TEST(testIssue3838), - TEST(testArc), - TEST(testTriangle2), - TEST(testTriangle1), - TEST(testQuads64), - TEST(testQuads63), - TEST(testQuads62), - TEST(testRect4), - TEST(testRect3), - TEST(testQuadralateral10), - TEST(testQuads61), - TEST(testQuads60), - TEST(testQuads59), - TEST(testQuads58), - TEST(testQuads57), - TEST(testQuads56), - TEST(testQuads54), - TEST(testQuads53), - TEST(testQuads52), - TEST(testQuads51), - TEST(testQuads50), - TEST(testQuads49), - TEST(testQuads48), - TEST(testQuads47), - TEST(testQuads46x), - TEST(testQuads45), - TEST(testQuads44), - TEST(testQuads43), - TEST(testQuads42), - TEST(testQuads41), - TEST(testQuads36), - TEST(testQuads37), - TEST(testQuads38), - TEST(testQuads39), - TEST(testQuads40), - TEST(testQuads16), - TEST(testQuads17), - TEST(testQuads18), - TEST(testQuads19), - TEST(testQuads20), - TEST(testQuads21), - TEST(testQuads22), - TEST(testQuads23), - TEST(testQuads24), - TEST(testQuads25), - TEST(testQuads26), - TEST(testQuads27), - TEST(testQuads28), - TEST(testQuads29), - TEST(testQuads30), - TEST(testQuads31), - TEST(testQuads32), - TEST(testQuads33), - TEST(testQuads34), - TEST(testQuads35), - TEST(testDegenerates1), - TEST(testQuad13), - TEST(testQuad14), - TEST(testQuad15), - TEST(testQuadratic56), - TEST(testQuadralateral4), - TEST(testQuadralateral3), - TEST(testDegenerate5), - TEST(testQuad12), - TEST(testQuadratic51), - TEST(testQuad8), - TEST(testQuad11), - TEST(testQuad10), - TEST(testQuad9), - TEST(testTriangles4x), - TEST(testTriangles3x), - TEST(testRect2), - TEST(testRect1), - TEST(tooCloseTest), - TEST(skphealth_com76), - TEST(testQuadLineIntersect1), - TEST(testQuadLineIntersect2), - TEST(testQuadLineIntersect3), - TEST(testQuad7), - TEST(testQuad6), - TEST(testQuad5), - TEST(testQuad4), - TEST(testQuad3), - TEST(testQuad2), - TEST(testAddTCoincident2), - TEST(testAddTCoincident1), - TEST(testTriangles2), - TEST(testTriangles1), - TEST(testQuadratic97), - TEST(testQuadratic96), - TEST(testQuadratic95), - TEST(testQuadratic94), - TEST(testQuadralateral2), - TEST(testQuad1), - TEST(testCubic2), - TEST(testCubic1), - TEST(testQuadralateral1), - TEST(testLine85), - TEST(testLine84), - TEST(testLine84x), - TEST(testLine83), - TEST(testLine82h), - TEST(testLine82g), - TEST(testLine82f), - TEST(testLine82e), - TEST(testLine82d), - TEST(testLine82c), - TEST(testLine82b), - TEST(testLine82a), - TEST(testLine82), - TEST(testQuadratic93), - TEST(testQuadratic92x), - TEST(testQuadratic91), - TEST(testQuadratic90x), - TEST(testQuadratic89x), - TEST(testQuadratic88), - TEST(testQuadratic87), - TEST(testQuadratic86), - TEST(testQuadratic85), - TEST(testQuadratic84), - TEST(testQuadratic83), - TEST(testQuadratic82), - TEST(testQuadratic81), - TEST(testQuadratic80), - TEST(testEight1), - TEST(testEight2), - TEST(testEight3), - TEST(testEight4), - TEST(testEight5), - TEST(testEight6), - TEST(testEight7), - TEST(testEight8), - TEST(testEight9), - TEST(testEight10), - TEST(testQuadratic79), - TEST(testQuadratic78), - TEST(testQuadratic77), - TEST(testQuadratic76), - TEST(testQuadratic75), - TEST(testQuadratic74), - TEST(testQuadratic73), - TEST(testQuadratic72), - TEST(testQuadratic71), - TEST(testQuadratic70x), - TEST(testQuadratic69), - TEST(testQuadratic68), - TEST(testQuadratic67x), - TEST(testQuadratic65), - TEST(testQuadratic64), - TEST(testQuadratic63), - TEST(testLine1a), - TEST(testLine1ax), - TEST(testQuadratic59), - TEST(testQuadratic59x), - TEST(testQuadratic58), - TEST(testQuadratic55), - TEST(testQuadratic53), - TEST(testQuadratic38), - TEST(testQuadratic37), - TEST(testQuadratic36), - TEST(testQuadratic35), - TEST(testQuadratic34), - TEST(testQuadratic33), - TEST(testQuadratic32), - TEST(testQuadratic31), - TEST(testQuadratic30), - TEST(testQuadratic29), - TEST(testQuadratic28), - TEST(testQuadratic27), - TEST(testQuadratic26), - TEST(testQuadratic25), - TEST(testQuadratic24), - TEST(testQuadratic23), - TEST(testQuadratic22), - TEST(testQuadratic21), - TEST(testQuadratic20), - TEST(testQuadratic19), - TEST(testQuadratic18), - TEST(testQuadratic17x), - TEST(testQuadratic15), - TEST(testQuadratic14), - TEST(testQuadratic9), - TEST(testQuadratic8), - TEST(testQuadratic7), - TEST(testQuadratic6), - TEST(testQuadratic5), - TEST(testQuadratic4x), - TEST(testQuadratic3x), - TEST(testQuadratic2x), - TEST(testQuadratic1x), - TEST(testQuadratic4), - TEST(testQuadratic3), - TEST(testQuadratic2), - TEST(testQuadratic1), - TEST(testLine4ax), - TEST(testLine3aax), - TEST(testLine2ax), - TEST(testLine1ax), - TEST(testQuadralateral9x), - TEST(testQuadralateral8x), - TEST(testQuadralateral7x), - TEST(testQuadralateral6x), - TEST(testQuadralateral6ax), - TEST(testQuadralateral9), - TEST(testQuadralateral8), - TEST(testQuadralateral7), - TEST(testQuadralateral6), - TEST(testQuadralateral6a), - TEST(testFauxQuadralateral6dx), - TEST(testFauxQuadralateral6cx), - TEST(testFauxQuadralateral6bx), - TEST(testFauxQuadralateral6ax), - TEST(testFauxQuadralateral6x), - TEST(testFauxQuadralateral6d), - TEST(testFauxQuadralateral6c), - TEST(testFauxQuadralateral6b), - TEST(testFauxQuadralateral6a), - TEST(testFauxQuadralateral6), - TEST(testQuadralateral5x), - TEST(testQuadralateral5), - TEST(testNondegenerate4x), - TEST(testNondegenerate3x), - TEST(testNondegenerate2x), - TEST(testNondegenerate1x), - TEST(testNondegenerate4), - TEST(testNondegenerate3), - TEST(testNondegenerate2), - TEST(testNondegenerate1), - TEST(testDegenerate4x), - TEST(testDegenerate3x), - TEST(testDegenerate2x), - TEST(testDegenerate1x), - TEST(testDegenerate4), - TEST(testDegenerate3), - TEST(testDegenerate2), - TEST(testDegenerate1), - TEST(testLine79x), - TEST(testLine78x), - TEST(testLine77x), - TEST(testLine76x), - TEST(testLine75x), - TEST(testLine74x), - TEST(testLine73x), - TEST(testLine72x), - TEST(testLine71x), - TEST(testLine70x), - TEST(testLine69x), - TEST(testLine68hx), - TEST(testLine68gx), - TEST(testLine68fx), - TEST(testLine68ex), - TEST(testLine68dx), - TEST(testLine68cx), - TEST(testLine68bx), - TEST(testLine68ax), - TEST(testLine67x), - TEST(testLine66x), - TEST(testLine65x), - TEST(testLine64x), - TEST(testLine63x), - TEST(testLine62x), - TEST(testLine61x), - TEST(testLine60x), - TEST(testLine59x), - TEST(testLine58x), - TEST(testLine57x), - TEST(testLine56x), - TEST(testLine55x), - TEST(testLine54x), - TEST(testLine53x), - TEST(testLine52x), - TEST(testLine51x), - TEST(testLine50x), - TEST(testLine49x), - TEST(testLine48x), - TEST(testLine47x), - TEST(testLine46x), - TEST(testLine45x), - TEST(testLine44x), - TEST(testLine43x), - TEST(testLine42x), - TEST(testLine41x), - TEST(testLine40x), - TEST(testLine38x), - TEST(testLine37x), - TEST(testLine36x), - TEST(testLine35x), - TEST(testLine34x), - TEST(testLine33x), - TEST(testLine32x), - TEST(testLine31x), - TEST(testLine30x), - TEST(testLine29x), - TEST(testLine28x), - TEST(testLine27x), - TEST(testLine26x), - TEST(testLine25x), - TEST(testLine24ax), - TEST(testLine24x), - TEST(testLine23x), - TEST(testLine22x), - TEST(testLine21x), - TEST(testLine20x), - TEST(testLine19x), - TEST(testLine18x), - TEST(testLine17x), - TEST(testLine16x), - TEST(testLine15x), - TEST(testLine14x), - TEST(testLine13x), - TEST(testLine12x), - TEST(testLine11x), - TEST(testLine10ax), - TEST(testLine10x), - TEST(testLine9x), - TEST(testLine8x), - TEST(testLine7bx), - TEST(testLine7ax), - TEST(testLine7x), - TEST(testLine6x), - TEST(testLine5x), - TEST(testLine4x), - TEST(testLine3bx), - TEST(testLine3ax), - TEST(testLine3x), - TEST(testLine2x), - TEST(testLine1x), - TEST(testLine81), - TEST(testLine80), - TEST(testLine79), - TEST(testLine78), - TEST(testLine77), - TEST(testLine76), - TEST(testLine75), - TEST(testLine74), - TEST(testLine73), - TEST(testLine72), - TEST(testLine71), - TEST(testLine70), - TEST(testLine69), - TEST(testLine68h), - TEST(testLine68g), - TEST(testLine68f), - TEST(testLine68e), - TEST(testLine68d), - TEST(testLine68c), - TEST(testLine68b), - TEST(testLine68a), - TEST(testLine67), - TEST(testLine66), - TEST(testLine65), - TEST(testLine64), - TEST(testLine63), - TEST(testLine62), - TEST(testLine61), - TEST(testLine60), - TEST(testLine59), - TEST(testLine58), - TEST(testLine57), - TEST(testLine56), - TEST(testLine55), - TEST(testLine54), - TEST(testLine53), - TEST(testLine52), - TEST(testLine51), - TEST(testLine50), - TEST(testLine49), - TEST(testLine48), - TEST(testLine47), - TEST(testLine46), - TEST(testLine45), - TEST(testLine44), - TEST(testLine43), - TEST(testLine42), - TEST(testLine41), - TEST(testLine40), - TEST(testLine38), - TEST(testLine37), - TEST(testLine36), - TEST(testLine35), - TEST(testLine34), - TEST(testLine33), - TEST(testLine32), - TEST(testLine31), - TEST(testLine30), - TEST(testLine29), - TEST(testLine28), - TEST(testLine27), - TEST(testLine26), - TEST(testLine25), - TEST(testLine24a), - TEST(testLine24), - TEST(testLine23), - TEST(testLine22), - TEST(testLine21), - TEST(testLine20), - TEST(testLine19), - TEST(testLine18), - TEST(testLine17), - TEST(testLine16), - TEST(testLine15), - TEST(testLine14), - TEST(testLine13), - TEST(testLine12), - TEST(testLine11), - TEST(testLine10a), - TEST(testLine10), - TEST(testLine9), - TEST(testLine8), - TEST(testLine7b), - TEST(testLine7a), - TEST(testLine7), - TEST(testLine6), - TEST(testLine5), - TEST(testLine4), - TEST(testLine3b), - TEST(testLine3a), - TEST(testLine3), - TEST(testLine2), - TEST(testLine1), -}; - -static const size_t testCount = SK_ARRAY_COUNT(tests); - -static TestDesc subTests[] = { - TEST(fuzz994s_3414), - TEST(fuzz994s_11), -}; - -static const size_t subTestCount = SK_ARRAY_COUNT(subTests); - -static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0; - -static bool runSubTests = false; -static bool runSubTestsFirst = false; -static bool runReverse = false; - -DEF_TEST(PathOpsSimplify, reporter) { - if (runSubTests && runSubTestsFirst) { - RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse); - } - RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runReverse); - if (runSubTests && !runSubTestsFirst) { - RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse); - } -} +path.close();
+}
+
+static void joel_16(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ make_joel_16(path);
+testSimplify(reporter, path, filename);
+}
+
+static void joel_16x(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ make_joel_16(path);
+testSimplify(reporter, path, filename);
+}
+
+static void (*skipTest)(skiatest::Reporter* , const char* filename) = nullptr;
+static void (*firstTest)(skiatest::Reporter* , const char* filename) = nullptr;
+static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr;
+
+static TestDesc tests[] = {
+ TEST(joel_16x),
+ TEST(joel_16),
+ TEST(joel_15x),
+ TEST(joel_15),
+ TEST(joel_14x),
+ TEST(joel_14),
+ TEST(joel_13x),
+ TEST(joel_13),
+ TEST(joel_12x),
+ TEST(joel_12),
+ TEST(joel_11),
+ TEST(joel_10),
+ TEST(joel_9),
+ TEST(joel_8),
+ TEST(joel_7),
+ TEST(joel_6),
+ TEST(joel_5),
+ TEST(joel_4),
+ TEST(joel_3),
+ TEST(joel_2),
+ TEST(joel_1),
+ TEST(simplifyTest_1),
+ TEST(carsvg_1),
+ TEST(tiger8_393),
+ TEST(bug5169),
+ TEST(testQuads73),
+ TEST(testQuads72),
+ TEST(testQuads71),
+ TEST(testQuads70),
+ TEST(testQuads69),
+ TEST(testQuads68),
+ TEST(testQuads67),
+ TEST(testQuads66),
+ TEST(dean4),
+ TEST(fuzz763_4713_b),
+ TEST(fuzz_twister2),
+ TEST(fuzz_twister),
+ TEST(fuzz994s_3414),
+ TEST(fuzz994s_11),
+ TEST(cr514118),
+ TEST(fuzz864a),
+ TEST(testQuads65),
+ TEST(testIssue3838_3),
+ TEST(testIssue3838),
+ TEST(testArc),
+ TEST(testTriangle2),
+ TEST(testTriangle1),
+ TEST(testQuads64),
+ TEST(testQuads63),
+ TEST(testQuads62),
+ TEST(testRect4),
+ TEST(testRect3),
+ TEST(testQuadralateral10),
+ TEST(testQuads61),
+ TEST(testQuads60),
+ TEST(testQuads59),
+ TEST(testQuads58),
+ TEST(testQuads57),
+ TEST(testQuads56),
+ TEST(testQuads54),
+ TEST(testQuads53),
+ TEST(testQuads52),
+ TEST(testQuads51),
+ TEST(testQuads50),
+ TEST(testQuads49),
+ TEST(testQuads48),
+ TEST(testQuads47),
+ TEST(testQuads46x),
+ TEST(testQuads45),
+ TEST(testQuads44),
+ TEST(testQuads43),
+ TEST(testQuads42),
+ TEST(testQuads41),
+ TEST(testQuads36),
+ TEST(testQuads37),
+ TEST(testQuads38),
+ TEST(testQuads39),
+ TEST(testQuads40),
+ TEST(testQuads16),
+ TEST(testQuads17),
+ TEST(testQuads18),
+ TEST(testQuads19),
+ TEST(testQuads20),
+ TEST(testQuads21),
+ TEST(testQuads22),
+ TEST(testQuads23),
+ TEST(testQuads24),
+ TEST(testQuads25),
+ TEST(testQuads26),
+ TEST(testQuads27),
+ TEST(testQuads28),
+ TEST(testQuads29),
+ TEST(testQuads30),
+ TEST(testQuads31),
+ TEST(testQuads32),
+ TEST(testQuads33),
+ TEST(testQuads34),
+ TEST(testQuads35),
+ TEST(testDegenerates1),
+ TEST(testQuad13),
+ TEST(testQuad14),
+ TEST(testQuad15),
+ TEST(testQuadratic56),
+ TEST(testQuadralateral4),
+ TEST(testQuadralateral3),
+ TEST(testDegenerate5),
+ TEST(testQuad12),
+ TEST(testQuadratic51),
+ TEST(testQuad8),
+ TEST(testQuad11),
+ TEST(testQuad10),
+ TEST(testQuad9),
+ TEST(testTriangles4x),
+ TEST(testTriangles3x),
+ TEST(testRect2),
+ TEST(testRect1),
+ TEST(tooCloseTest),
+ TEST(skphealth_com76),
+ TEST(testQuadLineIntersect1),
+ TEST(testQuadLineIntersect2),
+ TEST(testQuadLineIntersect3),
+ TEST(testQuad7),
+ TEST(testQuad6),
+ TEST(testQuad5),
+ TEST(testQuad4),
+ TEST(testQuad3),
+ TEST(testQuad2),
+ TEST(testAddTCoincident2),
+ TEST(testAddTCoincident1),
+ TEST(testTriangles2),
+ TEST(testTriangles1),
+ TEST(testQuadratic97),
+ TEST(testQuadratic96),
+ TEST(testQuadratic95),
+ TEST(testQuadratic94),
+ TEST(testQuadralateral2),
+ TEST(testQuad1),
+ TEST(testCubic2),
+ TEST(testCubic1),
+ TEST(testQuadralateral1),
+ TEST(testLine85),
+ TEST(testLine84),
+ TEST(testLine84x),
+ TEST(testLine83),
+ TEST(testLine82h),
+ TEST(testLine82g),
+ TEST(testLine82f),
+ TEST(testLine82e),
+ TEST(testLine82d),
+ TEST(testLine82c),
+ TEST(testLine82b),
+ TEST(testLine82a),
+ TEST(testLine82),
+ TEST(testQuadratic93),
+ TEST(testQuadratic92x),
+ TEST(testQuadratic91),
+ TEST(testQuadratic90x),
+ TEST(testQuadratic89x),
+ TEST(testQuadratic88),
+ TEST(testQuadratic87),
+ TEST(testQuadratic86),
+ TEST(testQuadratic85),
+ TEST(testQuadratic84),
+ TEST(testQuadratic83),
+ TEST(testQuadratic82),
+ TEST(testQuadratic81),
+ TEST(testQuadratic80),
+ TEST(testEight1),
+ TEST(testEight2),
+ TEST(testEight3),
+ TEST(testEight4),
+ TEST(testEight5),
+ TEST(testEight6),
+ TEST(testEight7),
+ TEST(testEight8),
+ TEST(testEight9),
+ TEST(testEight10),
+ TEST(testQuadratic79),
+ TEST(testQuadratic78),
+ TEST(testQuadratic77),
+ TEST(testQuadratic76),
+ TEST(testQuadratic75),
+ TEST(testQuadratic74),
+ TEST(testQuadratic73),
+ TEST(testQuadratic72),
+ TEST(testQuadratic71),
+ TEST(testQuadratic70x),
+ TEST(testQuadratic69),
+ TEST(testQuadratic68),
+ TEST(testQuadratic67x),
+ TEST(testQuadratic65),
+ TEST(testQuadratic64),
+ TEST(testQuadratic63),
+ TEST(testLine1a),
+ TEST(testLine1ax),
+ TEST(testQuadratic59),
+ TEST(testQuadratic59x),
+ TEST(testQuadratic58),
+ TEST(testQuadratic55),
+ TEST(testQuadratic53),
+ TEST(testQuadratic38),
+ TEST(testQuadratic37),
+ TEST(testQuadratic36),
+ TEST(testQuadratic35),
+ TEST(testQuadratic34),
+ TEST(testQuadratic33),
+ TEST(testQuadratic32),
+ TEST(testQuadratic31),
+ TEST(testQuadratic30),
+ TEST(testQuadratic29),
+ TEST(testQuadratic28),
+ TEST(testQuadratic27),
+ TEST(testQuadratic26),
+ TEST(testQuadratic25),
+ TEST(testQuadratic24),
+ TEST(testQuadratic23),
+ TEST(testQuadratic22),
+ TEST(testQuadratic21),
+ TEST(testQuadratic20),
+ TEST(testQuadratic19),
+ TEST(testQuadratic18),
+ TEST(testQuadratic17x),
+ TEST(testQuadratic15),
+ TEST(testQuadratic14),
+ TEST(testQuadratic9),
+ TEST(testQuadratic8),
+ TEST(testQuadratic7),
+ TEST(testQuadratic6),
+ TEST(testQuadratic5),
+ TEST(testQuadratic4x),
+ TEST(testQuadratic3x),
+ TEST(testQuadratic2x),
+ TEST(testQuadratic1x),
+ TEST(testQuadratic4),
+ TEST(testQuadratic3),
+ TEST(testQuadratic2),
+ TEST(testQuadratic1),
+ TEST(testLine4ax),
+ TEST(testLine3aax),
+ TEST(testLine2ax),
+ TEST(testLine1ax),
+ TEST(testQuadralateral9x),
+ TEST(testQuadralateral8x),
+ TEST(testQuadralateral7x),
+ TEST(testQuadralateral6x),
+ TEST(testQuadralateral6ax),
+ TEST(testQuadralateral9),
+ TEST(testQuadralateral8),
+ TEST(testQuadralateral7),
+ TEST(testQuadralateral6),
+ TEST(testQuadralateral6a),
+ TEST(testFauxQuadralateral6dx),
+ TEST(testFauxQuadralateral6cx),
+ TEST(testFauxQuadralateral6bx),
+ TEST(testFauxQuadralateral6ax),
+ TEST(testFauxQuadralateral6x),
+ TEST(testFauxQuadralateral6d),
+ TEST(testFauxQuadralateral6c),
+ TEST(testFauxQuadralateral6b),
+ TEST(testFauxQuadralateral6a),
+ TEST(testFauxQuadralateral6),
+ TEST(testQuadralateral5x),
+ TEST(testQuadralateral5),
+ TEST(testNondegenerate4x),
+ TEST(testNondegenerate3x),
+ TEST(testNondegenerate2x),
+ TEST(testNondegenerate1x),
+ TEST(testNondegenerate4),
+ TEST(testNondegenerate3),
+ TEST(testNondegenerate2),
+ TEST(testNondegenerate1),
+ TEST(testDegenerate4x),
+ TEST(testDegenerate3x),
+ TEST(testDegenerate2x),
+ TEST(testDegenerate1x),
+ TEST(testDegenerate4),
+ TEST(testDegenerate3),
+ TEST(testDegenerate2),
+ TEST(testDegenerate1),
+ TEST(testLine79x),
+ TEST(testLine78x),
+ TEST(testLine77x),
+ TEST(testLine76x),
+ TEST(testLine75x),
+ TEST(testLine74x),
+ TEST(testLine73x),
+ TEST(testLine72x),
+ TEST(testLine71x),
+ TEST(testLine70x),
+ TEST(testLine69x),
+ TEST(testLine68hx),
+ TEST(testLine68gx),
+ TEST(testLine68fx),
+ TEST(testLine68ex),
+ TEST(testLine68dx),
+ TEST(testLine68cx),
+ TEST(testLine68bx),
+ TEST(testLine68ax),
+ TEST(testLine67x),
+ TEST(testLine66x),
+ TEST(testLine65x),
+ TEST(testLine64x),
+ TEST(testLine63x),
+ TEST(testLine62x),
+ TEST(testLine61x),
+ TEST(testLine60x),
+ TEST(testLine59x),
+ TEST(testLine58x),
+ TEST(testLine57x),
+ TEST(testLine56x),
+ TEST(testLine55x),
+ TEST(testLine54x),
+ TEST(testLine53x),
+ TEST(testLine52x),
+ TEST(testLine51x),
+ TEST(testLine50x),
+ TEST(testLine49x),
+ TEST(testLine48x),
+ TEST(testLine47x),
+ TEST(testLine46x),
+ TEST(testLine45x),
+ TEST(testLine44x),
+ TEST(testLine43x),
+ TEST(testLine42x),
+ TEST(testLine41x),
+ TEST(testLine40x),
+ TEST(testLine38x),
+ TEST(testLine37x),
+ TEST(testLine36x),
+ TEST(testLine35x),
+ TEST(testLine34x),
+ TEST(testLine33x),
+ TEST(testLine32x),
+ TEST(testLine31x),
+ TEST(testLine30x),
+ TEST(testLine29x),
+ TEST(testLine28x),
+ TEST(testLine27x),
+ TEST(testLine26x),
+ TEST(testLine25x),
+ TEST(testLine24ax),
+ TEST(testLine24x),
+ TEST(testLine23x),
+ TEST(testLine22x),
+ TEST(testLine21x),
+ TEST(testLine20x),
+ TEST(testLine19x),
+ TEST(testLine18x),
+ TEST(testLine17x),
+ TEST(testLine16x),
+ TEST(testLine15x),
+ TEST(testLine14x),
+ TEST(testLine13x),
+ TEST(testLine12x),
+ TEST(testLine11x),
+ TEST(testLine10ax),
+ TEST(testLine10x),
+ TEST(testLine9x),
+ TEST(testLine8x),
+ TEST(testLine7bx),
+ TEST(testLine7ax),
+ TEST(testLine7x),
+ TEST(testLine6x),
+ TEST(testLine5x),
+ TEST(testLine4x),
+ TEST(testLine3bx),
+ TEST(testLine3ax),
+ TEST(testLine3x),
+ TEST(testLine2x),
+ TEST(testLine1x),
+ TEST(testLine81),
+ TEST(testLine80),
+ TEST(testLine79),
+ TEST(testLine78),
+ TEST(testLine77),
+ TEST(testLine76),
+ TEST(testLine75),
+ TEST(testLine74),
+ TEST(testLine73),
+ TEST(testLine72),
+ TEST(testLine71),
+ TEST(testLine70),
+ TEST(testLine69),
+ TEST(testLine68h),
+ TEST(testLine68g),
+ TEST(testLine68f),
+ TEST(testLine68e),
+ TEST(testLine68d),
+ TEST(testLine68c),
+ TEST(testLine68b),
+ TEST(testLine68a),
+ TEST(testLine67),
+ TEST(testLine66),
+ TEST(testLine65),
+ TEST(testLine64),
+ TEST(testLine63),
+ TEST(testLine62),
+ TEST(testLine61),
+ TEST(testLine60),
+ TEST(testLine59),
+ TEST(testLine58),
+ TEST(testLine57),
+ TEST(testLine56),
+ TEST(testLine55),
+ TEST(testLine54),
+ TEST(testLine53),
+ TEST(testLine52),
+ TEST(testLine51),
+ TEST(testLine50),
+ TEST(testLine49),
+ TEST(testLine48),
+ TEST(testLine47),
+ TEST(testLine46),
+ TEST(testLine45),
+ TEST(testLine44),
+ TEST(testLine43),
+ TEST(testLine42),
+ TEST(testLine41),
+ TEST(testLine40),
+ TEST(testLine38),
+ TEST(testLine37),
+ TEST(testLine36),
+ TEST(testLine35),
+ TEST(testLine34),
+ TEST(testLine33),
+ TEST(testLine32),
+ TEST(testLine31),
+ TEST(testLine30),
+ TEST(testLine29),
+ TEST(testLine28),
+ TEST(testLine27),
+ TEST(testLine26),
+ TEST(testLine25),
+ TEST(testLine24a),
+ TEST(testLine24),
+ TEST(testLine23),
+ TEST(testLine22),
+ TEST(testLine21),
+ TEST(testLine20),
+ TEST(testLine19),
+ TEST(testLine18),
+ TEST(testLine17),
+ TEST(testLine16),
+ TEST(testLine15),
+ TEST(testLine14),
+ TEST(testLine13),
+ TEST(testLine12),
+ TEST(testLine11),
+ TEST(testLine10a),
+ TEST(testLine10),
+ TEST(testLine9),
+ TEST(testLine8),
+ TEST(testLine7b),
+ TEST(testLine7a),
+ TEST(testLine7),
+ TEST(testLine6),
+ TEST(testLine5),
+ TEST(testLine4),
+ TEST(testLine3b),
+ TEST(testLine3a),
+ TEST(testLine3),
+ TEST(testLine2),
+ TEST(testLine1),
+};
+
+static const size_t testCount = SK_ARRAY_COUNT(tests);
+
+static TestDesc subTests[] = {
+ TEST(fuzz994s_3414),
+ TEST(fuzz994s_11),
+};
+
+static const size_t subTestCount = SK_ARRAY_COUNT(subTests);
+
+static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = nullptr;
+
+static bool runSubTests = false;
+static bool runSubTestsFirst = false;
+static bool runReverse = false;
+
+DEF_TEST(PathOpsSimplify, reporter) {
+ if (runSubTests && runSubTestsFirst) {
+ RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse);
+ }
+ RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runReverse);
+ if (runSubTests && !runSubTestsFirst) {
+ RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stopTest, runReverse);
+ }
+}
diff --git a/tests/PathOpsSkpTest.cpp b/tests/PathOpsSkpTest.cpp index 5e17422971..c89b4088c3 100644 --- a/tests/PathOpsSkpTest.cpp +++ b/tests/PathOpsSkpTest.cpp @@ -4628,9 +4628,9 @@ path.close(); testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); } -static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*skipTest)(skiatest::Reporter* , const char* filename) = nullptr; +static void (*firstTest)(skiatest::Reporter* , const char* filename) = nullptr; +static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; static struct TestDesc tests[] = { TEST(skpwww_gorcraft_ru_1), diff --git a/tests/PathOpsTigerTest.cpp b/tests/PathOpsTigerTest.cpp index 01c3d4ed7f..db1b27db44 100644 --- a/tests/PathOpsTigerTest.cpp +++ b/tests/PathOpsTigerTest.cpp @@ -313,9 +313,9 @@ testSimplify(reporter, path, filename); -static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; +static void (*skipTest)(skiatest::Reporter* , const char* filename) = nullptr; +static void (*firstTest)(skiatest::Reporter* , const char* filename) = nullptr; +static void (*stopTest)(skiatest::Reporter* , const char* filename) = nullptr; static TestDesc tests[] = { TEST(tiger8a_h_1), diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index 7c9c0076c0..9237f0c325 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -1,4894 +1,4894 @@ -/* - * Copyright 2011 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "SkAutoMalloc.h" -#include "SkCanvas.h" -#include "SkGeometry.h" -#include "SkNullCanvas.h" -#include "SkPaint.h" -#include "SkParse.h" -#include "SkParsePath.h" -#include "SkPathEffect.h" -#include "SkPathPriv.h" -#include "SkRRect.h" -#include "SkRandom.h" -#include "SkReader32.h" -#include "SkSize.h" -#include "SkStream.h" -#include "SkStrokeRec.h" -#include "SkSurface.h" -#include "SkWriter32.h" -#include "Test.h" -#include <cmath> - - -static void set_radii(SkVector radii[4], int index, float rad) { - sk_bzero(radii, sizeof(SkVector) * 4); - radii[index].set(rad, rad); -} - -static void test_add_rrect(skiatest::Reporter* reporter, const SkRect& bounds, - const SkVector radii[4]) { - SkRRect rrect; - rrect.setRectRadii(bounds, radii); - REPORTER_ASSERT(reporter, bounds == rrect.rect()); - - SkPath path; - // this line should not assert in the debug build (from validate) - path.addRRect(rrect); - REPORTER_ASSERT(reporter, bounds == path.getBounds()); -} - -static void test_skbug_3469(skiatest::Reporter* reporter) { - SkPath path; - path.moveTo(20, 20); - path.quadTo(20, 50, 80, 50); - path.quadTo(20, 50, 20, 80); - REPORTER_ASSERT(reporter, !path.isConvex()); -} - -static void test_skbug_3239(skiatest::Reporter* reporter) { - const float min = SkBits2Float(0xcb7f16c8); /* -16717512.000000 */ - const float max = SkBits2Float(0x4b7f1c1d); /* 16718877.000000 */ - const float big = SkBits2Float(0x4b7f1bd7); /* 16718807.000000 */ - - const float rad = 33436320; - - const SkRect rectx = SkRect::MakeLTRB(min, min, max, big); - const SkRect recty = SkRect::MakeLTRB(min, min, big, max); - - SkVector radii[4]; - for (int i = 0; i < 4; ++i) { - set_radii(radii, i, rad); - test_add_rrect(reporter, rectx, radii); - test_add_rrect(reporter, recty, radii); - } -} - -static void make_path_crbug364224(SkPath* path) { - path->reset(); - path->moveTo(3.747501373f, 2.724499941f); - path->lineTo(3.747501373f, 3.75f); - path->cubicTo(3.747501373f, 3.88774991f, 3.635501385f, 4.0f, 3.497501373f, 4.0f); - path->lineTo(0.7475013733f, 4.0f); - path->cubicTo(0.6095013618f, 4.0f, 0.4975013733f, 3.88774991f, 0.4975013733f, 3.75f); - path->lineTo(0.4975013733f, 1.0f); - path->cubicTo(0.4975013733f, 0.8622499704f, 0.6095013618f, 0.75f, 0.7475013733f,0.75f); - path->lineTo(3.497501373f, 0.75f); - path->cubicTo(3.50275135f, 0.75f, 3.5070014f, 0.7527500391f, 3.513001442f, 0.753000021f); - path->lineTo(3.715001345f, 0.5512499809f); - path->cubicTo(3.648251295f, 0.5194999576f, 3.575501442f, 0.4999999702f, 3.497501373f, 0.4999999702f); - path->lineTo(0.7475013733f, 0.4999999702f); - path->cubicTo(0.4715013802f, 0.4999999702f, 0.2475013733f, 0.7239999771f, 0.2475013733f, 1.0f); - path->lineTo(0.2475013733f, 3.75f); - path->cubicTo(0.2475013733f, 4.026000023f, 0.4715013504f, 4.25f, 0.7475013733f, 4.25f); - path->lineTo(3.497501373f, 4.25f); - path->cubicTo(3.773501396f, 4.25f, 3.997501373f, 4.026000023f, 3.997501373f, 3.75f); - path->lineTo(3.997501373f, 2.474750042f); - path->lineTo(3.747501373f, 2.724499941f); - path->close(); -} - -static void make_path_crbug364224_simplified(SkPath* path) { - path->moveTo(3.747501373f, 2.724499941f); - path->cubicTo(3.648251295f, 0.5194999576f, 3.575501442f, 0.4999999702f, 3.497501373f, 0.4999999702f); - path->close(); -} - -static void test_sect_with_horizontal_needs_pinning() { - // Test that sect_with_horizontal in SkLineClipper.cpp needs to pin after computing the - // intersection. - SkPath path; - path.reset(); - path.moveTo(-540000, -720000); - path.lineTo(-9.10000017e-05f, 9.99999996e-13f); - path.lineTo(1, 1); - - // Without the pinning code in sect_with_horizontal(), this would assert in the lineclipper - SkPaint paint; - SkSurface::MakeRasterN32Premul(10, 10)->getCanvas()->drawPath(path, paint); -} - -static void test_path_crbug364224() { - SkPath path; - SkPaint paint; - auto surface(SkSurface::MakeRasterN32Premul(84, 88)); - SkCanvas* canvas = surface->getCanvas(); - - make_path_crbug364224_simplified(&path); - canvas->drawPath(path, paint); - - make_path_crbug364224(&path); - canvas->drawPath(path, paint); -} - -// this is a unit test instead of a GM because it doesn't draw anything -static void test_fuzz_crbug_638223() { - auto surface(SkSurface::MakeRasterN32Premul(250, 250)); - SkCanvas* canvas = surface->getCanvas(); - SkPath path; - path.moveTo(SkBits2Float(0x47452a00), SkBits2Float(0x43211d01)); // 50474, 161.113f - path.conicTo(SkBits2Float(0x401c0000), SkBits2Float(0x40680000), - SkBits2Float(0x02c25a81), SkBits2Float(0x981a1fa0), - SkBits2Float(0x6bf9abea)); // 2.4375f, 3.625f, 2.85577e-37f, -1.992e-24f, 6.03669e+26f - SkPaint paint; - paint.setAntiAlias(true); - canvas->drawPath(path, paint); -} - -static void test_fuzz_crbug_643933() { - auto surface(SkSurface::MakeRasterN32Premul(250, 250)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint paint; - paint.setAntiAlias(true); - SkPath path; - path.moveTo(0, 0); - path.conicTo(SkBits2Float(0x002001f2), SkBits2Float(0x4161ffff), // 2.93943e-39f, 14.125f - SkBits2Float(0x49f7224d), SkBits2Float(0x45eec8df), // 2.02452e+06f, 7641.11f - SkBits2Float(0x721aee0c)); // 3.0687e+30f - canvas->drawPath(path, paint); - path.reset(); - path.moveTo(0, 0); - path.conicTo(SkBits2Float(0x00007ff2), SkBits2Float(0x4169ffff), // 4.58981e-41f, 14.625f - SkBits2Float(0x43ff2261), SkBits2Float(0x41eeea04), // 510.269f, 29.8643f - SkBits2Float(0x5d06eff8)); // 6.07704e+17f - canvas->drawPath(path, paint); -} - -static void test_fuzz_crbug_647922() { - auto surface(SkSurface::MakeRasterN32Premul(250, 250)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint paint; - paint.setAntiAlias(true); - SkPath path; - path.moveTo(0, 0); - path.conicTo(SkBits2Float(0x00003939), SkBits2Float(0x42487fff), // 2.05276e-41f, 50.125f - SkBits2Float(0x48082361), SkBits2Float(0x4408e8e9), // 139406, 547.639f - SkBits2Float(0x4d1ade0f)); // 1.6239e+08f - canvas->drawPath(path, paint); -} - -static void test_fuzz_crbug_662780() { - auto surface(SkSurface::MakeRasterN32Premul(250, 250)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint paint; - paint.setAntiAlias(true); - SkPath path; - path.moveTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000)); // 8, 158 - path.lineTo(SkBits2Float(0x41000000), SkBits2Float(0x42f00000)); // 8, 120 - // 8, 8, 8.00002f, 8, 0.707107f - path.conicTo(SkBits2Float(0x41000000), SkBits2Float(0x41000000), - SkBits2Float(0x41000010), SkBits2Float(0x41000000), SkBits2Float(0x3f3504f3)); - path.lineTo(SkBits2Float(0x439a0000), SkBits2Float(0x41000000)); // 308, 8 - // 308, 8, 308, 8, 0.707107f - path.conicTo(SkBits2Float(0x439a0000), SkBits2Float(0x41000000), - SkBits2Float(0x439a0000), SkBits2Float(0x41000000), SkBits2Float(0x3f3504f3)); - path.lineTo(SkBits2Float(0x439a0000), SkBits2Float(0x431e0000)); // 308, 158 - // 308, 158, 308, 158, 0.707107f - path.conicTo(SkBits2Float(0x439a0000), SkBits2Float(0x431e0000), - SkBits2Float(0x439a0000), SkBits2Float(0x431e0000), SkBits2Float(0x3f3504f3)); - path.lineTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000)); // 8, 158 - // 8, 158, 8, 158, 0.707107f - path.conicTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000), - SkBits2Float(0x41000000), SkBits2Float(0x431e0000), SkBits2Float(0x3f3504f3)); - path.close(); - canvas->clipPath(path, true); - canvas->drawRect(SkRect::MakeWH(250, 250), paint); -} - -static void test_mask_overflow() { - auto surface(SkSurface::MakeRasterN32Premul(500, 500)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint paint; - paint.setAntiAlias(true); - SkPath path; - path.moveTo(SkBits2Float(0x43e28000), SkBits2Float(0x43aa8000)); // 453, 341 - path.lineTo(SkBits2Float(0x43de6000), SkBits2Float(0x43aa8000)); // 444.75f, 341 - // 440.47f, 341, 437, 344.47f, 437, 348.75f - path.cubicTo(SkBits2Float(0x43dc3c29), SkBits2Float(0x43aa8000), - SkBits2Float(0x43da8000), SkBits2Float(0x43ac3c29), - SkBits2Float(0x43da8000), SkBits2Float(0x43ae6000)); - path.lineTo(SkBits2Float(0x43da8000), SkBits2Float(0x43b18000)); // 437, 355 - path.lineTo(SkBits2Float(0x43e28000), SkBits2Float(0x43b18000)); // 453, 355 - path.lineTo(SkBits2Float(0x43e28000), SkBits2Float(0x43aa8000)); // 453, 341 - canvas->drawPath(path, paint); -} - -static void test_fuzz_crbug_668907() { - auto surface(SkSurface::MakeRasterN32Premul(400, 500)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint paint; - paint.setAntiAlias(true); - SkPath path; - path.moveTo(SkBits2Float(0x46313741), SkBits2Float(0x3b00e540)); // 11341.8f, 0.00196679f - path.quadTo(SkBits2Float(0x41410041), SkBits2Float(0xc1414141), SkBits2Float(0x41414141), - SkBits2Float(0x414100ff)); // 12.0626f, -12.0784f, 12.0784f, 12.0627f - path.lineTo(SkBits2Float(0x46313741), SkBits2Float(0x3b00e540)); // 11341.8f, 0.00196679f - path.close(); - canvas->drawPath(path, paint); -} - -/** - * In debug mode, this path was causing an assertion to fail in - * SkPathStroker::preJoinTo() and, in Release, the use of an unitialized value. - */ -static void make_path_crbugskia2820(SkPath* path, skiatest::Reporter* reporter) { - SkPoint orig, p1, p2, p3; - orig = SkPoint::Make(1.f, 1.f); - p1 = SkPoint::Make(1.f - SK_ScalarNearlyZero, 1.f); - p2 = SkPoint::Make(1.f, 1.f + SK_ScalarNearlyZero); - p3 = SkPoint::Make(2.f, 2.f); - - path->reset(); - path->moveTo(orig); - path->cubicTo(p1, p2, p3); - path->close(); -} - -static void test_path_crbugskia2820(skiatest::Reporter* reporter) {//GrContext* context) { - SkPath path; - make_path_crbugskia2820(&path, reporter); - - SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); - stroke.setStrokeStyle(2 * SK_Scalar1); - stroke.applyToPath(&path, path); -} - -static void test_path_crbugskia5995() { - auto surface(SkSurface::MakeRasterN32Premul(500, 500)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint paint; - paint.setAntiAlias(true); - SkPath path; - path.moveTo(SkBits2Float(0x40303030), SkBits2Float(0x3e303030)); // 2.75294f, 0.172059f - path.quadTo(SkBits2Float(0x41d63030), SkBits2Float(0x30303030), SkBits2Float(0x41013030), - SkBits2Float(0x00000000)); // 26.7735f, 6.40969e-10f, 8.07426f, 0 - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - canvas->drawPath(path, paint); -} - -static void make_path0(SkPath* path) { - // from * https://code.google.com/p/skia/issues/detail?id=1706 - - path->moveTo(146.939f, 1012.84f); - path->lineTo(181.747f, 1009.18f); - path->lineTo(182.165f, 1013.16f); - path->lineTo(147.357f, 1016.82f); - path->lineTo(146.939f, 1012.84f); - path->close(); -} - -static void make_path1(SkPath* path) { - path->addRect(SkRect::MakeXYWH(10, 10, 10, 1)); -} - -typedef void (*PathProc)(SkPath*); - -/* - * Regression test: we used to crash (overwrite internal storage) during - * construction of the region when the path was INVERSE. That is now fixed, - * so test these regions (which used to assert/crash). - * - * https://code.google.com/p/skia/issues/detail?id=1706 - */ -static void test_path_to_region(skiatest::Reporter* reporter) { - PathProc procs[] = { - make_path0, - make_path1, - }; - - SkRegion clip; - clip.setRect(0, 0, 1255, 1925); - - for (size_t i = 0; i < SK_ARRAY_COUNT(procs); ++i) { - SkPath path; - procs[i](&path); - - SkRegion rgn; - rgn.setPath(path, clip); - path.toggleInverseFillType(); - rgn.setPath(path, clip); - } -} - -#ifdef SK_BUILD_FOR_WIN - #define SUPPRESS_VISIBILITY_WARNING -#else - #define SUPPRESS_VISIBILITY_WARNING __attribute__((visibility("hidden"))) -#endif - -static void test_path_close_issue1474(skiatest::Reporter* reporter) { - // This test checks that r{Line,Quad,Conic,Cubic}To following a close() - // are relative to the point we close to, not relative to the point we close from. - SkPath path; - SkPoint last; - - // Test rLineTo(). - path.rLineTo(0, 100); - path.rLineTo(100, 0); - path.close(); // Returns us back to 0,0. - path.rLineTo(50, 50); // This should go to 50,50. - - path.getLastPt(&last); - REPORTER_ASSERT(reporter, 50 == last.fX); - REPORTER_ASSERT(reporter, 50 == last.fY); - - // Test rQuadTo(). - path.rewind(); - path.rLineTo(0, 100); - path.rLineTo(100, 0); - path.close(); - path.rQuadTo(50, 50, 75, 75); - - path.getLastPt(&last); - REPORTER_ASSERT(reporter, 75 == last.fX); - REPORTER_ASSERT(reporter, 75 == last.fY); - - // Test rConicTo(). - path.rewind(); - path.rLineTo(0, 100); - path.rLineTo(100, 0); - path.close(); - path.rConicTo(50, 50, 85, 85, 2); - - path.getLastPt(&last); - REPORTER_ASSERT(reporter, 85 == last.fX); - REPORTER_ASSERT(reporter, 85 == last.fY); - - // Test rCubicTo(). - path.rewind(); - path.rLineTo(0, 100); - path.rLineTo(100, 0); - path.close(); - path.rCubicTo(50, 50, 85, 85, 95, 95); - - path.getLastPt(&last); - REPORTER_ASSERT(reporter, 95 == last.fX); - REPORTER_ASSERT(reporter, 95 == last.fY); -} - -static void test_gen_id(skiatest::Reporter* reporter) { - SkPath a, b; - REPORTER_ASSERT(reporter, a.getGenerationID() == b.getGenerationID()); - - a.moveTo(0, 0); - const uint32_t z = a.getGenerationID(); - REPORTER_ASSERT(reporter, z != b.getGenerationID()); - - a.reset(); - REPORTER_ASSERT(reporter, a.getGenerationID() == b.getGenerationID()); - - a.moveTo(1, 1); - const uint32_t y = a.getGenerationID(); - REPORTER_ASSERT(reporter, z != y); - - b.moveTo(2, 2); - const uint32_t x = b.getGenerationID(); - REPORTER_ASSERT(reporter, x != y && x != z); - - a.swap(b); - REPORTER_ASSERT(reporter, b.getGenerationID() == y && a.getGenerationID() == x); - - b = a; - REPORTER_ASSERT(reporter, b.getGenerationID() == x); - - SkPath c(a); - REPORTER_ASSERT(reporter, c.getGenerationID() == x); - - c.lineTo(3, 3); - const uint32_t w = c.getGenerationID(); - REPORTER_ASSERT(reporter, b.getGenerationID() == x); - REPORTER_ASSERT(reporter, a.getGenerationID() == x); - REPORTER_ASSERT(reporter, w != x); - -#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - static bool kExpectGenIDToIgnoreFill = false; -#else - static bool kExpectGenIDToIgnoreFill = true; -#endif - - c.toggleInverseFillType(); - const uint32_t v = c.getGenerationID(); - REPORTER_ASSERT(reporter, (v == w) == kExpectGenIDToIgnoreFill); - - c.rewind(); - REPORTER_ASSERT(reporter, v != c.getGenerationID()); -} - -// This used to assert in the debug build, as the edges did not all line-up. -static void test_bad_cubic_crbug234190() { - SkPath path; - path.moveTo(13.8509f, 3.16858f); - path.cubicTo(-2.35893e+08f, -4.21044e+08f, - -2.38991e+08f, -4.26573e+08f, - -2.41016e+08f, -4.30188e+08f); - - SkPaint paint; - paint.setAntiAlias(true); - auto surface(SkSurface::MakeRasterN32Premul(84, 88)); - surface->getCanvas()->drawPath(path, paint); -} - -static void test_bad_cubic_crbug229478() { - const SkPoint pts[] = { - { 4595.91064f, -11596.9873f }, - { 4597.2168f, -11595.9414f }, - { 4598.52344f, -11594.8955f }, - { 4599.83008f, -11593.8496f }, - }; - - SkPath path; - path.moveTo(pts[0]); - path.cubicTo(pts[1], pts[2], pts[3]); - - SkPaint paint; - paint.setStyle(SkPaint::kStroke_Style); - paint.setStrokeWidth(20); - - SkPath dst; - // Before the fix, this would infinite-recurse, and run out of stack - // because we would keep trying to subdivide a degenerate cubic segment. - paint.getFillPath(path, &dst, nullptr); -} - -static void build_path_170666(SkPath& path) { - path.moveTo(17.9459f, 21.6344f); - path.lineTo(139.545f, -47.8105f); - path.lineTo(139.545f, -47.8105f); - path.lineTo(131.07f, -47.3888f); - path.lineTo(131.07f, -47.3888f); - path.lineTo(122.586f, -46.9532f); - path.lineTo(122.586f, -46.9532f); - path.lineTo(18076.6f, 31390.9f); - path.lineTo(18076.6f, 31390.9f); - path.lineTo(18085.1f, 31390.5f); - path.lineTo(18085.1f, 31390.5f); - path.lineTo(18076.6f, 31390.9f); - path.lineTo(18076.6f, 31390.9f); - path.lineTo(17955, 31460.3f); - path.lineTo(17955, 31460.3f); - path.lineTo(17963.5f, 31459.9f); - path.lineTo(17963.5f, 31459.9f); - path.lineTo(17971.9f, 31459.5f); - path.lineTo(17971.9f, 31459.5f); - path.lineTo(17.9551f, 21.6205f); - path.lineTo(17.9551f, 21.6205f); - path.lineTo(9.47091f, 22.0561f); - path.lineTo(9.47091f, 22.0561f); - path.lineTo(17.9459f, 21.6344f); - path.lineTo(17.9459f, 21.6344f); - path.close();path.moveTo(0.995934f, 22.4779f); - path.lineTo(0.986725f, 22.4918f); - path.lineTo(0.986725f, 22.4918f); - path.lineTo(17955, 31460.4f); - path.lineTo(17955, 31460.4f); - path.lineTo(17971.9f, 31459.5f); - path.lineTo(17971.9f, 31459.5f); - path.lineTo(18093.6f, 31390.1f); - path.lineTo(18093.6f, 31390.1f); - path.lineTo(18093.6f, 31390); - path.lineTo(18093.6f, 31390); - path.lineTo(139.555f, -47.8244f); - path.lineTo(139.555f, -47.8244f); - path.lineTo(122.595f, -46.9671f); - path.lineTo(122.595f, -46.9671f); - path.lineTo(0.995934f, 22.4779f); - path.lineTo(0.995934f, 22.4779f); - path.close(); - path.moveTo(5.43941f, 25.5223f); - path.lineTo(798267, -28871.1f); - path.lineTo(798267, -28871.1f); - path.lineTo(3.12512e+06f, -113102); - path.lineTo(3.12512e+06f, -113102); - path.cubicTo(5.16324e+06f, -186882, 8.15247e+06f, -295092, 1.1957e+07f, -432813); - path.cubicTo(1.95659e+07f, -708257, 3.04359e+07f, -1.10175e+06f, 4.34798e+07f, -1.57394e+06f); - path.cubicTo(6.95677e+07f, -2.51831e+06f, 1.04352e+08f, -3.77748e+06f, 1.39135e+08f, -5.03666e+06f); - path.cubicTo(1.73919e+08f, -6.29583e+06f, 2.08703e+08f, -7.555e+06f, 2.34791e+08f, -8.49938e+06f); - path.cubicTo(2.47835e+08f, -8.97157e+06f, 2.58705e+08f, -9.36506e+06f, 2.66314e+08f, -9.6405e+06f); - path.cubicTo(2.70118e+08f, -9.77823e+06f, 2.73108e+08f, -9.88644e+06f, 2.75146e+08f, -9.96022e+06f); - path.cubicTo(2.76165e+08f, -9.99711e+06f, 2.76946e+08f, -1.00254e+07f, 2.77473e+08f, -1.00444e+07f); - path.lineTo(2.78271e+08f, -1.00733e+07f); - path.lineTo(2.78271e+08f, -1.00733e+07f); - path.cubicTo(2.78271e+08f, -1.00733e+07f, 2.08703e+08f, -7.555e+06f, 135.238f, 23.3517f); - path.cubicTo(131.191f, 23.4981f, 125.995f, 23.7976f, 123.631f, 24.0206f); - path.cubicTo(121.267f, 24.2436f, 122.631f, 24.3056f, 126.677f, 24.1591f); - path.cubicTo(2.08703e+08f, -7.555e+06f, 2.78271e+08f, -1.00733e+07f, 2.78271e+08f, -1.00733e+07f); - path.lineTo(2.77473e+08f, -1.00444e+07f); - path.lineTo(2.77473e+08f, -1.00444e+07f); - path.cubicTo(2.76946e+08f, -1.00254e+07f, 2.76165e+08f, -9.99711e+06f, 2.75146e+08f, -9.96022e+06f); - path.cubicTo(2.73108e+08f, -9.88644e+06f, 2.70118e+08f, -9.77823e+06f, 2.66314e+08f, -9.6405e+06f); - path.cubicTo(2.58705e+08f, -9.36506e+06f, 2.47835e+08f, -8.97157e+06f, 2.34791e+08f, -8.49938e+06f); - path.cubicTo(2.08703e+08f, -7.555e+06f, 1.73919e+08f, -6.29583e+06f, 1.39135e+08f, -5.03666e+06f); - path.cubicTo(1.04352e+08f, -3.77749e+06f, 6.95677e+07f, -2.51831e+06f, 4.34798e+07f, -1.57394e+06f); - path.cubicTo(3.04359e+07f, -1.10175e+06f, 1.95659e+07f, -708258, 1.1957e+07f, -432814); - path.cubicTo(8.15248e+06f, -295092, 5.16324e+06f, -186883, 3.12513e+06f, -113103); - path.lineTo(798284, -28872); - path.lineTo(798284, -28872); - path.lineTo(22.4044f, 24.6677f); - path.lineTo(22.4044f, 24.6677f); - path.cubicTo(22.5186f, 24.5432f, 18.8134f, 24.6337f, 14.1287f, 24.8697f); - path.cubicTo(9.4439f, 25.1057f, 5.55359f, 25.3978f, 5.43941f, 25.5223f); - path.close(); -} - -static void build_path_simple_170666(SkPath& path) { - path.moveTo(126.677f, 24.1591f); - path.cubicTo(2.08703e+08f, -7.555e+06f, 2.78271e+08f, -1.00733e+07f, 2.78271e+08f, -1.00733e+07f); -} - -// This used to assert in the SK_DEBUG build, as the clip step would fail with -// too-few interations in our cubic-line intersection code. That code now runs -// 24 interations (instead of 16). -static void test_crbug_170666() { - SkPath path; - SkPaint paint; - paint.setAntiAlias(true); - - auto surface(SkSurface::MakeRasterN32Premul(1000, 1000)); - - build_path_simple_170666(path); - surface->getCanvas()->drawPath(path, paint); - - build_path_170666(path); - surface->getCanvas()->drawPath(path, paint); -} - - -static void test_tiny_path_convexity(skiatest::Reporter* reporter, const char* pathBug, - SkScalar tx, SkScalar ty, SkScalar scale) { - SkPath smallPath; - SkAssertResult(SkParsePath::FromSVGString(pathBug, &smallPath)); - bool smallConvex = smallPath.isConvex(); - SkPath largePath; - SkAssertResult(SkParsePath::FromSVGString(pathBug, &largePath)); - SkMatrix matrix; - matrix.reset(); - matrix.preTranslate(100, 100); - matrix.preScale(scale, scale); - largePath.transform(matrix); - bool largeConvex = largePath.isConvex(); - REPORTER_ASSERT(reporter, smallConvex == largeConvex); -} - -static void test_crbug_493450(skiatest::Reporter* reporter) { - const char reducedCase[] = - "M0,0" - "L0.0002, 0" - "L0.0002, 0.0002" - "L0.0001, 0.0001" - "L0,0.0002" - "Z"; - test_tiny_path_convexity(reporter, reducedCase, 100, 100, 100000); - const char originalFiddleData[] = - "M-0.3383152268862998,-0.11217565719203619L-0.33846085183212765,-0.11212264406895281" - "L-0.338509393480737,-0.11210607966681395L-0.33857792286700894,-0.1121889121487573" - "L-0.3383866116636664,-0.11228834570924921L-0.33842087635680235,-0.11246078673250548" - "L-0.33809536177201055,-0.11245415228342878L-0.33797257995493996,-0.11216571641452182" - "L-0.33802112160354925,-0.11201996164188659L-0.33819815585141844,-0.11218559834671019Z"; - test_tiny_path_convexity(reporter, originalFiddleData, 280081.4116670522f, 93268.04618493588f, - 826357.3384828606f); -} - -static void test_crbug_495894(skiatest::Reporter* reporter) { - const char originalFiddleData[] = - "M-0.34004273849857214,-0.11332803232216355L-0.34008271397389744,-0.11324483772714951" - "L-0.3401940742265893,-0.11324483772714951L-0.34017694188002134,-0.11329807920275889" - "L-0.3402026403998733,-0.11333468903941245L-0.34029972369709194,-0.11334134592705701" - "L-0.3403054344792813,-0.11344121970007795L-0.3403140006525653,-0.11351115418399343" - "L-0.34024261587519866,-0.11353446986281181L-0.3402197727464413,-0.11360442946144192" - "L-0.34013696640469604,-0.11359110237029302L-0.34009128014718143,-0.1135877707043939" - "L-0.3400598708451401,-0.11360776134112742L-0.34004273849857214,-0.11355112520064405" - "L-0.3400113291965308,-0.11355112520064405L-0.3399970522410575,-0.11359110237029302" - "L-0.33997135372120546,-0.11355112520064405L-0.3399627875479215,-0.11353780084493197" - "L-0.3399485105924481,-0.11350782354357004L-0.3400027630232468,-0.11346452910331437" - "L-0.3399485105924481,-0.11340126558629839L-0.33993994441916414,-0.11340126558629839" - "L-0.33988283659727087,-0.11331804756574679L-0.33989140277055485,-0.11324483772714951" - "L-0.33997991989448945,-0.11324483772714951L-0.3399856306766788,-0.11324483772714951" - "L-0.34002560615200417,-0.11334467443478255ZM-0.3400684370184241,-0.11338461985124307" - "L-0.340154098751264,-0.11341791238732665L-0.340162664924548,-0.1134378899559977" - "L-0.34017979727111597,-0.11340126558629839L-0.3401655203156427,-0.11338129083212668" - "L-0.34012268944922275,-0.11332137577529414L-0.34007414780061346,-0.11334467443478255Z" - "M-0.3400027630232468,-0.11290567901106024L-0.3400113291965308,-0.11298876531245433" - "L-0.33997991989448945,-0.11301535852306784L-0.33990282433493346,-0.11296217481488612" - "L-0.33993994441916414,-0.11288906492739594Z"; - test_tiny_path_convexity(reporter, originalFiddleData, 22682.240000000005f,7819.72220766405f, - 65536); -} - -static void test_crbug_613918() { - SkPath path; - path.conicTo(-6.62478e-08f, 4.13885e-08f, -6.36935e-08f, 3.97927e-08f, 0.729058f); - path.quadTo(2.28206e-09f, -1.42572e-09f, 3.91919e-09f, -2.44852e-09f); - path.cubicTo(-16752.2f, -26792.9f, -21.4673f, 10.9347f, -8.57322f, -7.22739f); - - // This call could lead to an assert or uninitialized read due to a failure - // to check the return value from SkCubicClipper::ChopMonoAtY. - path.contains(-1.84817e-08f, 1.15465e-08f); -} - -static void test_addrect(skiatest::Reporter* reporter) { - SkPath path; - path.lineTo(0, 0); - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, path.isRect(nullptr)); - - path.reset(); - path.lineTo(FLT_EPSILON, FLT_EPSILON); - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, !path.isRect(nullptr)); - - path.reset(); - path.quadTo(0, 0, 0, 0); - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, !path.isRect(nullptr)); - - path.reset(); - path.conicTo(0, 0, 0, 0, 0.5f); - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, !path.isRect(nullptr)); - - path.reset(); - path.cubicTo(0, 0, 0, 0, 0, 0); - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, !path.isRect(nullptr)); -} - -// Make sure we stay non-finite once we get there (unless we reset or rewind). -static void test_addrect_isfinite(skiatest::Reporter* reporter) { - SkPath path; - - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, path.isFinite()); - - path.moveTo(0, 0); - path.lineTo(SK_ScalarInfinity, 42); - REPORTER_ASSERT(reporter, !path.isFinite()); - - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, !path.isFinite()); - - path.reset(); - REPORTER_ASSERT(reporter, path.isFinite()); - - path.addRect(SkRect::MakeWH(50, 100)); - REPORTER_ASSERT(reporter, path.isFinite()); -} - -static void build_big_path(SkPath* path, bool reducedCase) { - if (reducedCase) { - path->moveTo(577330, 1971.72f); - path->cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f); - } else { - path->moveTo(60.1631f, 7.70567f); - path->quadTo(60.1631f, 7.70567f, 0.99474f, 0.901199f); - path->lineTo(577379, 1977.77f); - path->quadTo(577364, 1979.57f, 577325, 1980.26f); - path->quadTo(577286, 1980.95f, 577245, 1980.13f); - path->quadTo(577205, 1979.3f, 577187, 1977.45f); - path->quadTo(577168, 1975.6f, 577183, 1973.8f); - path->quadTo(577198, 1972, 577238, 1971.31f); - path->quadTo(577277, 1970.62f, 577317, 1971.45f); - path->quadTo(577330, 1971.72f, 577341, 1972.11f); - path->cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f); - path->moveTo(306.718f, -32.912f); - path->cubicTo(30.531f, 10.0005f, 1502.47f, 13.2804f, 84.3088f, 9.99601f); - } -} - -static void test_clipped_cubic() { - auto surface(SkSurface::MakeRasterN32Premul(640, 480)); - - // This path used to assert, because our cubic-chopping code incorrectly - // moved control points after the chop. This test should be run in SK_DEBUG - // mode to ensure that we no long assert. - SkPath path; - for (int doReducedCase = 0; doReducedCase <= 1; ++doReducedCase) { - build_big_path(&path, SkToBool(doReducedCase)); - - SkPaint paint; - for (int doAA = 0; doAA <= 1; ++doAA) { - paint.setAntiAlias(SkToBool(doAA)); - surface->getCanvas()->drawPath(path, paint); - } - } -} - -static void dump_if_ne(skiatest::Reporter* reporter, const SkRect& expected, const SkRect& bounds) { - if (expected != bounds) { - ERRORF(reporter, "path.getBounds() returned [%g %g %g %g], but expected [%g %g %g %g]", - bounds.left(), bounds.top(), bounds.right(), bounds.bottom(), - expected.left(), expected.top(), expected.right(), expected.bottom()); - } -} - -static void test_bounds_crbug_513799(skiatest::Reporter* reporter) { - SkPath path; -#if 0 - // As written these tests were failing on LLVM 4.2 MacMini Release mysteriously, so we've - // rewritten them to avoid this (compiler-bug?). - REPORTER_ASSERT(reporter, SkRect::MakeLTRB(0, 0, 0, 0) == path.getBounds()); - - path.moveTo(-5, -8); - REPORTER_ASSERT(reporter, SkRect::MakeLTRB(-5, -8, -5, -8) == path.getBounds()); - - path.addRect(SkRect::MakeLTRB(1, 2, 3, 4)); - REPORTER_ASSERT(reporter, SkRect::MakeLTRB(-5, -8, 3, 4) == path.getBounds()); - - path.moveTo(1, 2); - REPORTER_ASSERT(reporter, SkRect::MakeLTRB(-5, -8, 3, 4) == path.getBounds()); -#else - dump_if_ne(reporter, SkRect::MakeLTRB(0, 0, 0, 0), path.getBounds()); - - path.moveTo(-5, -8); // should set the bounds - dump_if_ne(reporter, SkRect::MakeLTRB(-5, -8, -5, -8), path.getBounds()); - - path.addRect(SkRect::MakeLTRB(1, 2, 3, 4)); // should extend the bounds - dump_if_ne(reporter, SkRect::MakeLTRB(-5, -8, 3, 4), path.getBounds()); - - path.moveTo(1, 2); // don't expect this to have changed the bounds - dump_if_ne(reporter, SkRect::MakeLTRB(-5, -8, 3, 4), path.getBounds()); -#endif -} - -#include "SkSurface.h" -static void test_fuzz_crbug_627414(skiatest::Reporter* reporter) { - SkPath path; - path.moveTo(0, 0); - path.conicTo(3.58732e-43f, 2.72084f, 3.00392f, 3.00392f, 8.46e+37f); - - SkPaint paint; - paint.setAntiAlias(true); - - auto surf = SkSurface::MakeRasterN32Premul(100, 100); - surf->getCanvas()->drawPath(path, paint); -} - -// Inspired by http://ie.microsoft.com/testdrive/Performance/Chalkboard/ -// which triggered an assert, from a tricky cubic. This test replicates that -// example, so we can ensure that we handle it (in SkEdge.cpp), and don't -// assert in the SK_DEBUG build. -static void test_tricky_cubic() { - const SkPoint pts[] = { - { SkDoubleToScalar(18.8943768), SkDoubleToScalar(129.121277) }, - { SkDoubleToScalar(18.8937435), SkDoubleToScalar(129.121689) }, - { SkDoubleToScalar(18.8950119), SkDoubleToScalar(129.120422) }, - { SkDoubleToScalar(18.5030727), SkDoubleToScalar(129.13121) }, - }; - - SkPath path; - path.moveTo(pts[0]); - path.cubicTo(pts[1], pts[2], pts[3]); - - SkPaint paint; - paint.setAntiAlias(true); - - SkSurface::MakeRasterN32Premul(19, 130)->getCanvas()->drawPath(path, paint); -} - -// Inspired by http://code.google.com/p/chromium/issues/detail?id=141651 -// -static void test_isfinite_after_transform(skiatest::Reporter* reporter) { - SkPath path; - path.quadTo(157, 366, 286, 208); - path.arcTo(37, 442, 315, 163, 957494590897113.0f); - - SkMatrix matrix; - matrix.setScale(1000*1000, 1000*1000); - - // Be sure that path::transform correctly updates isFinite and the bounds - // if the transformation overflows. The previous bug was that isFinite was - // set to true in this case, but the bounds were not set to empty (which - // they should be). - while (path.isFinite()) { - REPORTER_ASSERT(reporter, path.getBounds().isFinite()); - REPORTER_ASSERT(reporter, !path.getBounds().isEmpty()); - path.transform(matrix); - } - REPORTER_ASSERT(reporter, path.getBounds().isEmpty()); - - matrix.setTranslate(SK_Scalar1, SK_Scalar1); - path.transform(matrix); - // we need to still be non-finite - REPORTER_ASSERT(reporter, !path.isFinite()); - REPORTER_ASSERT(reporter, path.getBounds().isEmpty()); -} - -static void add_corner_arc(SkPath* path, const SkRect& rect, - SkScalar xIn, SkScalar yIn, - int startAngle) -{ - - SkScalar rx = SkMinScalar(rect.width(), xIn); - SkScalar ry = SkMinScalar(rect.height(), yIn); - - SkRect arcRect; - arcRect.set(-rx, -ry, rx, ry); - switch (startAngle) { - case 0: - arcRect.offset(rect.fRight - arcRect.fRight, rect.fBottom - arcRect.fBottom); - break; - case 90: - arcRect.offset(rect.fLeft - arcRect.fLeft, rect.fBottom - arcRect.fBottom); - break; - case 180: - arcRect.offset(rect.fLeft - arcRect.fLeft, rect.fTop - arcRect.fTop); - break; - case 270: - arcRect.offset(rect.fRight - arcRect.fRight, rect.fTop - arcRect.fTop); - break; - default: - break; - } - - path->arcTo(arcRect, SkIntToScalar(startAngle), SkIntToScalar(90), false); -} - -static void make_arb_round_rect(SkPath* path, const SkRect& r, - SkScalar xCorner, SkScalar yCorner) { - // we are lazy here and use the same x & y for each corner - add_corner_arc(path, r, xCorner, yCorner, 270); - add_corner_arc(path, r, xCorner, yCorner, 0); - add_corner_arc(path, r, xCorner, yCorner, 90); - add_corner_arc(path, r, xCorner, yCorner, 180); - path->close(); -} - -// Chrome creates its own round rects with each corner possibly being different. -// Performance will suffer if they are not convex. -// Note: PathBench::ArbRoundRectBench performs almost exactly -// the same test (but with drawing) -static void test_arb_round_rect_is_convex(skiatest::Reporter* reporter) { - SkRandom rand; - SkRect r; - - for (int i = 0; i < 5000; ++i) { - - SkScalar size = rand.nextUScalar1() * 30; - if (size < SK_Scalar1) { - continue; - } - r.fLeft = rand.nextUScalar1() * 300; - r.fTop = rand.nextUScalar1() * 300; - r.fRight = r.fLeft + 2 * size; - r.fBottom = r.fTop + 2 * size; - - SkPath temp; - - make_arb_round_rect(&temp, r, r.width() / 10, r.height() / 15); - - REPORTER_ASSERT(reporter, temp.isConvex()); - } -} - -// Chrome will sometimes create a 0 radius round rect. The degenerate -// quads prevent the path from being converted to a rect -// Note: PathBench::ArbRoundRectBench performs almost exactly -// the same test (but with drawing) -static void test_arb_zero_rad_round_rect_is_rect(skiatest::Reporter* reporter) { - SkRandom rand; - SkRect r; - - for (int i = 0; i < 5000; ++i) { - - SkScalar size = rand.nextUScalar1() * 30; - if (size < SK_Scalar1) { - continue; - } - r.fLeft = rand.nextUScalar1() * 300; - r.fTop = rand.nextUScalar1() * 300; - r.fRight = r.fLeft + 2 * size; - r.fBottom = r.fTop + 2 * size; - - SkPath temp; - - make_arb_round_rect(&temp, r, 0, 0); - - SkRect result; - REPORTER_ASSERT(reporter, temp.isRect(&result)); - REPORTER_ASSERT(reporter, r == result); - } -} - -static void test_rect_isfinite(skiatest::Reporter* reporter) { - const SkScalar inf = SK_ScalarInfinity; - const SkScalar negInf = SK_ScalarNegativeInfinity; - const SkScalar nan = SK_ScalarNaN; - - SkRect r; - r.setEmpty(); - REPORTER_ASSERT(reporter, r.isFinite()); - r.set(0, 0, inf, negInf); - REPORTER_ASSERT(reporter, !r.isFinite()); - r.set(0, 0, nan, 0); - REPORTER_ASSERT(reporter, !r.isFinite()); - - SkPoint pts[] = { - { 0, 0 }, - { SK_Scalar1, 0 }, - { 0, SK_Scalar1 }, - }; - - bool isFine = r.setBoundsCheck(pts, 3); - REPORTER_ASSERT(reporter, isFine); - REPORTER_ASSERT(reporter, !r.isEmpty()); - - pts[1].set(inf, 0); - isFine = r.setBoundsCheck(pts, 3); - REPORTER_ASSERT(reporter, !isFine); - REPORTER_ASSERT(reporter, r.isEmpty()); - - pts[1].set(nan, 0); - isFine = r.setBoundsCheck(pts, 3); - REPORTER_ASSERT(reporter, !isFine); - REPORTER_ASSERT(reporter, r.isEmpty()); -} - -static void test_path_isfinite(skiatest::Reporter* reporter) { - const SkScalar inf = SK_ScalarInfinity; - const SkScalar negInf = SK_ScalarNegativeInfinity; - const SkScalar nan = SK_ScalarNaN; - - SkPath path; - REPORTER_ASSERT(reporter, path.isFinite()); - - path.reset(); - REPORTER_ASSERT(reporter, path.isFinite()); - - path.reset(); - path.moveTo(SK_Scalar1, 0); - REPORTER_ASSERT(reporter, path.isFinite()); - - path.reset(); - path.moveTo(inf, negInf); - REPORTER_ASSERT(reporter, !path.isFinite()); - - path.reset(); - path.moveTo(nan, 0); - REPORTER_ASSERT(reporter, !path.isFinite()); -} - -static void test_isfinite(skiatest::Reporter* reporter) { - test_rect_isfinite(reporter); - test_path_isfinite(reporter); -} - -static void test_islastcontourclosed(skiatest::Reporter* reporter) { - SkPath path; - REPORTER_ASSERT(reporter, !path.isLastContourClosed()); - path.moveTo(0, 0); - REPORTER_ASSERT(reporter, !path.isLastContourClosed()); - path.close(); - REPORTER_ASSERT(reporter, path.isLastContourClosed()); - path.lineTo(100, 100); - REPORTER_ASSERT(reporter, !path.isLastContourClosed()); - path.moveTo(200, 200); - REPORTER_ASSERT(reporter, !path.isLastContourClosed()); - path.close(); - REPORTER_ASSERT(reporter, path.isLastContourClosed()); - path.moveTo(0, 0); - REPORTER_ASSERT(reporter, !path.isLastContourClosed()); -} - -// assert that we always -// start with a moveTo -// only have 1 moveTo -// only have Lines after that -// end with a single close -// only have (at most) 1 close -// -static void test_poly(skiatest::Reporter* reporter, const SkPath& path, - const SkPoint srcPts[], bool expectClose) { - SkPath::RawIter iter(path); - SkPoint pts[4]; - - bool firstTime = true; - bool foundClose = false; - for (;;) { - switch (iter.next(pts)) { - case SkPath::kMove_Verb: - REPORTER_ASSERT(reporter, firstTime); - REPORTER_ASSERT(reporter, pts[0] == srcPts[0]); - srcPts++; - firstTime = false; - break; - case SkPath::kLine_Verb: - REPORTER_ASSERT(reporter, !firstTime); - REPORTER_ASSERT(reporter, pts[1] == srcPts[0]); - srcPts++; - break; - case SkPath::kQuad_Verb: - REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected quad verb"); - break; - case SkPath::kConic_Verb: - REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected conic verb"); - break; - case SkPath::kCubic_Verb: - REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected cubic verb"); - break; - case SkPath::kClose_Verb: - REPORTER_ASSERT(reporter, !firstTime); - REPORTER_ASSERT(reporter, !foundClose); - REPORTER_ASSERT(reporter, expectClose); - foundClose = true; - break; - case SkPath::kDone_Verb: - goto DONE; - } - } -DONE: - REPORTER_ASSERT(reporter, foundClose == expectClose); -} - -static void test_addPoly(skiatest::Reporter* reporter) { - SkPoint pts[32]; - SkRandom rand; - - for (size_t i = 0; i < SK_ARRAY_COUNT(pts); ++i) { - pts[i].fX = rand.nextSScalar1(); - pts[i].fY = rand.nextSScalar1(); - } - - for (int doClose = 0; doClose <= 1; ++doClose) { - for (size_t count = 1; count <= SK_ARRAY_COUNT(pts); ++count) { - SkPath path; - path.addPoly(pts, SkToInt(count), SkToBool(doClose)); - test_poly(reporter, path, pts, SkToBool(doClose)); - } - } -} - -static void test_strokerec(skiatest::Reporter* reporter) { - SkStrokeRec rec(SkStrokeRec::kFill_InitStyle); - REPORTER_ASSERT(reporter, rec.isFillStyle()); - - rec.setHairlineStyle(); - REPORTER_ASSERT(reporter, rec.isHairlineStyle()); - - rec.setStrokeStyle(SK_Scalar1, false); - REPORTER_ASSERT(reporter, SkStrokeRec::kStroke_Style == rec.getStyle()); - - rec.setStrokeStyle(SK_Scalar1, true); - REPORTER_ASSERT(reporter, SkStrokeRec::kStrokeAndFill_Style == rec.getStyle()); - - rec.setStrokeStyle(0, false); - REPORTER_ASSERT(reporter, SkStrokeRec::kHairline_Style == rec.getStyle()); - - rec.setStrokeStyle(0, true); - REPORTER_ASSERT(reporter, SkStrokeRec::kFill_Style == rec.getStyle()); -} - -// Set this for paths that don't have a consistent direction such as a bowtie. -// (cheapComputeDirection is not expected to catch these.) -const SkPathPriv::FirstDirection kDontCheckDir = static_cast<SkPathPriv::FirstDirection>(-1); - -static void check_direction(skiatest::Reporter* reporter, const SkPath& path, - SkPathPriv::FirstDirection expected) { - if (expected == kDontCheckDir) { - return; - } - SkPath copy(path); // we make a copy so that we don't cache the result on the passed in path. - - SkPathPriv::FirstDirection dir; - if (SkPathPriv::CheapComputeFirstDirection(copy, &dir)) { - REPORTER_ASSERT(reporter, dir == expected); - } else { - REPORTER_ASSERT(reporter, SkPathPriv::kUnknown_FirstDirection == expected); - } -} - -static void test_direction(skiatest::Reporter* reporter) { - size_t i; - SkPath path; - REPORTER_ASSERT(reporter, !SkPathPriv::CheapComputeFirstDirection(path, nullptr)); - REPORTER_ASSERT(reporter, !SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCW_FirstDirection)); - REPORTER_ASSERT(reporter, !SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCCW_FirstDirection)); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kUnknown_FirstDirection)); - - static const char* gDegen[] = { - "M 10 10", - "M 10 10 M 20 20", - "M 10 10 L 20 20", - "M 10 10 L 10 10 L 10 10", - "M 10 10 Q 10 10 10 10", - "M 10 10 C 10 10 10 10 10 10", - }; - for (i = 0; i < SK_ARRAY_COUNT(gDegen); ++i) { - path.reset(); - bool valid = SkParsePath::FromSVGString(gDegen[i], &path); - REPORTER_ASSERT(reporter, valid); - REPORTER_ASSERT(reporter, !SkPathPriv::CheapComputeFirstDirection(path, nullptr)); - } - - static const char* gCW[] = { - "M 10 10 L 10 10 Q 20 10 20 20", - "M 10 10 C 20 10 20 20 20 20", - "M 20 10 Q 20 20 30 20 L 10 20", // test double-back at y-max - // rect with top two corners replaced by cubics with identical middle - // control points - "M 10 10 C 10 0 10 0 20 0 L 40 0 C 50 0 50 0 50 10", - "M 20 10 L 0 10 Q 10 10 20 0", // left, degenerate serif - }; - for (i = 0; i < SK_ARRAY_COUNT(gCW); ++i) { - path.reset(); - bool valid = SkParsePath::FromSVGString(gCW[i], &path); - REPORTER_ASSERT(reporter, valid); - check_direction(reporter, path, SkPathPriv::kCW_FirstDirection); - } - - static const char* gCCW[] = { - "M 10 10 L 10 10 Q 20 10 20 -20", - "M 10 10 C 20 10 20 -20 20 -20", - "M 20 10 Q 20 20 10 20 L 30 20", // test double-back at y-max - // rect with top two corners replaced by cubics with identical middle - // control points - "M 50 10 C 50 0 50 0 40 0 L 20 0 C 10 0 10 0 10 10", - "M 10 10 L 30 10 Q 20 10 10 0", // right, degenerate serif - }; - for (i = 0; i < SK_ARRAY_COUNT(gCCW); ++i) { - path.reset(); - bool valid = SkParsePath::FromSVGString(gCCW[i], &path); - REPORTER_ASSERT(reporter, valid); - check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection); - } - - // Test two donuts, each wound a different direction. Only the outer contour - // determines the cheap direction - path.reset(); - path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCW_Direction); - path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCCW_Direction); - check_direction(reporter, path, SkPathPriv::kCW_FirstDirection); - - path.reset(); - path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCW_Direction); - path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCCW_Direction); - check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection); - - // triangle with one point really far from the origin. - path.reset(); - // the first point is roughly 1.05e10, 1.05e10 - path.moveTo(SkBits2Float(0x501c7652), SkBits2Float(0x501c7652)); - path.lineTo(110 * SK_Scalar1, -10 * SK_Scalar1); - path.lineTo(-10 * SK_Scalar1, 60 * SK_Scalar1); - check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection); - - path.reset(); - path.conicTo(20, 0, 20, 20, 0.5f); - path.close(); - check_direction(reporter, path, SkPathPriv::kCW_FirstDirection); - - path.reset(); - path.lineTo(1, 1e7f); - path.lineTo(1e7f, 2e7f); - path.close(); - REPORTER_ASSERT(reporter, SkPath::kConvex_Convexity == path.getConvexity()); - check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection); -} - -static void add_rect(SkPath* path, const SkRect& r) { - path->moveTo(r.fLeft, r.fTop); - path->lineTo(r.fRight, r.fTop); - path->lineTo(r.fRight, r.fBottom); - path->lineTo(r.fLeft, r.fBottom); - path->close(); -} - -static void test_bounds(skiatest::Reporter* reporter) { - static const SkRect rects[] = { - { SkIntToScalar(10), SkIntToScalar(160), SkIntToScalar(610), SkIntToScalar(160) }, - { SkIntToScalar(610), SkIntToScalar(160), SkIntToScalar(610), SkIntToScalar(199) }, - { SkIntToScalar(10), SkIntToScalar(198), SkIntToScalar(610), SkIntToScalar(199) }, - { SkIntToScalar(10), SkIntToScalar(160), SkIntToScalar(10), SkIntToScalar(199) }, - }; - - SkPath path0, path1; - for (size_t i = 0; i < SK_ARRAY_COUNT(rects); ++i) { - path0.addRect(rects[i]); - add_rect(&path1, rects[i]); - } - - REPORTER_ASSERT(reporter, path0.getBounds() == path1.getBounds()); -} - -static void stroke_cubic(const SkPoint pts[4]) { - SkPath path; - path.moveTo(pts[0]); - path.cubicTo(pts[1], pts[2], pts[3]); - - SkPaint paint; - paint.setStyle(SkPaint::kStroke_Style); - paint.setStrokeWidth(SK_Scalar1 * 2); - - SkPath fill; - paint.getFillPath(path, &fill); -} - -// just ensure this can run w/o any SkASSERTS firing in the debug build -// we used to assert due to differences in how we determine a degenerate vector -// but that was fixed with the introduction of SkPoint::CanNormalize -static void stroke_tiny_cubic() { - SkPoint p0[] = { - { 372.0f, 92.0f }, - { 372.0f, 92.0f }, - { 372.0f, 92.0f }, - { 372.0f, 92.0f }, - }; - - stroke_cubic(p0); - - SkPoint p1[] = { - { 372.0f, 92.0f }, - { 372.0007f, 92.000755f }, - { 371.99927f, 92.003922f }, - { 371.99826f, 92.003899f }, - }; - - stroke_cubic(p1); -} - -static void check_close(skiatest::Reporter* reporter, const SkPath& path) { - for (int i = 0; i < 2; ++i) { - SkPath::Iter iter(path, SkToBool(i)); - SkPoint mv; - SkPoint pts[4]; - SkPath::Verb v; - int nMT = 0; - int nCL = 0; - mv.set(0, 0); - while (SkPath::kDone_Verb != (v = iter.next(pts))) { - switch (v) { - case SkPath::kMove_Verb: - mv = pts[0]; - ++nMT; - break; - case SkPath::kClose_Verb: - REPORTER_ASSERT(reporter, mv == pts[0]); - ++nCL; - break; - default: - break; - } - } - // if we force a close on the interator we should have a close - // for every moveTo - REPORTER_ASSERT(reporter, !i || nMT == nCL); - } -} - -static void test_close(skiatest::Reporter* reporter) { - SkPath closePt; - closePt.moveTo(0, 0); - closePt.close(); - check_close(reporter, closePt); - - SkPath openPt; - openPt.moveTo(0, 0); - check_close(reporter, openPt); - - SkPath empty; - check_close(reporter, empty); - empty.close(); - check_close(reporter, empty); - - SkPath rect; - rect.addRect(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1); - check_close(reporter, rect); - rect.close(); - check_close(reporter, rect); - - SkPath quad; - quad.quadTo(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1); - check_close(reporter, quad); - quad.close(); - check_close(reporter, quad); - - SkPath cubic; - quad.cubicTo(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, - 10*SK_Scalar1, 20 * SK_Scalar1, 20*SK_Scalar1); - check_close(reporter, cubic); - cubic.close(); - check_close(reporter, cubic); - - SkPath line; - line.moveTo(SK_Scalar1, SK_Scalar1); - line.lineTo(10 * SK_Scalar1, 10*SK_Scalar1); - check_close(reporter, line); - line.close(); - check_close(reporter, line); - - SkPath rect2; - rect2.addRect(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1); - rect2.close(); - rect2.addRect(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1); - check_close(reporter, rect2); - rect2.close(); - check_close(reporter, rect2); - - SkPath oval3; - oval3.addOval(SkRect::MakeWH(SK_Scalar1*100,SK_Scalar1*100)); - oval3.close(); - oval3.addOval(SkRect::MakeWH(SK_Scalar1*200,SK_Scalar1*200)); - check_close(reporter, oval3); - oval3.close(); - check_close(reporter, oval3); - - SkPath moves; - moves.moveTo(SK_Scalar1, SK_Scalar1); - moves.moveTo(5 * SK_Scalar1, SK_Scalar1); - moves.moveTo(SK_Scalar1, 10 * SK_Scalar1); - moves.moveTo(10 *SK_Scalar1, SK_Scalar1); - check_close(reporter, moves); - - stroke_tiny_cubic(); -} - -static void check_convexity(skiatest::Reporter* reporter, const SkPath& path, - SkPath::Convexity expected) { - SkPath copy(path); // we make a copy so that we don't cache the result on the passed in path. - SkPath::Convexity c = copy.getConvexity(); - REPORTER_ASSERT(reporter, c == expected); -} - -static void test_path_crbug389050(skiatest::Reporter* reporter) { - SkPath tinyConvexPolygon; - tinyConvexPolygon.moveTo(600.131559f, 800.112512f); - tinyConvexPolygon.lineTo(600.161735f, 800.118627f); - tinyConvexPolygon.lineTo(600.148962f, 800.142338f); - tinyConvexPolygon.lineTo(600.134891f, 800.137724f); - tinyConvexPolygon.close(); - tinyConvexPolygon.getConvexity(); - check_convexity(reporter, tinyConvexPolygon, SkPath::kConvex_Convexity); - check_direction(reporter, tinyConvexPolygon, SkPathPriv::kCW_FirstDirection); - - SkPath platTriangle; - platTriangle.moveTo(0, 0); - platTriangle.lineTo(200, 0); - platTriangle.lineTo(100, 0.04f); - platTriangle.close(); - platTriangle.getConvexity(); - check_direction(reporter, platTriangle, SkPathPriv::kCW_FirstDirection); - - platTriangle.reset(); - platTriangle.moveTo(0, 0); - platTriangle.lineTo(200, 0); - platTriangle.lineTo(100, 0.03f); - platTriangle.close(); - platTriangle.getConvexity(); - check_direction(reporter, platTriangle, SkPathPriv::kCW_FirstDirection); -} - -static void test_convexity2(skiatest::Reporter* reporter) { - SkPath pt; - pt.moveTo(0, 0); - pt.close(); - check_convexity(reporter, pt, SkPath::kConvex_Convexity); - check_direction(reporter, pt, SkPathPriv::kUnknown_FirstDirection); - - SkPath line; - line.moveTo(12*SK_Scalar1, 20*SK_Scalar1); - line.lineTo(-12*SK_Scalar1, -20*SK_Scalar1); - line.close(); - check_convexity(reporter, line, SkPath::kConvex_Convexity); - check_direction(reporter, line, SkPathPriv::kUnknown_FirstDirection); - - SkPath triLeft; - triLeft.moveTo(0, 0); - triLeft.lineTo(SK_Scalar1, 0); - triLeft.lineTo(SK_Scalar1, SK_Scalar1); - triLeft.close(); - check_convexity(reporter, triLeft, SkPath::kConvex_Convexity); - check_direction(reporter, triLeft, SkPathPriv::kCW_FirstDirection); - - SkPath triRight; - triRight.moveTo(0, 0); - triRight.lineTo(-SK_Scalar1, 0); - triRight.lineTo(SK_Scalar1, SK_Scalar1); - triRight.close(); - check_convexity(reporter, triRight, SkPath::kConvex_Convexity); - check_direction(reporter, triRight, SkPathPriv::kCCW_FirstDirection); - - SkPath square; - square.moveTo(0, 0); - square.lineTo(SK_Scalar1, 0); - square.lineTo(SK_Scalar1, SK_Scalar1); - square.lineTo(0, SK_Scalar1); - square.close(); - check_convexity(reporter, square, SkPath::kConvex_Convexity); - check_direction(reporter, square, SkPathPriv::kCW_FirstDirection); - - SkPath redundantSquare; - redundantSquare.moveTo(0, 0); - redundantSquare.lineTo(0, 0); - redundantSquare.lineTo(0, 0); - redundantSquare.lineTo(SK_Scalar1, 0); - redundantSquare.lineTo(SK_Scalar1, 0); - redundantSquare.lineTo(SK_Scalar1, 0); - redundantSquare.lineTo(SK_Scalar1, SK_Scalar1); - redundantSquare.lineTo(SK_Scalar1, SK_Scalar1); - redundantSquare.lineTo(SK_Scalar1, SK_Scalar1); - redundantSquare.lineTo(0, SK_Scalar1); - redundantSquare.lineTo(0, SK_Scalar1); - redundantSquare.lineTo(0, SK_Scalar1); - redundantSquare.close(); - check_convexity(reporter, redundantSquare, SkPath::kConvex_Convexity); - check_direction(reporter, redundantSquare, SkPathPriv::kCW_FirstDirection); - - SkPath bowTie; - bowTie.moveTo(0, 0); - bowTie.lineTo(0, 0); - bowTie.lineTo(0, 0); - bowTie.lineTo(SK_Scalar1, SK_Scalar1); - bowTie.lineTo(SK_Scalar1, SK_Scalar1); - bowTie.lineTo(SK_Scalar1, SK_Scalar1); - bowTie.lineTo(SK_Scalar1, 0); - bowTie.lineTo(SK_Scalar1, 0); - bowTie.lineTo(SK_Scalar1, 0); - bowTie.lineTo(0, SK_Scalar1); - bowTie.lineTo(0, SK_Scalar1); - bowTie.lineTo(0, SK_Scalar1); - bowTie.close(); - check_convexity(reporter, bowTie, SkPath::kConcave_Convexity); - check_direction(reporter, bowTie, kDontCheckDir); - - SkPath spiral; - spiral.moveTo(0, 0); - spiral.lineTo(100*SK_Scalar1, 0); - spiral.lineTo(100*SK_Scalar1, 100*SK_Scalar1); - spiral.lineTo(0, 100*SK_Scalar1); - spiral.lineTo(0, 50*SK_Scalar1); - spiral.lineTo(50*SK_Scalar1, 50*SK_Scalar1); - spiral.lineTo(50*SK_Scalar1, 75*SK_Scalar1); - spiral.close(); - check_convexity(reporter, spiral, SkPath::kConcave_Convexity); - check_direction(reporter, spiral, kDontCheckDir); - - SkPath dent; - dent.moveTo(0, 0); - dent.lineTo(100*SK_Scalar1, 100*SK_Scalar1); - dent.lineTo(0, 100*SK_Scalar1); - dent.lineTo(-50*SK_Scalar1, 200*SK_Scalar1); - dent.lineTo(-200*SK_Scalar1, 100*SK_Scalar1); - dent.close(); - check_convexity(reporter, dent, SkPath::kConcave_Convexity); - check_direction(reporter, dent, SkPathPriv::kCW_FirstDirection); - - // https://bug.skia.org/2235 - SkPath strokedSin; - for (int i = 0; i < 2000; i++) { - SkScalar x = SkIntToScalar(i) / 2; - SkScalar y = 500 - (x + SkScalarSin(x / 100) * 40) / 3; - if (0 == i) { - strokedSin.moveTo(x, y); - } else { - strokedSin.lineTo(x, y); - } - } - SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); - stroke.setStrokeStyle(2 * SK_Scalar1); - stroke.applyToPath(&strokedSin, strokedSin); - check_convexity(reporter, strokedSin, SkPath::kConcave_Convexity); - check_direction(reporter, strokedSin, kDontCheckDir); - - // http://crbug.com/412640 - SkPath degenerateConcave; - degenerateConcave.moveTo(148.67912f, 191.875f); - degenerateConcave.lineTo(470.37695f, 7.5f); - degenerateConcave.lineTo(148.67912f, 191.875f); - degenerateConcave.lineTo(41.446522f, 376.25f); - degenerateConcave.lineTo(-55.971577f, 460.0f); - degenerateConcave.lineTo(41.446522f, 376.25f); - check_convexity(reporter, degenerateConcave, SkPath::kConcave_Convexity); - check_direction(reporter, degenerateConcave, SkPathPriv::kUnknown_FirstDirection); - - // http://crbug.com/433683 - SkPath badFirstVector; - badFirstVector.moveTo(501.087708f, 319.610352f); - badFirstVector.lineTo(501.087708f, 319.610352f); - badFirstVector.cubicTo(501.087677f, 319.610321f, 449.271606f, 258.078674f, 395.084564f, 198.711182f); - badFirstVector.cubicTo(358.967072f, 159.140717f, 321.910553f, 120.650436f, 298.442322f, 101.955399f); - badFirstVector.lineTo(301.557678f, 98.044601f); - badFirstVector.cubicTo(325.283844f, 116.945084f, 362.615204f, 155.720825f, 398.777557f, 195.340454f); - badFirstVector.cubicTo(453.031860f, 254.781662f, 504.912262f, 316.389618f, 504.912292f, 316.389648f); - badFirstVector.lineTo(504.912292f, 316.389648f); - badFirstVector.lineTo(501.087708f, 319.610352f); - badFirstVector.close(); - check_convexity(reporter, badFirstVector, SkPath::kConcave_Convexity); -} - -static void check_convex_bounds(skiatest::Reporter* reporter, const SkPath& p, - const SkRect& bounds) { - REPORTER_ASSERT(reporter, p.isConvex()); - REPORTER_ASSERT(reporter, p.getBounds() == bounds); - - SkPath p2(p); - REPORTER_ASSERT(reporter, p2.isConvex()); - REPORTER_ASSERT(reporter, p2.getBounds() == bounds); - - SkPath other; - other.swap(p2); - REPORTER_ASSERT(reporter, other.isConvex()); - REPORTER_ASSERT(reporter, other.getBounds() == bounds); -} - -static void setFromString(SkPath* path, const char str[]) { - bool first = true; - while (str) { - SkScalar x, y; - str = SkParse::FindScalar(str, &x); - if (nullptr == str) { - break; - } - str = SkParse::FindScalar(str, &y); - SkASSERT(str); - if (first) { - path->moveTo(x, y); - first = false; - } else { - path->lineTo(x, y); - } - } -} - -static void test_convexity(skiatest::Reporter* reporter) { - SkPath path; - - check_convexity(reporter, path, SkPath::kConvex_Convexity); - path.addCircle(0, 0, SkIntToScalar(10)); - check_convexity(reporter, path, SkPath::kConvex_Convexity); - path.addCircle(0, 0, SkIntToScalar(10)); // 2nd circle - check_convexity(reporter, path, SkPath::kConcave_Convexity); - - path.reset(); - path.addRect(0, 0, SkIntToScalar(10), SkIntToScalar(10), SkPath::kCCW_Direction); - check_convexity(reporter, path, SkPath::kConvex_Convexity); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCCW_FirstDirection)); - - path.reset(); - path.addRect(0, 0, SkIntToScalar(10), SkIntToScalar(10), SkPath::kCW_Direction); - check_convexity(reporter, path, SkPath::kConvex_Convexity); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCW_FirstDirection)); - - path.reset(); - path.quadTo(100, 100, 50, 50); // This is a convex path from GM:convexpaths - check_convexity(reporter, path, SkPath::kConvex_Convexity); - - static const struct { - const char* fPathStr; - SkPath::Convexity fExpectedConvexity; - SkPathPriv::FirstDirection fExpectedDirection; - } gRec[] = { - { "", SkPath::kConvex_Convexity, SkPathPriv::kUnknown_FirstDirection }, - { "0 0", SkPath::kConvex_Convexity, SkPathPriv::kUnknown_FirstDirection }, - { "0 0 10 10", SkPath::kConvex_Convexity, SkPathPriv::kUnknown_FirstDirection }, - { "0 0 10 10 20 20 0 0 10 10", SkPath::kConcave_Convexity, SkPathPriv::kUnknown_FirstDirection }, - { "0 0 10 10 10 20", SkPath::kConvex_Convexity, SkPathPriv::kCW_FirstDirection }, - { "0 0 10 10 10 0", SkPath::kConvex_Convexity, SkPathPriv::kCCW_FirstDirection }, - { "0 0 10 10 10 0 0 10", SkPath::kConcave_Convexity, kDontCheckDir }, - { "0 0 10 0 0 10 -10 -10", SkPath::kConcave_Convexity, SkPathPriv::kCW_FirstDirection }, - }; - - for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) { - SkPath path; - setFromString(&path, gRec[i].fPathStr); - check_convexity(reporter, path, gRec[i].fExpectedConvexity); - check_direction(reporter, path, gRec[i].fExpectedDirection); - // check after setting the initial convex and direction - if (kDontCheckDir != gRec[i].fExpectedDirection) { - SkPath copy(path); - SkPathPriv::FirstDirection dir; - bool foundDir = SkPathPriv::CheapComputeFirstDirection(copy, &dir); - REPORTER_ASSERT(reporter, (gRec[i].fExpectedDirection == SkPathPriv::kUnknown_FirstDirection) - ^ foundDir); - REPORTER_ASSERT(reporter, !foundDir || gRec[i].fExpectedDirection == dir); - check_convexity(reporter, copy, gRec[i].fExpectedConvexity); - } - REPORTER_ASSERT(reporter, gRec[i].fExpectedConvexity == path.getConvexity()); - check_direction(reporter, path, gRec[i].fExpectedDirection); - } - - static const SkPoint nonFinitePts[] = { - { SK_ScalarInfinity, 0 }, - { 0, SK_ScalarInfinity }, - { SK_ScalarInfinity, SK_ScalarInfinity }, - { SK_ScalarNegativeInfinity, 0}, - { 0, SK_ScalarNegativeInfinity }, - { SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity }, - { SK_ScalarNegativeInfinity, SK_ScalarInfinity }, - { SK_ScalarInfinity, SK_ScalarNegativeInfinity }, - { SK_ScalarNaN, 0 }, - { 0, SK_ScalarNaN }, - { SK_ScalarNaN, SK_ScalarNaN }, - }; - - const size_t nonFinitePtsCount = sizeof(nonFinitePts) / sizeof(nonFinitePts[0]); - - static const SkPoint finitePts[] = { - { SK_ScalarMax, 0 }, - { 0, SK_ScalarMax }, - { SK_ScalarMax, SK_ScalarMax }, - { SK_ScalarMin, 0 }, - { 0, SK_ScalarMin }, - { SK_ScalarMin, SK_ScalarMin }, - }; - - const size_t finitePtsCount = sizeof(finitePts) / sizeof(finitePts[0]); - - for (int index = 0; index < (int) (13 * nonFinitePtsCount * finitePtsCount); ++index) { - int i = (int) (index % nonFinitePtsCount); - int f = (int) (index % finitePtsCount); - int g = (int) ((f + 1) % finitePtsCount); - path.reset(); - switch (index % 13) { - case 0: path.lineTo(nonFinitePts[i]); break; - case 1: path.quadTo(nonFinitePts[i], nonFinitePts[i]); break; - case 2: path.quadTo(nonFinitePts[i], finitePts[f]); break; - case 3: path.quadTo(finitePts[f], nonFinitePts[i]); break; - case 4: path.cubicTo(nonFinitePts[i], finitePts[f], finitePts[f]); break; - case 5: path.cubicTo(finitePts[f], nonFinitePts[i], finitePts[f]); break; - case 6: path.cubicTo(finitePts[f], finitePts[f], nonFinitePts[i]); break; - case 7: path.cubicTo(nonFinitePts[i], nonFinitePts[i], finitePts[f]); break; - case 8: path.cubicTo(nonFinitePts[i], finitePts[f], nonFinitePts[i]); break; - case 9: path.cubicTo(finitePts[f], nonFinitePts[i], nonFinitePts[i]); break; - case 10: path.cubicTo(nonFinitePts[i], nonFinitePts[i], nonFinitePts[i]); break; - case 11: path.cubicTo(nonFinitePts[i], finitePts[f], finitePts[g]); break; - case 12: path.moveTo(nonFinitePts[i]); break; - } - check_convexity(reporter, path, SkPath::kUnknown_Convexity); - } - - for (int index = 0; index < (int) (11 * finitePtsCount); ++index) { - int f = (int) (index % finitePtsCount); - int g = (int) ((f + 1) % finitePtsCount); - path.reset(); - int curveSelect = index % 11; - switch (curveSelect) { - case 0: path.moveTo(finitePts[f]); break; - case 1: path.lineTo(finitePts[f]); break; - case 2: path.quadTo(finitePts[f], finitePts[f]); break; - case 3: path.quadTo(finitePts[f], finitePts[g]); break; - case 4: path.quadTo(finitePts[g], finitePts[f]); break; - case 5: path.cubicTo(finitePts[f], finitePts[f], finitePts[f]); break; - case 6: path.cubicTo(finitePts[f], finitePts[f], finitePts[g]); break; - case 7: path.cubicTo(finitePts[f], finitePts[g], finitePts[f]); break; - case 8: path.cubicTo(finitePts[f], finitePts[g], finitePts[g]); break; - case 9: path.cubicTo(finitePts[g], finitePts[f], finitePts[f]); break; - case 10: path.cubicTo(finitePts[g], finitePts[f], finitePts[g]); break; - } - check_convexity(reporter, path, curveSelect == 0 ? SkPath::kConvex_Convexity - : SkPath::kUnknown_Convexity); - } - - path.reset(); +/*
+ * Copyright 2011 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkAutoMalloc.h"
+#include "SkCanvas.h"
+#include "SkGeometry.h"
+#include "SkNullCanvas.h"
+#include "SkPaint.h"
+#include "SkParse.h"
+#include "SkParsePath.h"
+#include "SkPathEffect.h"
+#include "SkPathPriv.h"
+#include "SkRRect.h"
+#include "SkRandom.h"
+#include "SkReader32.h"
+#include "SkSize.h"
+#include "SkStream.h"
+#include "SkStrokeRec.h"
+#include "SkSurface.h"
+#include "SkWriter32.h"
+#include "Test.h"
+#include <cmath>
+
+
+static void set_radii(SkVector radii[4], int index, float rad) {
+ sk_bzero(radii, sizeof(SkVector) * 4);
+ radii[index].set(rad, rad);
+}
+
+static void test_add_rrect(skiatest::Reporter* reporter, const SkRect& bounds,
+ const SkVector radii[4]) {
+ SkRRect rrect;
+ rrect.setRectRadii(bounds, radii);
+ REPORTER_ASSERT(reporter, bounds == rrect.rect());
+
+ SkPath path;
+ // this line should not assert in the debug build (from validate)
+ path.addRRect(rrect);
+ REPORTER_ASSERT(reporter, bounds == path.getBounds());
+}
+
+static void test_skbug_3469(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(20, 20);
+ path.quadTo(20, 50, 80, 50);
+ path.quadTo(20, 50, 20, 80);
+ REPORTER_ASSERT(reporter, !path.isConvex());
+}
+
+static void test_skbug_3239(skiatest::Reporter* reporter) {
+ const float min = SkBits2Float(0xcb7f16c8); /* -16717512.000000 */
+ const float max = SkBits2Float(0x4b7f1c1d); /* 16718877.000000 */
+ const float big = SkBits2Float(0x4b7f1bd7); /* 16718807.000000 */
+
+ const float rad = 33436320;
+
+ const SkRect rectx = SkRect::MakeLTRB(min, min, max, big);
+ const SkRect recty = SkRect::MakeLTRB(min, min, big, max);
+
+ SkVector radii[4];
+ for (int i = 0; i < 4; ++i) {
+ set_radii(radii, i, rad);
+ test_add_rrect(reporter, rectx, radii);
+ test_add_rrect(reporter, recty, radii);
+ }
+}
+
+static void make_path_crbug364224(SkPath* path) {
+ path->reset();
+ path->moveTo(3.747501373f, 2.724499941f);
+ path->lineTo(3.747501373f, 3.75f);
+ path->cubicTo(3.747501373f, 3.88774991f, 3.635501385f, 4.0f, 3.497501373f, 4.0f);
+ path->lineTo(0.7475013733f, 4.0f);
+ path->cubicTo(0.6095013618f, 4.0f, 0.4975013733f, 3.88774991f, 0.4975013733f, 3.75f);
+ path->lineTo(0.4975013733f, 1.0f);
+ path->cubicTo(0.4975013733f, 0.8622499704f, 0.6095013618f, 0.75f, 0.7475013733f,0.75f);
+ path->lineTo(3.497501373f, 0.75f);
+ path->cubicTo(3.50275135f, 0.75f, 3.5070014f, 0.7527500391f, 3.513001442f, 0.753000021f);
+ path->lineTo(3.715001345f, 0.5512499809f);
+ path->cubicTo(3.648251295f, 0.5194999576f, 3.575501442f, 0.4999999702f, 3.497501373f, 0.4999999702f);
+ path->lineTo(0.7475013733f, 0.4999999702f);
+ path->cubicTo(0.4715013802f, 0.4999999702f, 0.2475013733f, 0.7239999771f, 0.2475013733f, 1.0f);
+ path->lineTo(0.2475013733f, 3.75f);
+ path->cubicTo(0.2475013733f, 4.026000023f, 0.4715013504f, 4.25f, 0.7475013733f, 4.25f);
+ path->lineTo(3.497501373f, 4.25f);
+ path->cubicTo(3.773501396f, 4.25f, 3.997501373f, 4.026000023f, 3.997501373f, 3.75f);
+ path->lineTo(3.997501373f, 2.474750042f);
+ path->lineTo(3.747501373f, 2.724499941f);
+ path->close();
+}
+
+static void make_path_crbug364224_simplified(SkPath* path) {
+ path->moveTo(3.747501373f, 2.724499941f);
+ path->cubicTo(3.648251295f, 0.5194999576f, 3.575501442f, 0.4999999702f, 3.497501373f, 0.4999999702f);
+ path->close();
+}
+
+static void test_sect_with_horizontal_needs_pinning() {
+ // Test that sect_with_horizontal in SkLineClipper.cpp needs to pin after computing the
+ // intersection.
+ SkPath path;
+ path.reset();
+ path.moveTo(-540000, -720000);
+ path.lineTo(-9.10000017e-05f, 9.99999996e-13f);
+ path.lineTo(1, 1);
+
+ // Without the pinning code in sect_with_horizontal(), this would assert in the lineclipper
+ SkPaint paint;
+ SkSurface::MakeRasterN32Premul(10, 10)->getCanvas()->drawPath(path, paint);
+}
+
+static void test_path_crbug364224() {
+ SkPath path;
+ SkPaint paint;
+ auto surface(SkSurface::MakeRasterN32Premul(84, 88));
+ SkCanvas* canvas = surface->getCanvas();
+
+ make_path_crbug364224_simplified(&path);
+ canvas->drawPath(path, paint);
+
+ make_path_crbug364224(&path);
+ canvas->drawPath(path, paint);
+}
+
+// this is a unit test instead of a GM because it doesn't draw anything
+static void test_fuzz_crbug_638223() {
+ auto surface(SkSurface::MakeRasterN32Premul(250, 250));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPath path;
+ path.moveTo(SkBits2Float(0x47452a00), SkBits2Float(0x43211d01)); // 50474, 161.113f
+ path.conicTo(SkBits2Float(0x401c0000), SkBits2Float(0x40680000),
+ SkBits2Float(0x02c25a81), SkBits2Float(0x981a1fa0),
+ SkBits2Float(0x6bf9abea)); // 2.4375f, 3.625f, 2.85577e-37f, -1.992e-24f, 6.03669e+26f
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ canvas->drawPath(path, paint);
+}
+
+static void test_fuzz_crbug_643933() {
+ auto surface(SkSurface::MakeRasterN32Premul(250, 250));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(0, 0);
+ path.conicTo(SkBits2Float(0x002001f2), SkBits2Float(0x4161ffff), // 2.93943e-39f, 14.125f
+ SkBits2Float(0x49f7224d), SkBits2Float(0x45eec8df), // 2.02452e+06f, 7641.11f
+ SkBits2Float(0x721aee0c)); // 3.0687e+30f
+ canvas->drawPath(path, paint);
+ path.reset();
+ path.moveTo(0, 0);
+ path.conicTo(SkBits2Float(0x00007ff2), SkBits2Float(0x4169ffff), // 4.58981e-41f, 14.625f
+ SkBits2Float(0x43ff2261), SkBits2Float(0x41eeea04), // 510.269f, 29.8643f
+ SkBits2Float(0x5d06eff8)); // 6.07704e+17f
+ canvas->drawPath(path, paint);
+}
+
+static void test_fuzz_crbug_647922() {
+ auto surface(SkSurface::MakeRasterN32Premul(250, 250));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(0, 0);
+ path.conicTo(SkBits2Float(0x00003939), SkBits2Float(0x42487fff), // 2.05276e-41f, 50.125f
+ SkBits2Float(0x48082361), SkBits2Float(0x4408e8e9), // 139406, 547.639f
+ SkBits2Float(0x4d1ade0f)); // 1.6239e+08f
+ canvas->drawPath(path, paint);
+}
+
+static void test_fuzz_crbug_662780() {
+ auto surface(SkSurface::MakeRasterN32Premul(250, 250));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000)); // 8, 158
+ path.lineTo(SkBits2Float(0x41000000), SkBits2Float(0x42f00000)); // 8, 120
+ // 8, 8, 8.00002f, 8, 0.707107f
+ path.conicTo(SkBits2Float(0x41000000), SkBits2Float(0x41000000),
+ SkBits2Float(0x41000010), SkBits2Float(0x41000000), SkBits2Float(0x3f3504f3));
+ path.lineTo(SkBits2Float(0x439a0000), SkBits2Float(0x41000000)); // 308, 8
+ // 308, 8, 308, 8, 0.707107f
+ path.conicTo(SkBits2Float(0x439a0000), SkBits2Float(0x41000000),
+ SkBits2Float(0x439a0000), SkBits2Float(0x41000000), SkBits2Float(0x3f3504f3));
+ path.lineTo(SkBits2Float(0x439a0000), SkBits2Float(0x431e0000)); // 308, 158
+ // 308, 158, 308, 158, 0.707107f
+ path.conicTo(SkBits2Float(0x439a0000), SkBits2Float(0x431e0000),
+ SkBits2Float(0x439a0000), SkBits2Float(0x431e0000), SkBits2Float(0x3f3504f3));
+ path.lineTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000)); // 8, 158
+ // 8, 158, 8, 158, 0.707107f
+ path.conicTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000),
+ SkBits2Float(0x41000000), SkBits2Float(0x431e0000), SkBits2Float(0x3f3504f3));
+ path.close();
+ canvas->clipPath(path, true);
+ canvas->drawRect(SkRect::MakeWH(250, 250), paint);
+}
+
+static void test_mask_overflow() {
+ auto surface(SkSurface::MakeRasterN32Premul(500, 500));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(SkBits2Float(0x43e28000), SkBits2Float(0x43aa8000)); // 453, 341
+ path.lineTo(SkBits2Float(0x43de6000), SkBits2Float(0x43aa8000)); // 444.75f, 341
+ // 440.47f, 341, 437, 344.47f, 437, 348.75f
+ path.cubicTo(SkBits2Float(0x43dc3c29), SkBits2Float(0x43aa8000),
+ SkBits2Float(0x43da8000), SkBits2Float(0x43ac3c29),
+ SkBits2Float(0x43da8000), SkBits2Float(0x43ae6000));
+ path.lineTo(SkBits2Float(0x43da8000), SkBits2Float(0x43b18000)); // 437, 355
+ path.lineTo(SkBits2Float(0x43e28000), SkBits2Float(0x43b18000)); // 453, 355
+ path.lineTo(SkBits2Float(0x43e28000), SkBits2Float(0x43aa8000)); // 453, 341
+ canvas->drawPath(path, paint);
+}
+
+static void test_fuzz_crbug_668907() {
+ auto surface(SkSurface::MakeRasterN32Premul(400, 500));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(SkBits2Float(0x46313741), SkBits2Float(0x3b00e540)); // 11341.8f, 0.00196679f
+ path.quadTo(SkBits2Float(0x41410041), SkBits2Float(0xc1414141), SkBits2Float(0x41414141),
+ SkBits2Float(0x414100ff)); // 12.0626f, -12.0784f, 12.0784f, 12.0627f
+ path.lineTo(SkBits2Float(0x46313741), SkBits2Float(0x3b00e540)); // 11341.8f, 0.00196679f
+ path.close();
+ canvas->drawPath(path, paint);
+}
+
+/**
+ * In debug mode, this path was causing an assertion to fail in
+ * SkPathStroker::preJoinTo() and, in Release, the use of an unitialized value.
+ */
+static void make_path_crbugskia2820(SkPath* path, skiatest::Reporter* reporter) {
+ SkPoint orig, p1, p2, p3;
+ orig = SkPoint::Make(1.f, 1.f);
+ p1 = SkPoint::Make(1.f - SK_ScalarNearlyZero, 1.f);
+ p2 = SkPoint::Make(1.f, 1.f + SK_ScalarNearlyZero);
+ p3 = SkPoint::Make(2.f, 2.f);
+
+ path->reset();
+ path->moveTo(orig);
+ path->cubicTo(p1, p2, p3);
+ path->close();
+}
+
+static void test_path_crbugskia2820(skiatest::Reporter* reporter) {//GrContext* context) {
+ SkPath path;
+ make_path_crbugskia2820(&path, reporter);
+
+ SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
+ stroke.setStrokeStyle(2 * SK_Scalar1);
+ stroke.applyToPath(&path, path);
+}
+
+static void test_path_crbugskia5995() {
+ auto surface(SkSurface::MakeRasterN32Premul(500, 500));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(SkBits2Float(0x40303030), SkBits2Float(0x3e303030)); // 2.75294f, 0.172059f
+ path.quadTo(SkBits2Float(0x41d63030), SkBits2Float(0x30303030), SkBits2Float(0x41013030),
+ SkBits2Float(0x00000000)); // 26.7735f, 6.40969e-10f, 8.07426f, 0
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ canvas->drawPath(path, paint);
+}
+
+static void make_path0(SkPath* path) {
+ // from * https://code.google.com/p/skia/issues/detail?id=1706
+
+ path->moveTo(146.939f, 1012.84f);
+ path->lineTo(181.747f, 1009.18f);
+ path->lineTo(182.165f, 1013.16f);
+ path->lineTo(147.357f, 1016.82f);
+ path->lineTo(146.939f, 1012.84f);
+ path->close();
+}
+
+static void make_path1(SkPath* path) {
+ path->addRect(SkRect::MakeXYWH(10, 10, 10, 1));
+}
+
+typedef void (*PathProc)(SkPath*);
+
+/*
+ * Regression test: we used to crash (overwrite internal storage) during
+ * construction of the region when the path was INVERSE. That is now fixed,
+ * so test these regions (which used to assert/crash).
+ *
+ * https://code.google.com/p/skia/issues/detail?id=1706
+ */
+static void test_path_to_region(skiatest::Reporter* reporter) {
+ PathProc procs[] = {
+ make_path0,
+ make_path1,
+ };
+
+ SkRegion clip;
+ clip.setRect(0, 0, 1255, 1925);
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(procs); ++i) {
+ SkPath path;
+ procs[i](&path);
+
+ SkRegion rgn;
+ rgn.setPath(path, clip);
+ path.toggleInverseFillType();
+ rgn.setPath(path, clip);
+ }
+}
+
+#ifdef SK_BUILD_FOR_WIN
+ #define SUPPRESS_VISIBILITY_WARNING
+#else
+ #define SUPPRESS_VISIBILITY_WARNING __attribute__((visibility("hidden")))
+#endif
+
+static void test_path_close_issue1474(skiatest::Reporter* reporter) {
+ // This test checks that r{Line,Quad,Conic,Cubic}To following a close()
+ // are relative to the point we close to, not relative to the point we close from.
+ SkPath path;
+ SkPoint last;
+
+ // Test rLineTo().
+ path.rLineTo(0, 100);
+ path.rLineTo(100, 0);
+ path.close(); // Returns us back to 0,0.
+ path.rLineTo(50, 50); // This should go to 50,50.
+
+ path.getLastPt(&last);
+ REPORTER_ASSERT(reporter, 50 == last.fX);
+ REPORTER_ASSERT(reporter, 50 == last.fY);
+
+ // Test rQuadTo().
+ path.rewind();
+ path.rLineTo(0, 100);
+ path.rLineTo(100, 0);
+ path.close();
+ path.rQuadTo(50, 50, 75, 75);
+
+ path.getLastPt(&last);
+ REPORTER_ASSERT(reporter, 75 == last.fX);
+ REPORTER_ASSERT(reporter, 75 == last.fY);
+
+ // Test rConicTo().
+ path.rewind();
+ path.rLineTo(0, 100);
+ path.rLineTo(100, 0);
+ path.close();
+ path.rConicTo(50, 50, 85, 85, 2);
+
+ path.getLastPt(&last);
+ REPORTER_ASSERT(reporter, 85 == last.fX);
+ REPORTER_ASSERT(reporter, 85 == last.fY);
+
+ // Test rCubicTo().
+ path.rewind();
+ path.rLineTo(0, 100);
+ path.rLineTo(100, 0);
+ path.close();
+ path.rCubicTo(50, 50, 85, 85, 95, 95);
+
+ path.getLastPt(&last);
+ REPORTER_ASSERT(reporter, 95 == last.fX);
+ REPORTER_ASSERT(reporter, 95 == last.fY);
+}
+
+static void test_gen_id(skiatest::Reporter* reporter) {
+ SkPath a, b;
+ REPORTER_ASSERT(reporter, a.getGenerationID() == b.getGenerationID());
+
+ a.moveTo(0, 0);
+ const uint32_t z = a.getGenerationID();
+ REPORTER_ASSERT(reporter, z != b.getGenerationID());
+
+ a.reset();
+ REPORTER_ASSERT(reporter, a.getGenerationID() == b.getGenerationID());
+
+ a.moveTo(1, 1);
+ const uint32_t y = a.getGenerationID();
+ REPORTER_ASSERT(reporter, z != y);
+
+ b.moveTo(2, 2);
+ const uint32_t x = b.getGenerationID();
+ REPORTER_ASSERT(reporter, x != y && x != z);
+
+ a.swap(b);
+ REPORTER_ASSERT(reporter, b.getGenerationID() == y && a.getGenerationID() == x);
+
+ b = a;
+ REPORTER_ASSERT(reporter, b.getGenerationID() == x);
+
+ SkPath c(a);
+ REPORTER_ASSERT(reporter, c.getGenerationID() == x);
+
+ c.lineTo(3, 3);
+ const uint32_t w = c.getGenerationID();
+ REPORTER_ASSERT(reporter, b.getGenerationID() == x);
+ REPORTER_ASSERT(reporter, a.getGenerationID() == x);
+ REPORTER_ASSERT(reporter, w != x);
+
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+ static bool kExpectGenIDToIgnoreFill = false;
+#else
+ static bool kExpectGenIDToIgnoreFill = true;
+#endif
+
+ c.toggleInverseFillType();
+ const uint32_t v = c.getGenerationID();
+ REPORTER_ASSERT(reporter, (v == w) == kExpectGenIDToIgnoreFill);
+
+ c.rewind();
+ REPORTER_ASSERT(reporter, v != c.getGenerationID());
+}
+
+// This used to assert in the debug build, as the edges did not all line-up.
+static void test_bad_cubic_crbug234190() {
+ SkPath path;
+ path.moveTo(13.8509f, 3.16858f);
+ path.cubicTo(-2.35893e+08f, -4.21044e+08f,
+ -2.38991e+08f, -4.26573e+08f,
+ -2.41016e+08f, -4.30188e+08f);
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ auto surface(SkSurface::MakeRasterN32Premul(84, 88));
+ surface->getCanvas()->drawPath(path, paint);
+}
+
+static void test_bad_cubic_crbug229478() {
+ const SkPoint pts[] = {
+ { 4595.91064f, -11596.9873f },
+ { 4597.2168f, -11595.9414f },
+ { 4598.52344f, -11594.8955f },
+ { 4599.83008f, -11593.8496f },
+ };
+
+ SkPath path;
+ path.moveTo(pts[0]);
+ path.cubicTo(pts[1], pts[2], pts[3]);
+
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+
+ SkPath dst;
+ // Before the fix, this would infinite-recurse, and run out of stack
+ // because we would keep trying to subdivide a degenerate cubic segment.
+ paint.getFillPath(path, &dst, nullptr);
+}
+
+static void build_path_170666(SkPath& path) {
+ path.moveTo(17.9459f, 21.6344f);
+ path.lineTo(139.545f, -47.8105f);
+ path.lineTo(139.545f, -47.8105f);
+ path.lineTo(131.07f, -47.3888f);
+ path.lineTo(131.07f, -47.3888f);
+ path.lineTo(122.586f, -46.9532f);
+ path.lineTo(122.586f, -46.9532f);
+ path.lineTo(18076.6f, 31390.9f);
+ path.lineTo(18076.6f, 31390.9f);
+ path.lineTo(18085.1f, 31390.5f);
+ path.lineTo(18085.1f, 31390.5f);
+ path.lineTo(18076.6f, 31390.9f);
+ path.lineTo(18076.6f, 31390.9f);
+ path.lineTo(17955, 31460.3f);
+ path.lineTo(17955, 31460.3f);
+ path.lineTo(17963.5f, 31459.9f);
+ path.lineTo(17963.5f, 31459.9f);
+ path.lineTo(17971.9f, 31459.5f);
+ path.lineTo(17971.9f, 31459.5f);
+ path.lineTo(17.9551f, 21.6205f);
+ path.lineTo(17.9551f, 21.6205f);
+ path.lineTo(9.47091f, 22.0561f);
+ path.lineTo(9.47091f, 22.0561f);
+ path.lineTo(17.9459f, 21.6344f);
+ path.lineTo(17.9459f, 21.6344f);
+ path.close();path.moveTo(0.995934f, 22.4779f);
+ path.lineTo(0.986725f, 22.4918f);
+ path.lineTo(0.986725f, 22.4918f);
+ path.lineTo(17955, 31460.4f);
+ path.lineTo(17955, 31460.4f);
+ path.lineTo(17971.9f, 31459.5f);
+ path.lineTo(17971.9f, 31459.5f);
+ path.lineTo(18093.6f, 31390.1f);
+ path.lineTo(18093.6f, 31390.1f);
+ path.lineTo(18093.6f, 31390);
+ path.lineTo(18093.6f, 31390);
+ path.lineTo(139.555f, -47.8244f);
+ path.lineTo(139.555f, -47.8244f);
+ path.lineTo(122.595f, -46.9671f);
+ path.lineTo(122.595f, -46.9671f);
+ path.lineTo(0.995934f, 22.4779f);
+ path.lineTo(0.995934f, 22.4779f);
+ path.close();
+ path.moveTo(5.43941f, 25.5223f);
+ path.lineTo(798267, -28871.1f);
+ path.lineTo(798267, -28871.1f);
+ path.lineTo(3.12512e+06f, -113102);
+ path.lineTo(3.12512e+06f, -113102);
+ path.cubicTo(5.16324e+06f, -186882, 8.15247e+06f, -295092, 1.1957e+07f, -432813);
+ path.cubicTo(1.95659e+07f, -708257, 3.04359e+07f, -1.10175e+06f, 4.34798e+07f, -1.57394e+06f);
+ path.cubicTo(6.95677e+07f, -2.51831e+06f, 1.04352e+08f, -3.77748e+06f, 1.39135e+08f, -5.03666e+06f);
+ path.cubicTo(1.73919e+08f, -6.29583e+06f, 2.08703e+08f, -7.555e+06f, 2.34791e+08f, -8.49938e+06f);
+ path.cubicTo(2.47835e+08f, -8.97157e+06f, 2.58705e+08f, -9.36506e+06f, 2.66314e+08f, -9.6405e+06f);
+ path.cubicTo(2.70118e+08f, -9.77823e+06f, 2.73108e+08f, -9.88644e+06f, 2.75146e+08f, -9.96022e+06f);
+ path.cubicTo(2.76165e+08f, -9.99711e+06f, 2.76946e+08f, -1.00254e+07f, 2.77473e+08f, -1.00444e+07f);
+ path.lineTo(2.78271e+08f, -1.00733e+07f);
+ path.lineTo(2.78271e+08f, -1.00733e+07f);
+ path.cubicTo(2.78271e+08f, -1.00733e+07f, 2.08703e+08f, -7.555e+06f, 135.238f, 23.3517f);
+ path.cubicTo(131.191f, 23.4981f, 125.995f, 23.7976f, 123.631f, 24.0206f);
+ path.cubicTo(121.267f, 24.2436f, 122.631f, 24.3056f, 126.677f, 24.1591f);
+ path.cubicTo(2.08703e+08f, -7.555e+06f, 2.78271e+08f, -1.00733e+07f, 2.78271e+08f, -1.00733e+07f);
+ path.lineTo(2.77473e+08f, -1.00444e+07f);
+ path.lineTo(2.77473e+08f, -1.00444e+07f);
+ path.cubicTo(2.76946e+08f, -1.00254e+07f, 2.76165e+08f, -9.99711e+06f, 2.75146e+08f, -9.96022e+06f);
+ path.cubicTo(2.73108e+08f, -9.88644e+06f, 2.70118e+08f, -9.77823e+06f, 2.66314e+08f, -9.6405e+06f);
+ path.cubicTo(2.58705e+08f, -9.36506e+06f, 2.47835e+08f, -8.97157e+06f, 2.34791e+08f, -8.49938e+06f);
+ path.cubicTo(2.08703e+08f, -7.555e+06f, 1.73919e+08f, -6.29583e+06f, 1.39135e+08f, -5.03666e+06f);
+ path.cubicTo(1.04352e+08f, -3.77749e+06f, 6.95677e+07f, -2.51831e+06f, 4.34798e+07f, -1.57394e+06f);
+ path.cubicTo(3.04359e+07f, -1.10175e+06f, 1.95659e+07f, -708258, 1.1957e+07f, -432814);
+ path.cubicTo(8.15248e+06f, -295092, 5.16324e+06f, -186883, 3.12513e+06f, -113103);
+ path.lineTo(798284, -28872);
+ path.lineTo(798284, -28872);
+ path.lineTo(22.4044f, 24.6677f);
+ path.lineTo(22.4044f, 24.6677f);
+ path.cubicTo(22.5186f, 24.5432f, 18.8134f, 24.6337f, 14.1287f, 24.8697f);
+ path.cubicTo(9.4439f, 25.1057f, 5.55359f, 25.3978f, 5.43941f, 25.5223f);
+ path.close();
+}
+
+static void build_path_simple_170666(SkPath& path) {
+ path.moveTo(126.677f, 24.1591f);
+ path.cubicTo(2.08703e+08f, -7.555e+06f, 2.78271e+08f, -1.00733e+07f, 2.78271e+08f, -1.00733e+07f);
+}
+
+// This used to assert in the SK_DEBUG build, as the clip step would fail with
+// too-few interations in our cubic-line intersection code. That code now runs
+// 24 interations (instead of 16).
+static void test_crbug_170666() {
+ SkPath path;
+ SkPaint paint;
+ paint.setAntiAlias(true);
+
+ auto surface(SkSurface::MakeRasterN32Premul(1000, 1000));
+
+ build_path_simple_170666(path);
+ surface->getCanvas()->drawPath(path, paint);
+
+ build_path_170666(path);
+ surface->getCanvas()->drawPath(path, paint);
+}
+
+
+static void test_tiny_path_convexity(skiatest::Reporter* reporter, const char* pathBug,
+ SkScalar tx, SkScalar ty, SkScalar scale) {
+ SkPath smallPath;
+ SkAssertResult(SkParsePath::FromSVGString(pathBug, &smallPath));
+ bool smallConvex = smallPath.isConvex();
+ SkPath largePath;
+ SkAssertResult(SkParsePath::FromSVGString(pathBug, &largePath));
+ SkMatrix matrix;
+ matrix.reset();
+ matrix.preTranslate(100, 100);
+ matrix.preScale(scale, scale);
+ largePath.transform(matrix);
+ bool largeConvex = largePath.isConvex();
+ REPORTER_ASSERT(reporter, smallConvex == largeConvex);
+}
+
+static void test_crbug_493450(skiatest::Reporter* reporter) {
+ const char reducedCase[] =
+ "M0,0"
+ "L0.0002, 0"
+ "L0.0002, 0.0002"
+ "L0.0001, 0.0001"
+ "L0,0.0002"
+ "Z";
+ test_tiny_path_convexity(reporter, reducedCase, 100, 100, 100000);
+ const char originalFiddleData[] =
+ "M-0.3383152268862998,-0.11217565719203619L-0.33846085183212765,-0.11212264406895281"
+ "L-0.338509393480737,-0.11210607966681395L-0.33857792286700894,-0.1121889121487573"
+ "L-0.3383866116636664,-0.11228834570924921L-0.33842087635680235,-0.11246078673250548"
+ "L-0.33809536177201055,-0.11245415228342878L-0.33797257995493996,-0.11216571641452182"
+ "L-0.33802112160354925,-0.11201996164188659L-0.33819815585141844,-0.11218559834671019Z";
+ test_tiny_path_convexity(reporter, originalFiddleData, 280081.4116670522f, 93268.04618493588f,
+ 826357.3384828606f);
+}
+
+static void test_crbug_495894(skiatest::Reporter* reporter) {
+ const char originalFiddleData[] =
+ "M-0.34004273849857214,-0.11332803232216355L-0.34008271397389744,-0.11324483772714951"
+ "L-0.3401940742265893,-0.11324483772714951L-0.34017694188002134,-0.11329807920275889"
+ "L-0.3402026403998733,-0.11333468903941245L-0.34029972369709194,-0.11334134592705701"
+ "L-0.3403054344792813,-0.11344121970007795L-0.3403140006525653,-0.11351115418399343"
+ "L-0.34024261587519866,-0.11353446986281181L-0.3402197727464413,-0.11360442946144192"
+ "L-0.34013696640469604,-0.11359110237029302L-0.34009128014718143,-0.1135877707043939"
+ "L-0.3400598708451401,-0.11360776134112742L-0.34004273849857214,-0.11355112520064405"
+ "L-0.3400113291965308,-0.11355112520064405L-0.3399970522410575,-0.11359110237029302"
+ "L-0.33997135372120546,-0.11355112520064405L-0.3399627875479215,-0.11353780084493197"
+ "L-0.3399485105924481,-0.11350782354357004L-0.3400027630232468,-0.11346452910331437"
+ "L-0.3399485105924481,-0.11340126558629839L-0.33993994441916414,-0.11340126558629839"
+ "L-0.33988283659727087,-0.11331804756574679L-0.33989140277055485,-0.11324483772714951"
+ "L-0.33997991989448945,-0.11324483772714951L-0.3399856306766788,-0.11324483772714951"
+ "L-0.34002560615200417,-0.11334467443478255ZM-0.3400684370184241,-0.11338461985124307"
+ "L-0.340154098751264,-0.11341791238732665L-0.340162664924548,-0.1134378899559977"
+ "L-0.34017979727111597,-0.11340126558629839L-0.3401655203156427,-0.11338129083212668"
+ "L-0.34012268944922275,-0.11332137577529414L-0.34007414780061346,-0.11334467443478255Z"
+ "M-0.3400027630232468,-0.11290567901106024L-0.3400113291965308,-0.11298876531245433"
+ "L-0.33997991989448945,-0.11301535852306784L-0.33990282433493346,-0.11296217481488612"
+ "L-0.33993994441916414,-0.11288906492739594Z";
+ test_tiny_path_convexity(reporter, originalFiddleData, 22682.240000000005f,7819.72220766405f,
+ 65536);
+}
+
+static void test_crbug_613918() {
+ SkPath path;
+ path.conicTo(-6.62478e-08f, 4.13885e-08f, -6.36935e-08f, 3.97927e-08f, 0.729058f);
+ path.quadTo(2.28206e-09f, -1.42572e-09f, 3.91919e-09f, -2.44852e-09f);
+ path.cubicTo(-16752.2f, -26792.9f, -21.4673f, 10.9347f, -8.57322f, -7.22739f);
+
+ // This call could lead to an assert or uninitialized read due to a failure
+ // to check the return value from SkCubicClipper::ChopMonoAtY.
+ path.contains(-1.84817e-08f, 1.15465e-08f);
+}
+
+static void test_addrect(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.lineTo(0, 0);
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, path.isRect(nullptr));
+
+ path.reset();
+ path.lineTo(FLT_EPSILON, FLT_EPSILON);
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, !path.isRect(nullptr));
+
+ path.reset();
+ path.quadTo(0, 0, 0, 0);
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, !path.isRect(nullptr));
+
+ path.reset();
+ path.conicTo(0, 0, 0, 0, 0.5f);
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, !path.isRect(nullptr));
+
+ path.reset();
+ path.cubicTo(0, 0, 0, 0, 0, 0);
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, !path.isRect(nullptr));
+}
+
+// Make sure we stay non-finite once we get there (unless we reset or rewind).
+static void test_addrect_isfinite(skiatest::Reporter* reporter) {
+ SkPath path;
+
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, path.isFinite());
+
+ path.moveTo(0, 0);
+ path.lineTo(SK_ScalarInfinity, 42);
+ REPORTER_ASSERT(reporter, !path.isFinite());
+
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, !path.isFinite());
+
+ path.reset();
+ REPORTER_ASSERT(reporter, path.isFinite());
+
+ path.addRect(SkRect::MakeWH(50, 100));
+ REPORTER_ASSERT(reporter, path.isFinite());
+}
+
+static void build_big_path(SkPath* path, bool reducedCase) {
+ if (reducedCase) {
+ path->moveTo(577330, 1971.72f);
+ path->cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f);
+ } else {
+ path->moveTo(60.1631f, 7.70567f);
+ path->quadTo(60.1631f, 7.70567f, 0.99474f, 0.901199f);
+ path->lineTo(577379, 1977.77f);
+ path->quadTo(577364, 1979.57f, 577325, 1980.26f);
+ path->quadTo(577286, 1980.95f, 577245, 1980.13f);
+ path->quadTo(577205, 1979.3f, 577187, 1977.45f);
+ path->quadTo(577168, 1975.6f, 577183, 1973.8f);
+ path->quadTo(577198, 1972, 577238, 1971.31f);
+ path->quadTo(577277, 1970.62f, 577317, 1971.45f);
+ path->quadTo(577330, 1971.72f, 577341, 1972.11f);
+ path->cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f);
+ path->moveTo(306.718f, -32.912f);
+ path->cubicTo(30.531f, 10.0005f, 1502.47f, 13.2804f, 84.3088f, 9.99601f);
+ }
+}
+
+static void test_clipped_cubic() {
+ auto surface(SkSurface::MakeRasterN32Premul(640, 480));
+
+ // This path used to assert, because our cubic-chopping code incorrectly
+ // moved control points after the chop. This test should be run in SK_DEBUG
+ // mode to ensure that we no long assert.
+ SkPath path;
+ for (int doReducedCase = 0; doReducedCase <= 1; ++doReducedCase) {
+ build_big_path(&path, SkToBool(doReducedCase));
+
+ SkPaint paint;
+ for (int doAA = 0; doAA <= 1; ++doAA) {
+ paint.setAntiAlias(SkToBool(doAA));
+ surface->getCanvas()->drawPath(path, paint);
+ }
+ }
+}
+
+static void dump_if_ne(skiatest::Reporter* reporter, const SkRect& expected, const SkRect& bounds) {
+ if (expected != bounds) {
+ ERRORF(reporter, "path.getBounds() returned [%g %g %g %g], but expected [%g %g %g %g]",
+ bounds.left(), bounds.top(), bounds.right(), bounds.bottom(),
+ expected.left(), expected.top(), expected.right(), expected.bottom());
+ }
+}
+
+static void test_bounds_crbug_513799(skiatest::Reporter* reporter) {
+ SkPath path;
+#if 0
+ // As written these tests were failing on LLVM 4.2 MacMini Release mysteriously, so we've
+ // rewritten them to avoid this (compiler-bug?).
+ REPORTER_ASSERT(reporter, SkRect::MakeLTRB(0, 0, 0, 0) == path.getBounds());
+
+ path.moveTo(-5, -8);
+ REPORTER_ASSERT(reporter, SkRect::MakeLTRB(-5, -8, -5, -8) == path.getBounds());
+
+ path.addRect(SkRect::MakeLTRB(1, 2, 3, 4));
+ REPORTER_ASSERT(reporter, SkRect::MakeLTRB(-5, -8, 3, 4) == path.getBounds());
+
+ path.moveTo(1, 2);
+ REPORTER_ASSERT(reporter, SkRect::MakeLTRB(-5, -8, 3, 4) == path.getBounds());
+#else
+ dump_if_ne(reporter, SkRect::MakeLTRB(0, 0, 0, 0), path.getBounds());
+
+ path.moveTo(-5, -8); // should set the bounds
+ dump_if_ne(reporter, SkRect::MakeLTRB(-5, -8, -5, -8), path.getBounds());
+
+ path.addRect(SkRect::MakeLTRB(1, 2, 3, 4)); // should extend the bounds
+ dump_if_ne(reporter, SkRect::MakeLTRB(-5, -8, 3, 4), path.getBounds());
+
+ path.moveTo(1, 2); // don't expect this to have changed the bounds
+ dump_if_ne(reporter, SkRect::MakeLTRB(-5, -8, 3, 4), path.getBounds());
+#endif
+}
+
+#include "SkSurface.h"
+static void test_fuzz_crbug_627414(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.conicTo(3.58732e-43f, 2.72084f, 3.00392f, 3.00392f, 8.46e+37f);
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+
+ auto surf = SkSurface::MakeRasterN32Premul(100, 100);
+ surf->getCanvas()->drawPath(path, paint);
+}
+
+// Inspired by http://ie.microsoft.com/testdrive/Performance/Chalkboard/
+// which triggered an assert, from a tricky cubic. This test replicates that
+// example, so we can ensure that we handle it (in SkEdge.cpp), and don't
+// assert in the SK_DEBUG build.
+static void test_tricky_cubic() {
+ const SkPoint pts[] = {
+ { SkDoubleToScalar(18.8943768), SkDoubleToScalar(129.121277) },
+ { SkDoubleToScalar(18.8937435), SkDoubleToScalar(129.121689) },
+ { SkDoubleToScalar(18.8950119), SkDoubleToScalar(129.120422) },
+ { SkDoubleToScalar(18.5030727), SkDoubleToScalar(129.13121) },
+ };
+
+ SkPath path;
+ path.moveTo(pts[0]);
+ path.cubicTo(pts[1], pts[2], pts[3]);
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+
+ SkSurface::MakeRasterN32Premul(19, 130)->getCanvas()->drawPath(path, paint);
+}
+
+// Inspired by http://code.google.com/p/chromium/issues/detail?id=141651
+//
+static void test_isfinite_after_transform(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.quadTo(157, 366, 286, 208);
+ path.arcTo(37, 442, 315, 163, 957494590897113.0f);
+
+ SkMatrix matrix;
+ matrix.setScale(1000*1000, 1000*1000);
+
+ // Be sure that path::transform correctly updates isFinite and the bounds
+ // if the transformation overflows. The previous bug was that isFinite was
+ // set to true in this case, but the bounds were not set to empty (which
+ // they should be).
+ while (path.isFinite()) {
+ REPORTER_ASSERT(reporter, path.getBounds().isFinite());
+ REPORTER_ASSERT(reporter, !path.getBounds().isEmpty());
+ path.transform(matrix);
+ }
+ REPORTER_ASSERT(reporter, path.getBounds().isEmpty());
+
+ matrix.setTranslate(SK_Scalar1, SK_Scalar1);
+ path.transform(matrix);
+ // we need to still be non-finite
+ REPORTER_ASSERT(reporter, !path.isFinite());
+ REPORTER_ASSERT(reporter, path.getBounds().isEmpty());
+}
+
+static void add_corner_arc(SkPath* path, const SkRect& rect,
+ SkScalar xIn, SkScalar yIn,
+ int startAngle)
+{
+
+ SkScalar rx = SkMinScalar(rect.width(), xIn);
+ SkScalar ry = SkMinScalar(rect.height(), yIn);
+
+ SkRect arcRect;
+ arcRect.set(-rx, -ry, rx, ry);
+ switch (startAngle) {
+ case 0:
+ arcRect.offset(rect.fRight - arcRect.fRight, rect.fBottom - arcRect.fBottom);
+ break;
+ case 90:
+ arcRect.offset(rect.fLeft - arcRect.fLeft, rect.fBottom - arcRect.fBottom);
+ break;
+ case 180:
+ arcRect.offset(rect.fLeft - arcRect.fLeft, rect.fTop - arcRect.fTop);
+ break;
+ case 270:
+ arcRect.offset(rect.fRight - arcRect.fRight, rect.fTop - arcRect.fTop);
+ break;
+ default:
+ break;
+ }
+
+ path->arcTo(arcRect, SkIntToScalar(startAngle), SkIntToScalar(90), false);
+}
+
+static void make_arb_round_rect(SkPath* path, const SkRect& r,
+ SkScalar xCorner, SkScalar yCorner) {
+ // we are lazy here and use the same x & y for each corner
+ add_corner_arc(path, r, xCorner, yCorner, 270);
+ add_corner_arc(path, r, xCorner, yCorner, 0);
+ add_corner_arc(path, r, xCorner, yCorner, 90);
+ add_corner_arc(path, r, xCorner, yCorner, 180);
+ path->close();
+}
+
+// Chrome creates its own round rects with each corner possibly being different.
+// Performance will suffer if they are not convex.
+// Note: PathBench::ArbRoundRectBench performs almost exactly
+// the same test (but with drawing)
+static void test_arb_round_rect_is_convex(skiatest::Reporter* reporter) {
+ SkRandom rand;
+ SkRect r;
+
+ for (int i = 0; i < 5000; ++i) {
+
+ SkScalar size = rand.nextUScalar1() * 30;
+ if (size < SK_Scalar1) {
+ continue;
+ }
+ r.fLeft = rand.nextUScalar1() * 300;
+ r.fTop = rand.nextUScalar1() * 300;
+ r.fRight = r.fLeft + 2 * size;
+ r.fBottom = r.fTop + 2 * size;
+
+ SkPath temp;
+
+ make_arb_round_rect(&temp, r, r.width() / 10, r.height() / 15);
+
+ REPORTER_ASSERT(reporter, temp.isConvex());
+ }
+}
+
+// Chrome will sometimes create a 0 radius round rect. The degenerate
+// quads prevent the path from being converted to a rect
+// Note: PathBench::ArbRoundRectBench performs almost exactly
+// the same test (but with drawing)
+static void test_arb_zero_rad_round_rect_is_rect(skiatest::Reporter* reporter) {
+ SkRandom rand;
+ SkRect r;
+
+ for (int i = 0; i < 5000; ++i) {
+
+ SkScalar size = rand.nextUScalar1() * 30;
+ if (size < SK_Scalar1) {
+ continue;
+ }
+ r.fLeft = rand.nextUScalar1() * 300;
+ r.fTop = rand.nextUScalar1() * 300;
+ r.fRight = r.fLeft + 2 * size;
+ r.fBottom = r.fTop + 2 * size;
+
+ SkPath temp;
+
+ make_arb_round_rect(&temp, r, 0, 0);
+
+ SkRect result;
+ REPORTER_ASSERT(reporter, temp.isRect(&result));
+ REPORTER_ASSERT(reporter, r == result);
+ }
+}
+
+static void test_rect_isfinite(skiatest::Reporter* reporter) {
+ const SkScalar inf = SK_ScalarInfinity;
+ const SkScalar negInf = SK_ScalarNegativeInfinity;
+ const SkScalar nan = SK_ScalarNaN;
+
+ SkRect r;
+ r.setEmpty();
+ REPORTER_ASSERT(reporter, r.isFinite());
+ r.set(0, 0, inf, negInf);
+ REPORTER_ASSERT(reporter, !r.isFinite());
+ r.set(0, 0, nan, 0);
+ REPORTER_ASSERT(reporter, !r.isFinite());
+
+ SkPoint pts[] = {
+ { 0, 0 },
+ { SK_Scalar1, 0 },
+ { 0, SK_Scalar1 },
+ };
+
+ bool isFine = r.setBoundsCheck(pts, 3);
+ REPORTER_ASSERT(reporter, isFine);
+ REPORTER_ASSERT(reporter, !r.isEmpty());
+
+ pts[1].set(inf, 0);
+ isFine = r.setBoundsCheck(pts, 3);
+ REPORTER_ASSERT(reporter, !isFine);
+ REPORTER_ASSERT(reporter, r.isEmpty());
+
+ pts[1].set(nan, 0);
+ isFine = r.setBoundsCheck(pts, 3);
+ REPORTER_ASSERT(reporter, !isFine);
+ REPORTER_ASSERT(reporter, r.isEmpty());
+}
+
+static void test_path_isfinite(skiatest::Reporter* reporter) {
+ const SkScalar inf = SK_ScalarInfinity;
+ const SkScalar negInf = SK_ScalarNegativeInfinity;
+ const SkScalar nan = SK_ScalarNaN;
+
+ SkPath path;
+ REPORTER_ASSERT(reporter, path.isFinite());
+
+ path.reset();
+ REPORTER_ASSERT(reporter, path.isFinite());
+
+ path.reset();
+ path.moveTo(SK_Scalar1, 0);
+ REPORTER_ASSERT(reporter, path.isFinite());
+
+ path.reset();
+ path.moveTo(inf, negInf);
+ REPORTER_ASSERT(reporter, !path.isFinite());
+
+ path.reset();
+ path.moveTo(nan, 0);
+ REPORTER_ASSERT(reporter, !path.isFinite());
+}
+
+static void test_isfinite(skiatest::Reporter* reporter) {
+ test_rect_isfinite(reporter);
+ test_path_isfinite(reporter);
+}
+
+static void test_islastcontourclosed(skiatest::Reporter* reporter) {
+ SkPath path;
+ REPORTER_ASSERT(reporter, !path.isLastContourClosed());
+ path.moveTo(0, 0);
+ REPORTER_ASSERT(reporter, !path.isLastContourClosed());
+ path.close();
+ REPORTER_ASSERT(reporter, path.isLastContourClosed());
+ path.lineTo(100, 100);
+ REPORTER_ASSERT(reporter, !path.isLastContourClosed());
+ path.moveTo(200, 200);
+ REPORTER_ASSERT(reporter, !path.isLastContourClosed());
+ path.close();
+ REPORTER_ASSERT(reporter, path.isLastContourClosed());
+ path.moveTo(0, 0);
+ REPORTER_ASSERT(reporter, !path.isLastContourClosed());
+}
+
+// assert that we always
+// start with a moveTo
+// only have 1 moveTo
+// only have Lines after that
+// end with a single close
+// only have (at most) 1 close
+//
+static void test_poly(skiatest::Reporter* reporter, const SkPath& path,
+ const SkPoint srcPts[], bool expectClose) {
+ SkPath::RawIter iter(path);
+ SkPoint pts[4];
+
+ bool firstTime = true;
+ bool foundClose = false;
+ for (;;) {
+ switch (iter.next(pts)) {
+ case SkPath::kMove_Verb:
+ REPORTER_ASSERT(reporter, firstTime);
+ REPORTER_ASSERT(reporter, pts[0] == srcPts[0]);
+ srcPts++;
+ firstTime = false;
+ break;
+ case SkPath::kLine_Verb:
+ REPORTER_ASSERT(reporter, !firstTime);
+ REPORTER_ASSERT(reporter, pts[1] == srcPts[0]);
+ srcPts++;
+ break;
+ case SkPath::kQuad_Verb:
+ REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected quad verb");
+ break;
+ case SkPath::kConic_Verb:
+ REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected conic verb");
+ break;
+ case SkPath::kCubic_Verb:
+ REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected cubic verb");
+ break;
+ case SkPath::kClose_Verb:
+ REPORTER_ASSERT(reporter, !firstTime);
+ REPORTER_ASSERT(reporter, !foundClose);
+ REPORTER_ASSERT(reporter, expectClose);
+ foundClose = true;
+ break;
+ case SkPath::kDone_Verb:
+ goto DONE;
+ }
+ }
+DONE:
+ REPORTER_ASSERT(reporter, foundClose == expectClose);
+}
+
+static void test_addPoly(skiatest::Reporter* reporter) {
+ SkPoint pts[32];
+ SkRandom rand;
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(pts); ++i) {
+ pts[i].fX = rand.nextSScalar1();
+ pts[i].fY = rand.nextSScalar1();
+ }
+
+ for (int doClose = 0; doClose <= 1; ++doClose) {
+ for (size_t count = 1; count <= SK_ARRAY_COUNT(pts); ++count) {
+ SkPath path;
+ path.addPoly(pts, SkToInt(count), SkToBool(doClose));
+ test_poly(reporter, path, pts, SkToBool(doClose));
+ }
+ }
+}
+
+static void test_strokerec(skiatest::Reporter* reporter) {
+ SkStrokeRec rec(SkStrokeRec::kFill_InitStyle);
+ REPORTER_ASSERT(reporter, rec.isFillStyle());
+
+ rec.setHairlineStyle();
+ REPORTER_ASSERT(reporter, rec.isHairlineStyle());
+
+ rec.setStrokeStyle(SK_Scalar1, false);
+ REPORTER_ASSERT(reporter, SkStrokeRec::kStroke_Style == rec.getStyle());
+
+ rec.setStrokeStyle(SK_Scalar1, true);
+ REPORTER_ASSERT(reporter, SkStrokeRec::kStrokeAndFill_Style == rec.getStyle());
+
+ rec.setStrokeStyle(0, false);
+ REPORTER_ASSERT(reporter, SkStrokeRec::kHairline_Style == rec.getStyle());
+
+ rec.setStrokeStyle(0, true);
+ REPORTER_ASSERT(reporter, SkStrokeRec::kFill_Style == rec.getStyle());
+}
+
+// Set this for paths that don't have a consistent direction such as a bowtie.
+// (cheapComputeDirection is not expected to catch these.)
+const SkPathPriv::FirstDirection kDontCheckDir = static_cast<SkPathPriv::FirstDirection>(-1);
+
+static void check_direction(skiatest::Reporter* reporter, const SkPath& path,
+ SkPathPriv::FirstDirection expected) {
+ if (expected == kDontCheckDir) {
+ return;
+ }
+ SkPath copy(path); // we make a copy so that we don't cache the result on the passed in path.
+
+ SkPathPriv::FirstDirection dir;
+ if (SkPathPriv::CheapComputeFirstDirection(copy, &dir)) {
+ REPORTER_ASSERT(reporter, dir == expected);
+ } else {
+ REPORTER_ASSERT(reporter, SkPathPriv::kUnknown_FirstDirection == expected);
+ }
+}
+
+static void test_direction(skiatest::Reporter* reporter) {
+ size_t i;
+ SkPath path;
+ REPORTER_ASSERT(reporter, !SkPathPriv::CheapComputeFirstDirection(path, nullptr));
+ REPORTER_ASSERT(reporter, !SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCW_FirstDirection));
+ REPORTER_ASSERT(reporter, !SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCCW_FirstDirection));
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kUnknown_FirstDirection));
+
+ static const char* gDegen[] = {
+ "M 10 10",
+ "M 10 10 M 20 20",
+ "M 10 10 L 20 20",
+ "M 10 10 L 10 10 L 10 10",
+ "M 10 10 Q 10 10 10 10",
+ "M 10 10 C 10 10 10 10 10 10",
+ };
+ for (i = 0; i < SK_ARRAY_COUNT(gDegen); ++i) {
+ path.reset();
+ bool valid = SkParsePath::FromSVGString(gDegen[i], &path);
+ REPORTER_ASSERT(reporter, valid);
+ REPORTER_ASSERT(reporter, !SkPathPriv::CheapComputeFirstDirection(path, nullptr));
+ }
+
+ static const char* gCW[] = {
+ "M 10 10 L 10 10 Q 20 10 20 20",
+ "M 10 10 C 20 10 20 20 20 20",
+ "M 20 10 Q 20 20 30 20 L 10 20", // test double-back at y-max
+ // rect with top two corners replaced by cubics with identical middle
+ // control points
+ "M 10 10 C 10 0 10 0 20 0 L 40 0 C 50 0 50 0 50 10",
+ "M 20 10 L 0 10 Q 10 10 20 0", // left, degenerate serif
+ };
+ for (i = 0; i < SK_ARRAY_COUNT(gCW); ++i) {
+ path.reset();
+ bool valid = SkParsePath::FromSVGString(gCW[i], &path);
+ REPORTER_ASSERT(reporter, valid);
+ check_direction(reporter, path, SkPathPriv::kCW_FirstDirection);
+ }
+
+ static const char* gCCW[] = {
+ "M 10 10 L 10 10 Q 20 10 20 -20",
+ "M 10 10 C 20 10 20 -20 20 -20",
+ "M 20 10 Q 20 20 10 20 L 30 20", // test double-back at y-max
+ // rect with top two corners replaced by cubics with identical middle
+ // control points
+ "M 50 10 C 50 0 50 0 40 0 L 20 0 C 10 0 10 0 10 10",
+ "M 10 10 L 30 10 Q 20 10 10 0", // right, degenerate serif
+ };
+ for (i = 0; i < SK_ARRAY_COUNT(gCCW); ++i) {
+ path.reset();
+ bool valid = SkParsePath::FromSVGString(gCCW[i], &path);
+ REPORTER_ASSERT(reporter, valid);
+ check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection);
+ }
+
+ // Test two donuts, each wound a different direction. Only the outer contour
+ // determines the cheap direction
+ path.reset();
+ path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCW_Direction);
+ path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCCW_Direction);
+ check_direction(reporter, path, SkPathPriv::kCW_FirstDirection);
+
+ path.reset();
+ path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCW_Direction);
+ path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCCW_Direction);
+ check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection);
+
+ // triangle with one point really far from the origin.
+ path.reset();
+ // the first point is roughly 1.05e10, 1.05e10
+ path.moveTo(SkBits2Float(0x501c7652), SkBits2Float(0x501c7652));
+ path.lineTo(110 * SK_Scalar1, -10 * SK_Scalar1);
+ path.lineTo(-10 * SK_Scalar1, 60 * SK_Scalar1);
+ check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection);
+
+ path.reset();
+ path.conicTo(20, 0, 20, 20, 0.5f);
+ path.close();
+ check_direction(reporter, path, SkPathPriv::kCW_FirstDirection);
+
+ path.reset();
+ path.lineTo(1, 1e7f);
+ path.lineTo(1e7f, 2e7f);
+ path.close();
+ REPORTER_ASSERT(reporter, SkPath::kConvex_Convexity == path.getConvexity());
+ check_direction(reporter, path, SkPathPriv::kCCW_FirstDirection);
+}
+
+static void add_rect(SkPath* path, const SkRect& r) {
+ path->moveTo(r.fLeft, r.fTop);
+ path->lineTo(r.fRight, r.fTop);
+ path->lineTo(r.fRight, r.fBottom);
+ path->lineTo(r.fLeft, r.fBottom);
+ path->close();
+}
+
+static void test_bounds(skiatest::Reporter* reporter) {
+ static const SkRect rects[] = {
+ { SkIntToScalar(10), SkIntToScalar(160), SkIntToScalar(610), SkIntToScalar(160) },
+ { SkIntToScalar(610), SkIntToScalar(160), SkIntToScalar(610), SkIntToScalar(199) },
+ { SkIntToScalar(10), SkIntToScalar(198), SkIntToScalar(610), SkIntToScalar(199) },
+ { SkIntToScalar(10), SkIntToScalar(160), SkIntToScalar(10), SkIntToScalar(199) },
+ };
+
+ SkPath path0, path1;
+ for (size_t i = 0; i < SK_ARRAY_COUNT(rects); ++i) {
+ path0.addRect(rects[i]);
+ add_rect(&path1, rects[i]);
+ }
+
+ REPORTER_ASSERT(reporter, path0.getBounds() == path1.getBounds());
+}
+
+static void stroke_cubic(const SkPoint pts[4]) {
+ SkPath path;
+ path.moveTo(pts[0]);
+ path.cubicTo(pts[1], pts[2], pts[3]);
+
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(SK_Scalar1 * 2);
+
+ SkPath fill;
+ paint.getFillPath(path, &fill);
+}
+
+// just ensure this can run w/o any SkASSERTS firing in the debug build
+// we used to assert due to differences in how we determine a degenerate vector
+// but that was fixed with the introduction of SkPoint::CanNormalize
+static void stroke_tiny_cubic() {
+ SkPoint p0[] = {
+ { 372.0f, 92.0f },
+ { 372.0f, 92.0f },
+ { 372.0f, 92.0f },
+ { 372.0f, 92.0f },
+ };
+
+ stroke_cubic(p0);
+
+ SkPoint p1[] = {
+ { 372.0f, 92.0f },
+ { 372.0007f, 92.000755f },
+ { 371.99927f, 92.003922f },
+ { 371.99826f, 92.003899f },
+ };
+
+ stroke_cubic(p1);
+}
+
+static void check_close(skiatest::Reporter* reporter, const SkPath& path) {
+ for (int i = 0; i < 2; ++i) {
+ SkPath::Iter iter(path, SkToBool(i));
+ SkPoint mv;
+ SkPoint pts[4];
+ SkPath::Verb v;
+ int nMT = 0;
+ int nCL = 0;
+ mv.set(0, 0);
+ while (SkPath::kDone_Verb != (v = iter.next(pts))) {
+ switch (v) {
+ case SkPath::kMove_Verb:
+ mv = pts[0];
+ ++nMT;
+ break;
+ case SkPath::kClose_Verb:
+ REPORTER_ASSERT(reporter, mv == pts[0]);
+ ++nCL;
+ break;
+ default:
+ break;
+ }
+ }
+ // if we force a close on the interator we should have a close
+ // for every moveTo
+ REPORTER_ASSERT(reporter, !i || nMT == nCL);
+ }
+}
+
+static void test_close(skiatest::Reporter* reporter) {
+ SkPath closePt;
+ closePt.moveTo(0, 0);
+ closePt.close();
+ check_close(reporter, closePt);
+
+ SkPath openPt;
+ openPt.moveTo(0, 0);
+ check_close(reporter, openPt);
+
+ SkPath empty;
+ check_close(reporter, empty);
+ empty.close();
+ check_close(reporter, empty);
+
+ SkPath rect;
+ rect.addRect(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1);
+ check_close(reporter, rect);
+ rect.close();
+ check_close(reporter, rect);
+
+ SkPath quad;
+ quad.quadTo(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1);
+ check_close(reporter, quad);
+ quad.close();
+ check_close(reporter, quad);
+
+ SkPath cubic;
+ quad.cubicTo(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1,
+ 10*SK_Scalar1, 20 * SK_Scalar1, 20*SK_Scalar1);
+ check_close(reporter, cubic);
+ cubic.close();
+ check_close(reporter, cubic);
+
+ SkPath line;
+ line.moveTo(SK_Scalar1, SK_Scalar1);
+ line.lineTo(10 * SK_Scalar1, 10*SK_Scalar1);
+ check_close(reporter, line);
+ line.close();
+ check_close(reporter, line);
+
+ SkPath rect2;
+ rect2.addRect(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1);
+ rect2.close();
+ rect2.addRect(SK_Scalar1, SK_Scalar1, 10 * SK_Scalar1, 10*SK_Scalar1);
+ check_close(reporter, rect2);
+ rect2.close();
+ check_close(reporter, rect2);
+
+ SkPath oval3;
+ oval3.addOval(SkRect::MakeWH(SK_Scalar1*100,SK_Scalar1*100));
+ oval3.close();
+ oval3.addOval(SkRect::MakeWH(SK_Scalar1*200,SK_Scalar1*200));
+ check_close(reporter, oval3);
+ oval3.close();
+ check_close(reporter, oval3);
+
+ SkPath moves;
+ moves.moveTo(SK_Scalar1, SK_Scalar1);
+ moves.moveTo(5 * SK_Scalar1, SK_Scalar1);
+ moves.moveTo(SK_Scalar1, 10 * SK_Scalar1);
+ moves.moveTo(10 *SK_Scalar1, SK_Scalar1);
+ check_close(reporter, moves);
+
+ stroke_tiny_cubic();
+}
+
+static void check_convexity(skiatest::Reporter* reporter, const SkPath& path,
+ SkPath::Convexity expected) {
+ SkPath copy(path); // we make a copy so that we don't cache the result on the passed in path.
+ SkPath::Convexity c = copy.getConvexity();
+ REPORTER_ASSERT(reporter, c == expected);
+}
+
+static void test_path_crbug389050(skiatest::Reporter* reporter) {
+ SkPath tinyConvexPolygon;
+ tinyConvexPolygon.moveTo(600.131559f, 800.112512f);
+ tinyConvexPolygon.lineTo(600.161735f, 800.118627f);
+ tinyConvexPolygon.lineTo(600.148962f, 800.142338f);
+ tinyConvexPolygon.lineTo(600.134891f, 800.137724f);
+ tinyConvexPolygon.close();
+ tinyConvexPolygon.getConvexity();
+ check_convexity(reporter, tinyConvexPolygon, SkPath::kConvex_Convexity);
+ check_direction(reporter, tinyConvexPolygon, SkPathPriv::kCW_FirstDirection);
+
+ SkPath platTriangle;
+ platTriangle.moveTo(0, 0);
+ platTriangle.lineTo(200, 0);
+ platTriangle.lineTo(100, 0.04f);
+ platTriangle.close();
+ platTriangle.getConvexity();
+ check_direction(reporter, platTriangle, SkPathPriv::kCW_FirstDirection);
+
+ platTriangle.reset();
+ platTriangle.moveTo(0, 0);
+ platTriangle.lineTo(200, 0);
+ platTriangle.lineTo(100, 0.03f);
+ platTriangle.close();
+ platTriangle.getConvexity();
+ check_direction(reporter, platTriangle, SkPathPriv::kCW_FirstDirection);
+}
+
+static void test_convexity2(skiatest::Reporter* reporter) {
+ SkPath pt;
+ pt.moveTo(0, 0);
+ pt.close();
+ check_convexity(reporter, pt, SkPath::kConvex_Convexity);
+ check_direction(reporter, pt, SkPathPriv::kUnknown_FirstDirection);
+
+ SkPath line;
+ line.moveTo(12*SK_Scalar1, 20*SK_Scalar1);
+ line.lineTo(-12*SK_Scalar1, -20*SK_Scalar1);
+ line.close();
+ check_convexity(reporter, line, SkPath::kConvex_Convexity);
+ check_direction(reporter, line, SkPathPriv::kUnknown_FirstDirection);
+
+ SkPath triLeft;
+ triLeft.moveTo(0, 0);
+ triLeft.lineTo(SK_Scalar1, 0);
+ triLeft.lineTo(SK_Scalar1, SK_Scalar1);
+ triLeft.close();
+ check_convexity(reporter, triLeft, SkPath::kConvex_Convexity);
+ check_direction(reporter, triLeft, SkPathPriv::kCW_FirstDirection);
+
+ SkPath triRight;
+ triRight.moveTo(0, 0);
+ triRight.lineTo(-SK_Scalar1, 0);
+ triRight.lineTo(SK_Scalar1, SK_Scalar1);
+ triRight.close();
+ check_convexity(reporter, triRight, SkPath::kConvex_Convexity);
+ check_direction(reporter, triRight, SkPathPriv::kCCW_FirstDirection);
+
+ SkPath square;
+ square.moveTo(0, 0);
+ square.lineTo(SK_Scalar1, 0);
+ square.lineTo(SK_Scalar1, SK_Scalar1);
+ square.lineTo(0, SK_Scalar1);
+ square.close();
+ check_convexity(reporter, square, SkPath::kConvex_Convexity);
+ check_direction(reporter, square, SkPathPriv::kCW_FirstDirection);
+
+ SkPath redundantSquare;
+ redundantSquare.moveTo(0, 0);
+ redundantSquare.lineTo(0, 0);
+ redundantSquare.lineTo(0, 0);
+ redundantSquare.lineTo(SK_Scalar1, 0);
+ redundantSquare.lineTo(SK_Scalar1, 0);
+ redundantSquare.lineTo(SK_Scalar1, 0);
+ redundantSquare.lineTo(SK_Scalar1, SK_Scalar1);
+ redundantSquare.lineTo(SK_Scalar1, SK_Scalar1);
+ redundantSquare.lineTo(SK_Scalar1, SK_Scalar1);
+ redundantSquare.lineTo(0, SK_Scalar1);
+ redundantSquare.lineTo(0, SK_Scalar1);
+ redundantSquare.lineTo(0, SK_Scalar1);
+ redundantSquare.close();
+ check_convexity(reporter, redundantSquare, SkPath::kConvex_Convexity);
+ check_direction(reporter, redundantSquare, SkPathPriv::kCW_FirstDirection);
+
+ SkPath bowTie;
+ bowTie.moveTo(0, 0);
+ bowTie.lineTo(0, 0);
+ bowTie.lineTo(0, 0);
+ bowTie.lineTo(SK_Scalar1, SK_Scalar1);
+ bowTie.lineTo(SK_Scalar1, SK_Scalar1);
+ bowTie.lineTo(SK_Scalar1, SK_Scalar1);
+ bowTie.lineTo(SK_Scalar1, 0);
+ bowTie.lineTo(SK_Scalar1, 0);
+ bowTie.lineTo(SK_Scalar1, 0);
+ bowTie.lineTo(0, SK_Scalar1);
+ bowTie.lineTo(0, SK_Scalar1);
+ bowTie.lineTo(0, SK_Scalar1);
+ bowTie.close();
+ check_convexity(reporter, bowTie, SkPath::kConcave_Convexity);
+ check_direction(reporter, bowTie, kDontCheckDir);
+
+ SkPath spiral;
+ spiral.moveTo(0, 0);
+ spiral.lineTo(100*SK_Scalar1, 0);
+ spiral.lineTo(100*SK_Scalar1, 100*SK_Scalar1);
+ spiral.lineTo(0, 100*SK_Scalar1);
+ spiral.lineTo(0, 50*SK_Scalar1);
+ spiral.lineTo(50*SK_Scalar1, 50*SK_Scalar1);
+ spiral.lineTo(50*SK_Scalar1, 75*SK_Scalar1);
+ spiral.close();
+ check_convexity(reporter, spiral, SkPath::kConcave_Convexity);
+ check_direction(reporter, spiral, kDontCheckDir);
+
+ SkPath dent;
+ dent.moveTo(0, 0);
+ dent.lineTo(100*SK_Scalar1, 100*SK_Scalar1);
+ dent.lineTo(0, 100*SK_Scalar1);
+ dent.lineTo(-50*SK_Scalar1, 200*SK_Scalar1);
+ dent.lineTo(-200*SK_Scalar1, 100*SK_Scalar1);
+ dent.close();
+ check_convexity(reporter, dent, SkPath::kConcave_Convexity);
+ check_direction(reporter, dent, SkPathPriv::kCW_FirstDirection);
+
+ // https://bug.skia.org/2235
+ SkPath strokedSin;
+ for (int i = 0; i < 2000; i++) {
+ SkScalar x = SkIntToScalar(i) / 2;
+ SkScalar y = 500 - (x + SkScalarSin(x / 100) * 40) / 3;
+ if (0 == i) {
+ strokedSin.moveTo(x, y);
+ } else {
+ strokedSin.lineTo(x, y);
+ }
+ }
+ SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
+ stroke.setStrokeStyle(2 * SK_Scalar1);
+ stroke.applyToPath(&strokedSin, strokedSin);
+ check_convexity(reporter, strokedSin, SkPath::kConcave_Convexity);
+ check_direction(reporter, strokedSin, kDontCheckDir);
+
+ // http://crbug.com/412640
+ SkPath degenerateConcave;
+ degenerateConcave.moveTo(148.67912f, 191.875f);
+ degenerateConcave.lineTo(470.37695f, 7.5f);
+ degenerateConcave.lineTo(148.67912f, 191.875f);
+ degenerateConcave.lineTo(41.446522f, 376.25f);
+ degenerateConcave.lineTo(-55.971577f, 460.0f);
+ degenerateConcave.lineTo(41.446522f, 376.25f);
+ check_convexity(reporter, degenerateConcave, SkPath::kConcave_Convexity);
+ check_direction(reporter, degenerateConcave, SkPathPriv::kUnknown_FirstDirection);
+
+ // http://crbug.com/433683
+ SkPath badFirstVector;
+ badFirstVector.moveTo(501.087708f, 319.610352f);
+ badFirstVector.lineTo(501.087708f, 319.610352f);
+ badFirstVector.cubicTo(501.087677f, 319.610321f, 449.271606f, 258.078674f, 395.084564f, 198.711182f);
+ badFirstVector.cubicTo(358.967072f, 159.140717f, 321.910553f, 120.650436f, 298.442322f, 101.955399f);
+ badFirstVector.lineTo(301.557678f, 98.044601f);
+ badFirstVector.cubicTo(325.283844f, 116.945084f, 362.615204f, 155.720825f, 398.777557f, 195.340454f);
+ badFirstVector.cubicTo(453.031860f, 254.781662f, 504.912262f, 316.389618f, 504.912292f, 316.389648f);
+ badFirstVector.lineTo(504.912292f, 316.389648f);
+ badFirstVector.lineTo(501.087708f, 319.610352f);
+ badFirstVector.close();
+ check_convexity(reporter, badFirstVector, SkPath::kConcave_Convexity);
+}
+
+static void check_convex_bounds(skiatest::Reporter* reporter, const SkPath& p,
+ const SkRect& bounds) {
+ REPORTER_ASSERT(reporter, p.isConvex());
+ REPORTER_ASSERT(reporter, p.getBounds() == bounds);
+
+ SkPath p2(p);
+ REPORTER_ASSERT(reporter, p2.isConvex());
+ REPORTER_ASSERT(reporter, p2.getBounds() == bounds);
+
+ SkPath other;
+ other.swap(p2);
+ REPORTER_ASSERT(reporter, other.isConvex());
+ REPORTER_ASSERT(reporter, other.getBounds() == bounds);
+}
+
+static void setFromString(SkPath* path, const char str[]) {
+ bool first = true;
+ while (str) {
+ SkScalar x, y;
+ str = SkParse::FindScalar(str, &x);
+ if (nullptr == str) {
+ break;
+ }
+ str = SkParse::FindScalar(str, &y);
+ SkASSERT(str);
+ if (first) {
+ path->moveTo(x, y);
+ first = false;
+ } else {
+ path->lineTo(x, y);
+ }
+ }
+}
+
+static void test_convexity(skiatest::Reporter* reporter) {
+ SkPath path;
+
+ check_convexity(reporter, path, SkPath::kConvex_Convexity);
+ path.addCircle(0, 0, SkIntToScalar(10));
+ check_convexity(reporter, path, SkPath::kConvex_Convexity);
+ path.addCircle(0, 0, SkIntToScalar(10)); // 2nd circle
+ check_convexity(reporter, path, SkPath::kConcave_Convexity);
+
+ path.reset();
+ path.addRect(0, 0, SkIntToScalar(10), SkIntToScalar(10), SkPath::kCCW_Direction);
+ check_convexity(reporter, path, SkPath::kConvex_Convexity);
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCCW_FirstDirection));
+
+ path.reset();
+ path.addRect(0, 0, SkIntToScalar(10), SkIntToScalar(10), SkPath::kCW_Direction);
+ check_convexity(reporter, path, SkPath::kConvex_Convexity);
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, SkPathPriv::kCW_FirstDirection));
+
+ path.reset();
+ path.quadTo(100, 100, 50, 50); // This is a convex path from GM:convexpaths
+ check_convexity(reporter, path, SkPath::kConvex_Convexity);
+
+ static const struct {
+ const char* fPathStr;
+ SkPath::Convexity fExpectedConvexity;
+ SkPathPriv::FirstDirection fExpectedDirection;
+ } gRec[] = {
+ { "", SkPath::kConvex_Convexity, SkPathPriv::kUnknown_FirstDirection },
+ { "0 0", SkPath::kConvex_Convexity, SkPathPriv::kUnknown_FirstDirection },
+ { "0 0 10 10", SkPath::kConvex_Convexity, SkPathPriv::kUnknown_FirstDirection },
+ { "0 0 10 10 20 20 0 0 10 10", SkPath::kConcave_Convexity, SkPathPriv::kUnknown_FirstDirection },
+ { "0 0 10 10 10 20", SkPath::kConvex_Convexity, SkPathPriv::kCW_FirstDirection },
+ { "0 0 10 10 10 0", SkPath::kConvex_Convexity, SkPathPriv::kCCW_FirstDirection },
+ { "0 0 10 10 10 0 0 10", SkPath::kConcave_Convexity, kDontCheckDir },
+ { "0 0 10 0 0 10 -10 -10", SkPath::kConcave_Convexity, SkPathPriv::kCW_FirstDirection },
+ };
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) {
+ SkPath path;
+ setFromString(&path, gRec[i].fPathStr);
+ check_convexity(reporter, path, gRec[i].fExpectedConvexity);
+ check_direction(reporter, path, gRec[i].fExpectedDirection);
+ // check after setting the initial convex and direction
+ if (kDontCheckDir != gRec[i].fExpectedDirection) {
+ SkPath copy(path);
+ SkPathPriv::FirstDirection dir;
+ bool foundDir = SkPathPriv::CheapComputeFirstDirection(copy, &dir);
+ REPORTER_ASSERT(reporter, (gRec[i].fExpectedDirection == SkPathPriv::kUnknown_FirstDirection)
+ ^ foundDir);
+ REPORTER_ASSERT(reporter, !foundDir || gRec[i].fExpectedDirection == dir);
+ check_convexity(reporter, copy, gRec[i].fExpectedConvexity);
+ }
+ REPORTER_ASSERT(reporter, gRec[i].fExpectedConvexity == path.getConvexity());
+ check_direction(reporter, path, gRec[i].fExpectedDirection);
+ }
+
+ static const SkPoint nonFinitePts[] = {
+ { SK_ScalarInfinity, 0 },
+ { 0, SK_ScalarInfinity },
+ { SK_ScalarInfinity, SK_ScalarInfinity },
+ { SK_ScalarNegativeInfinity, 0},
+ { 0, SK_ScalarNegativeInfinity },
+ { SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity },
+ { SK_ScalarNegativeInfinity, SK_ScalarInfinity },
+ { SK_ScalarInfinity, SK_ScalarNegativeInfinity },
+ { SK_ScalarNaN, 0 },
+ { 0, SK_ScalarNaN },
+ { SK_ScalarNaN, SK_ScalarNaN },
+ };
+
+ const size_t nonFinitePtsCount = sizeof(nonFinitePts) / sizeof(nonFinitePts[0]);
+
+ static const SkPoint finitePts[] = {
+ { SK_ScalarMax, 0 },
+ { 0, SK_ScalarMax },
+ { SK_ScalarMax, SK_ScalarMax },
+ { SK_ScalarMin, 0 },
+ { 0, SK_ScalarMin },
+ { SK_ScalarMin, SK_ScalarMin },
+ };
+
+ const size_t finitePtsCount = sizeof(finitePts) / sizeof(finitePts[0]);
+
+ for (int index = 0; index < (int) (13 * nonFinitePtsCount * finitePtsCount); ++index) {
+ int i = (int) (index % nonFinitePtsCount);
+ int f = (int) (index % finitePtsCount);
+ int g = (int) ((f + 1) % finitePtsCount);
+ path.reset();
+ switch (index % 13) {
+ case 0: path.lineTo(nonFinitePts[i]); break;
+ case 1: path.quadTo(nonFinitePts[i], nonFinitePts[i]); break;
+ case 2: path.quadTo(nonFinitePts[i], finitePts[f]); break;
+ case 3: path.quadTo(finitePts[f], nonFinitePts[i]); break;
+ case 4: path.cubicTo(nonFinitePts[i], finitePts[f], finitePts[f]); break;
+ case 5: path.cubicTo(finitePts[f], nonFinitePts[i], finitePts[f]); break;
+ case 6: path.cubicTo(finitePts[f], finitePts[f], nonFinitePts[i]); break;
+ case 7: path.cubicTo(nonFinitePts[i], nonFinitePts[i], finitePts[f]); break;
+ case 8: path.cubicTo(nonFinitePts[i], finitePts[f], nonFinitePts[i]); break;
+ case 9: path.cubicTo(finitePts[f], nonFinitePts[i], nonFinitePts[i]); break;
+ case 10: path.cubicTo(nonFinitePts[i], nonFinitePts[i], nonFinitePts[i]); break;
+ case 11: path.cubicTo(nonFinitePts[i], finitePts[f], finitePts[g]); break;
+ case 12: path.moveTo(nonFinitePts[i]); break;
+ }
+ check_convexity(reporter, path, SkPath::kUnknown_Convexity);
+ }
+
+ for (int index = 0; index < (int) (11 * finitePtsCount); ++index) {
+ int f = (int) (index % finitePtsCount);
+ int g = (int) ((f + 1) % finitePtsCount);
+ path.reset();
+ int curveSelect = index % 11;
+ switch (curveSelect) {
+ case 0: path.moveTo(finitePts[f]); break;
+ case 1: path.lineTo(finitePts[f]); break;
+ case 2: path.quadTo(finitePts[f], finitePts[f]); break;
+ case 3: path.quadTo(finitePts[f], finitePts[g]); break;
+ case 4: path.quadTo(finitePts[g], finitePts[f]); break;
+ case 5: path.cubicTo(finitePts[f], finitePts[f], finitePts[f]); break;
+ case 6: path.cubicTo(finitePts[f], finitePts[f], finitePts[g]); break;
+ case 7: path.cubicTo(finitePts[f], finitePts[g], finitePts[f]); break;
+ case 8: path.cubicTo(finitePts[f], finitePts[g], finitePts[g]); break;
+ case 9: path.cubicTo(finitePts[g], finitePts[f], finitePts[f]); break;
+ case 10: path.cubicTo(finitePts[g], finitePts[f], finitePts[g]); break;
+ }
+ check_convexity(reporter, path, curveSelect == 0 ? SkPath::kConvex_Convexity
+ : SkPath::kUnknown_Convexity);
+ }
+
+ path.reset();
path.moveTo(SkBits2Float(0xbe9171db), SkBits2Float(0xbd7eeb5d)); // -0.284072f, -0.0622362f
path.lineTo(SkBits2Float(0xbe9171db), SkBits2Float(0xbd7eea38)); // -0.284072f, -0.0622351f
path.lineTo(SkBits2Float(0xbe9171a0), SkBits2Float(0xbd7ee5a7)); // -0.28407f, -0.0622307f
path.lineTo(SkBits2Float(0xbe917147), SkBits2Float(0xbd7ed886)); // -0.284067f, -0.0622182f
path.lineTo(SkBits2Float(0xbe917378), SkBits2Float(0xbd7ee1a9)); // -0.284084f, -0.0622269f
path.lineTo(SkBits2Float(0xbe9171db), SkBits2Float(0xbd7eeb5d)); // -0.284072f, -0.0622362f
- path.close(); - check_convexity(reporter, path, SkPath::kConcave_Convexity); - -} - -static void test_isLine(skiatest::Reporter* reporter) { - SkPath path; - SkPoint pts[2]; - const SkScalar value = SkIntToScalar(5); - - REPORTER_ASSERT(reporter, !path.isLine(nullptr)); - - // set some non-zero values - pts[0].set(value, value); - pts[1].set(value, value); - REPORTER_ASSERT(reporter, !path.isLine(pts)); - // check that pts was untouched - REPORTER_ASSERT(reporter, pts[0].equals(value, value)); - REPORTER_ASSERT(reporter, pts[1].equals(value, value)); - - const SkScalar moveX = SkIntToScalar(1); - const SkScalar moveY = SkIntToScalar(2); - REPORTER_ASSERT(reporter, value != moveX && value != moveY); - - path.moveTo(moveX, moveY); - REPORTER_ASSERT(reporter, !path.isLine(nullptr)); - REPORTER_ASSERT(reporter, !path.isLine(pts)); - // check that pts was untouched - REPORTER_ASSERT(reporter, pts[0].equals(value, value)); - REPORTER_ASSERT(reporter, pts[1].equals(value, value)); - - const SkScalar lineX = SkIntToScalar(2); - const SkScalar lineY = SkIntToScalar(2); - REPORTER_ASSERT(reporter, value != lineX && value != lineY); - - path.lineTo(lineX, lineY); - REPORTER_ASSERT(reporter, path.isLine(nullptr)); - - REPORTER_ASSERT(reporter, !pts[0].equals(moveX, moveY)); - REPORTER_ASSERT(reporter, !pts[1].equals(lineX, lineY)); - REPORTER_ASSERT(reporter, path.isLine(pts)); - REPORTER_ASSERT(reporter, pts[0].equals(moveX, moveY)); - REPORTER_ASSERT(reporter, pts[1].equals(lineX, lineY)); - - path.lineTo(0, 0); // too many points/verbs - REPORTER_ASSERT(reporter, !path.isLine(nullptr)); - REPORTER_ASSERT(reporter, !path.isLine(pts)); - REPORTER_ASSERT(reporter, pts[0].equals(moveX, moveY)); - REPORTER_ASSERT(reporter, pts[1].equals(lineX, lineY)); - - path.reset(); - path.quadTo(1, 1, 2, 2); - REPORTER_ASSERT(reporter, !path.isLine(nullptr)); -} - -static void test_conservativelyContains(skiatest::Reporter* reporter) { - SkPath path; - - // kBaseRect is used to construct most our test paths: a rect, a circle, and a round-rect. - static const SkRect kBaseRect = SkRect::MakeWH(SkIntToScalar(100), SkIntToScalar(100)); - - // A circle that bounds kBaseRect (with a significant amount of slop) - SkScalar circleR = SkMaxScalar(kBaseRect.width(), kBaseRect.height()); - circleR *= 1.75f / 2; - static const SkPoint kCircleC = {kBaseRect.centerX(), kBaseRect.centerY()}; - - // round-rect radii - static const SkScalar kRRRadii[] = {SkIntToScalar(5), SkIntToScalar(3)}; - - static const struct SUPPRESS_VISIBILITY_WARNING { - SkRect fQueryRect; - bool fInRect; - bool fInCircle; - bool fInRR; - bool fInCubicRR; - } kQueries[] = { - {kBaseRect, true, true, false, false}, - - // rect well inside of kBaseRect - {SkRect::MakeLTRB(kBaseRect.fLeft + 0.25f*kBaseRect.width(), - kBaseRect.fTop + 0.25f*kBaseRect.height(), - kBaseRect.fRight - 0.25f*kBaseRect.width(), - kBaseRect.fBottom - 0.25f*kBaseRect.height()), - true, true, true, true}, - - // rects with edges off by one from kBaseRect's edges - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop, - kBaseRect.width(), kBaseRect.height() + 1), - false, true, false, false}, - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop, - kBaseRect.width() + 1, kBaseRect.height()), - false, true, false, false}, - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop, - kBaseRect.width() + 1, kBaseRect.height() + 1), - false, true, false, false}, - {SkRect::MakeXYWH(kBaseRect.fLeft - 1, kBaseRect.fTop, - kBaseRect.width(), kBaseRect.height()), - false, true, false, false}, - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop - 1, - kBaseRect.width(), kBaseRect.height()), - false, true, false, false}, - {SkRect::MakeXYWH(kBaseRect.fLeft - 1, kBaseRect.fTop, - kBaseRect.width() + 2, kBaseRect.height()), - false, true, false, false}, - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop - 1, - kBaseRect.width() + 2, kBaseRect.height()), - false, true, false, false}, - - // zero-w/h rects at each corner of kBaseRect - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop, 0, 0), true, true, false, false}, - {SkRect::MakeXYWH(kBaseRect.fRight, kBaseRect.fTop, 0, 0), true, true, false, true}, - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fBottom, 0, 0), true, true, false, true}, - {SkRect::MakeXYWH(kBaseRect.fRight, kBaseRect.fBottom, 0, 0), true, true, false, true}, - - // far away rect - {SkRect::MakeXYWH(10 * kBaseRect.fRight, 10 * kBaseRect.fBottom, - SkIntToScalar(10), SkIntToScalar(10)), - false, false, false, false}, - - // very large rect containing kBaseRect - {SkRect::MakeXYWH(kBaseRect.fLeft - 5 * kBaseRect.width(), - kBaseRect.fTop - 5 * kBaseRect.height(), - 11 * kBaseRect.width(), 11 * kBaseRect.height()), - false, false, false, false}, - - // skinny rect that spans same y-range as kBaseRect - {SkRect::MakeXYWH(kBaseRect.centerX(), kBaseRect.fTop, - SkIntToScalar(1), kBaseRect.height()), - true, true, true, true}, - - // short rect that spans same x-range as kBaseRect - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.centerY(), kBaseRect.width(), SkScalar(1)), - true, true, true, true}, - - // skinny rect that spans slightly larger y-range than kBaseRect - {SkRect::MakeXYWH(kBaseRect.centerX(), kBaseRect.fTop, - SkIntToScalar(1), kBaseRect.height() + 1), - false, true, false, false}, - - // short rect that spans slightly larger x-range than kBaseRect - {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.centerY(), - kBaseRect.width() + 1, SkScalar(1)), - false, true, false, false}, - }; - - for (int inv = 0; inv < 4; ++inv) { - for (size_t q = 0; q < SK_ARRAY_COUNT(kQueries); ++q) { - SkRect qRect = kQueries[q].fQueryRect; - if (inv & 0x1) { - SkTSwap(qRect.fLeft, qRect.fRight); - } - if (inv & 0x2) { - SkTSwap(qRect.fTop, qRect.fBottom); - } - for (int d = 0; d < 2; ++d) { - SkPath::Direction dir = d ? SkPath::kCCW_Direction : SkPath::kCW_Direction; - path.reset(); - path.addRect(kBaseRect, dir); - REPORTER_ASSERT(reporter, kQueries[q].fInRect == - path.conservativelyContainsRect(qRect)); - - path.reset(); - path.addCircle(kCircleC.fX, kCircleC.fY, circleR, dir); - REPORTER_ASSERT(reporter, kQueries[q].fInCircle == - path.conservativelyContainsRect(qRect)); - - path.reset(); - path.addRoundRect(kBaseRect, kRRRadii[0], kRRRadii[1], dir); - REPORTER_ASSERT(reporter, kQueries[q].fInRR == - path.conservativelyContainsRect(qRect)); - - path.reset(); - path.moveTo(kBaseRect.fLeft + kRRRadii[0], kBaseRect.fTop); - path.cubicTo(kBaseRect.fLeft + kRRRadii[0] / 2, kBaseRect.fTop, - kBaseRect.fLeft, kBaseRect.fTop + kRRRadii[1] / 2, - kBaseRect.fLeft, kBaseRect.fTop + kRRRadii[1]); - path.lineTo(kBaseRect.fLeft, kBaseRect.fBottom); - path.lineTo(kBaseRect.fRight, kBaseRect.fBottom); - path.lineTo(kBaseRect.fRight, kBaseRect.fTop); - path.close(); - REPORTER_ASSERT(reporter, kQueries[q].fInCubicRR == - path.conservativelyContainsRect(qRect)); - - } - // Slightly non-convex shape, shouldn't contain any rects. - path.reset(); - path.moveTo(0, 0); - path.lineTo(SkIntToScalar(50), 0.05f); - path.lineTo(SkIntToScalar(100), 0); - path.lineTo(SkIntToScalar(100), SkIntToScalar(100)); - path.lineTo(0, SkIntToScalar(100)); - path.close(); - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(qRect)); - } - } - - // make sure a minimal convex shape works, a right tri with edges along pos x and y axes. - path.reset(); - path.moveTo(0, 0); - path.lineTo(SkIntToScalar(100), 0); - path.lineTo(0, SkIntToScalar(100)); - - // inside, on along top edge - REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0, - SkIntToScalar(10), - SkIntToScalar(10)))); - // above - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect( - SkRect::MakeXYWH(SkIntToScalar(50), - SkIntToScalar(-10), - SkIntToScalar(10), - SkIntToScalar(10)))); - // to the left - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(-10), - SkIntToScalar(5), - SkIntToScalar(5), - SkIntToScalar(5)))); - - // outside the diagonal edge - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(10), - SkIntToScalar(200), - SkIntToScalar(20), - SkIntToScalar(5)))); - - - // Test that multiple move commands do not cause asserts. - - // At the time of writing, this would not modify cached convexity. This caused an assert while - // checking conservative containment again. https://bug.skia.org/1460 - path.moveTo(SkIntToScalar(100), SkIntToScalar(100)); -#if 0 - REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0, - SkIntToScalar(10), - SkIntToScalar(10)))); -#endif - - // Same as above path and first test but with an extra moveTo. - path.reset(); - path.moveTo(100, 100); - path.moveTo(0, 0); - path.lineTo(SkIntToScalar(100), 0); - path.lineTo(0, SkIntToScalar(100)); - - REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0, - SkIntToScalar(10), - SkIntToScalar(10)))); - - // Same as above path and first test but with the extra moveTo making a degenerate sub-path - // following the non-empty sub-path. Verifies that this does not trigger assertions. - path.reset(); - path.moveTo(0, 0); - path.lineTo(SkIntToScalar(100), 0); - path.lineTo(0, SkIntToScalar(100)); - path.moveTo(100, 100); - - REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0, - SkIntToScalar(10), - SkIntToScalar(10)))); - - // Test that multiple move commands do not cause asserts and that the function - // is not confused by the multiple moves. - path.reset(); - path.moveTo(0, 0); - path.lineTo(SkIntToScalar(100), 0); - path.lineTo(0, SkIntToScalar(100)); - path.moveTo(0, SkIntToScalar(200)); - path.lineTo(SkIntToScalar(100), SkIntToScalar(200)); - path.lineTo(0, SkIntToScalar(300)); - - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect( - SkRect::MakeXYWH(SkIntToScalar(50), 0, - SkIntToScalar(10), - SkIntToScalar(10)))); - - path.reset(); - path.lineTo(100, 100); - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(0, 0, 1, 1))); - - // An empty path should not contain any rectangle. It's questionable whether an empty path - // contains an empty rectangle. However, since it is a conservative test it is ok to - // return false. - path.reset(); - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeWH(1,1))); - REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeWH(0,0))); -} - -static void test_isRect_open_close(skiatest::Reporter* reporter) { - SkPath path; - bool isClosed; - - path.moveTo(0, 0); path.lineTo(1, 0); path.lineTo(1, 1); path.lineTo(0, 1); - path.close(); - - REPORTER_ASSERT(reporter, path.isRect(nullptr, &isClosed, nullptr)); - REPORTER_ASSERT(reporter, isClosed); -} - -// Simple isRect test is inline TestPath, below. -// test_isRect provides more extensive testing. -static void test_isRect(skiatest::Reporter* reporter) { - test_isRect_open_close(reporter); - - // passing tests (all moveTo / lineTo... - SkPoint r1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}; - SkPoint r2[] = {{1, 0}, {1, 1}, {0, 1}, {0, 0}}; - SkPoint r3[] = {{1, 1}, {0, 1}, {0, 0}, {1, 0}}; - SkPoint r4[] = {{0, 1}, {0, 0}, {1, 0}, {1, 1}}; - SkPoint r5[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}}; - SkPoint r6[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}}; - SkPoint r7[] = {{1, 1}, {1, 0}, {0, 0}, {0, 1}}; - SkPoint r8[] = {{1, 0}, {0, 0}, {0, 1}, {1, 1}}; - SkPoint r9[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}}; - SkPoint ra[] = {{0, 0}, {0, .5f}, {0, 1}, {.5f, 1}, {1, 1}, {1, .5f}, {1, 0}, {.5f, 0}}; - SkPoint rb[] = {{0, 0}, {.5f, 0}, {1, 0}, {1, .5f}, {1, 1}, {.5f, 1}, {0, 1}, {0, .5f}}; - SkPoint rc[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}}; - SkPoint rd[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}}; - SkPoint re[] = {{0, 0}, {1, 0}, {1, 0}, {1, 1}, {0, 1}}; - SkPoint rf[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, 0}}; - - // failing tests - SkPoint f1[] = {{0, 0}, {1, 0}, {1, 1}}; // too few points - SkPoint f2[] = {{0, 0}, {1, 1}, {0, 1}, {1, 0}}; // diagonal - SkPoint f3[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}, {1, 0}}; // wraps - SkPoint f4[] = {{0, 0}, {1, 0}, {0, 0}, {1, 0}, {1, 1}, {0, 1}}; // backs up - SkPoint f5[] = {{0, 0}, {1, 0}, {1, 1}, {2, 0}}; // end overshoots - SkPoint f6[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 2}}; // end overshoots - SkPoint f7[] = {{0, 0}, {1, 0}, {1, 1}, {0, 2}}; // end overshoots - SkPoint f8[] = {{0, 0}, {1, 0}, {1, 1}, {1, 0}}; // 'L' - SkPoint f9[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, 0}, {2, 0}}; // overlaps - SkPoint fa[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, -1}, {1, -1}}; // non colinear gap - SkPoint fb[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, 1}}; // falls short - - // no close, but we should detect them as fillably the same as a rect - SkPoint c1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}; - SkPoint c2[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}}; - SkPoint c3[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}, {0, 0}}; // hit the start - - // like c2, but we double-back on ourselves - SkPoint d1[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}, {0, 2}}; - // like c2, but we overshoot the start point - SkPoint d2[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, -1}}; - SkPoint d3[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, -1}, {0, 0}}; - - struct IsRectTest { - SkPoint *fPoints; - int fPointCount; - bool fClose; - bool fIsRect; - } tests[] = { - { r1, SK_ARRAY_COUNT(r1), true, true }, - { r2, SK_ARRAY_COUNT(r2), true, true }, - { r3, SK_ARRAY_COUNT(r3), true, true }, - { r4, SK_ARRAY_COUNT(r4), true, true }, - { r5, SK_ARRAY_COUNT(r5), true, true }, - { r6, SK_ARRAY_COUNT(r6), true, true }, - { r7, SK_ARRAY_COUNT(r7), true, true }, - { r8, SK_ARRAY_COUNT(r8), true, true }, - { r9, SK_ARRAY_COUNT(r9), true, true }, - { ra, SK_ARRAY_COUNT(ra), true, true }, - { rb, SK_ARRAY_COUNT(rb), true, true }, - { rc, SK_ARRAY_COUNT(rc), true, true }, - { rd, SK_ARRAY_COUNT(rd), true, true }, - { re, SK_ARRAY_COUNT(re), true, true }, - { rf, SK_ARRAY_COUNT(rf), true, true }, - - { f1, SK_ARRAY_COUNT(f1), true, false }, - { f2, SK_ARRAY_COUNT(f2), true, false }, - { f3, SK_ARRAY_COUNT(f3), true, false }, - { f4, SK_ARRAY_COUNT(f4), true, false }, - { f5, SK_ARRAY_COUNT(f5), true, false }, - { f6, SK_ARRAY_COUNT(f6), true, false }, - { f7, SK_ARRAY_COUNT(f7), true, false }, - { f8, SK_ARRAY_COUNT(f8), true, false }, - { f9, SK_ARRAY_COUNT(f9), true, false }, - { fa, SK_ARRAY_COUNT(fa), true, false }, - { fb, SK_ARRAY_COUNT(fb), true, false }, - - { c1, SK_ARRAY_COUNT(c1), false, true }, - { c2, SK_ARRAY_COUNT(c2), false, true }, - { c3, SK_ARRAY_COUNT(c3), false, true }, - - { d1, SK_ARRAY_COUNT(d1), false, false }, - { d2, SK_ARRAY_COUNT(d2), false, false }, - { d3, SK_ARRAY_COUNT(d3), false, false }, - }; - - const size_t testCount = SK_ARRAY_COUNT(tests); - int index; - for (size_t testIndex = 0; testIndex < testCount; ++testIndex) { - SkPath path; - path.moveTo(tests[testIndex].fPoints[0].fX, tests[testIndex].fPoints[0].fY); - for (index = 1; index < tests[testIndex].fPointCount; ++index) { - path.lineTo(tests[testIndex].fPoints[index].fX, tests[testIndex].fPoints[index].fY); - } - if (tests[testIndex].fClose) { - path.close(); - } - REPORTER_ASSERT(reporter, tests[testIndex].fIsRect == path.isRect(nullptr)); - - if (tests[testIndex].fIsRect) { - SkRect computed, expected; - bool isClosed; - SkPath::Direction direction; - SkPathPriv::FirstDirection cheapDirection; - expected.set(tests[testIndex].fPoints, tests[testIndex].fPointCount); - REPORTER_ASSERT(reporter, SkPathPriv::CheapComputeFirstDirection(path, &cheapDirection)); - REPORTER_ASSERT(reporter, path.isRect(&computed, &isClosed, &direction)); - REPORTER_ASSERT(reporter, expected == computed); - REPORTER_ASSERT(reporter, isClosed == tests[testIndex].fClose); - REPORTER_ASSERT(reporter, SkPathPriv::AsFirstDirection(direction) == cheapDirection); - } else { - SkRect computed; - computed.set(123, 456, 789, 1011); - bool isClosed = (bool)-1; - SkPath::Direction direction = (SkPath::Direction) - 1; - REPORTER_ASSERT(reporter, !path.isRect(&computed, &isClosed, &direction)); - REPORTER_ASSERT(reporter, computed.fLeft == 123 && computed.fTop == 456); - REPORTER_ASSERT(reporter, computed.fRight == 789 && computed.fBottom == 1011); - REPORTER_ASSERT(reporter, isClosed == (bool) -1); - REPORTER_ASSERT(reporter, direction == (SkPath::Direction) -1); - } - } - - // fail, close then line - SkPath path1; - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - path1.lineTo(1, 0); - REPORTER_ASSERT(reporter, !path1.isRect(nullptr)); - - // fail, move in the middle - path1.reset(); - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - if (index == 2) { - path1.moveTo(1, .5f); - } - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - REPORTER_ASSERT(reporter, !path1.isRect(nullptr)); - - // fail, move on the edge - path1.reset(); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - path1.moveTo(r1[index - 1].fX, r1[index - 1].fY); - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - REPORTER_ASSERT(reporter, !path1.isRect(nullptr)); - - // fail, quad - path1.reset(); - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - if (index == 2) { - path1.quadTo(1, .5f, 1, .5f); - } - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - REPORTER_ASSERT(reporter, !path1.isRect(nullptr)); - - // fail, cubic - path1.reset(); - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - if (index == 2) { - path1.cubicTo(1, .5f, 1, .5f, 1, .5f); - } - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - REPORTER_ASSERT(reporter, !path1.isRect(nullptr)); -} - -static void check_simple_closed_rect(skiatest::Reporter* reporter, const SkPath& path, - const SkRect& rect, SkPath::Direction dir, unsigned start) { - SkRect r = SkRect::MakeEmpty(); - SkPath::Direction d = SkPath::kCCW_Direction; - unsigned s = ~0U; - - REPORTER_ASSERT(reporter, SkPathPriv::IsSimpleClosedRect(path, &r, &d, &s)); - REPORTER_ASSERT(reporter, r == rect); - REPORTER_ASSERT(reporter, d == dir); - REPORTER_ASSERT(reporter, s == start); -} - -static void test_is_simple_closed_rect(skiatest::Reporter* reporter) { - SkRect r = SkRect::MakeEmpty(); - SkPath::Direction d = SkPath::kCCW_Direction; - unsigned s = ~0U; - - const SkRect testRect = SkRect::MakeXYWH(10, 10, 50, 70); - const SkRect emptyRect = SkRect::MakeEmpty(); - SkPath path; - for (int start = 0; start < 4; ++start) { - for (auto dir : {SkPath::kCCW_Direction, SkPath::kCW_Direction}) { - SkPath path; - path.addRect(testRect, dir, start); - check_simple_closed_rect(reporter, path, testRect, dir, start); - path.close(); - check_simple_closed_rect(reporter, path, testRect, dir, start); - SkPath path2 = path; - path2.lineTo(10, 10); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s)); - path2 = path; - path2.moveTo(10, 10); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s)); - path2 = path; - path2.addRect(testRect, dir, start); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s)); - // Make the path by hand, manually closing it. - path2.reset(); - SkPath::RawIter iter(path); - SkPath::Verb v; - SkPoint verbPts[4]; - SkPoint firstPt = {0.f, 0.f}; - while ((v = iter.next(verbPts)) != SkPath::kDone_Verb) { - switch(v) { - case SkPath::kMove_Verb: - firstPt = verbPts[0]; - path2.moveTo(verbPts[0]); - break; - case SkPath::kLine_Verb: - path2.lineTo(verbPts[1]); - break; - default: - break; - } - } - // We haven't closed it yet... - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s)); - // ... now we do and test again. - path2.lineTo(firstPt); - check_simple_closed_rect(reporter, path2, testRect, dir, start); - // A redundant close shouldn't cause a failure. - path2.close(); - check_simple_closed_rect(reporter, path2, testRect, dir, start); - // Degenerate point and line rects are not allowed - path2.reset(); - path2.addRect(emptyRect, dir, start); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s)); - SkRect degenRect = testRect; - degenRect.fLeft = degenRect.fRight; - path2.reset(); - path2.addRect(degenRect, dir, start); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s)); - degenRect = testRect; - degenRect.fTop = degenRect.fBottom; - path2.reset(); - path2.addRect(degenRect, dir, start); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s)); - // An inverted rect makes a rect path, but changes the winding dir and start point. - SkPath::Direction swapDir = (dir == SkPath::kCW_Direction) - ? SkPath::kCCW_Direction - : SkPath::kCW_Direction; - static constexpr unsigned kXSwapStarts[] = { 1, 0, 3, 2 }; - static constexpr unsigned kYSwapStarts[] = { 3, 2, 1, 0 }; - SkRect swapRect = testRect; - SkTSwap(swapRect.fLeft, swapRect.fRight); - path2.reset(); - path2.addRect(swapRect, dir, start); - check_simple_closed_rect(reporter, path2, testRect, swapDir, kXSwapStarts[start]); - swapRect = testRect; - SkTSwap(swapRect.fTop, swapRect.fBottom); - path2.reset(); - path2.addRect(swapRect, dir, start); - check_simple_closed_rect(reporter, path2, testRect, swapDir, kYSwapStarts[start]); - } - } - // down, up, left, close - path.reset(); - path.moveTo(1, 1); - path.lineTo(1, 2); - path.lineTo(1, 1); - path.lineTo(0, 1); - SkRect rect; - SkPath::Direction dir; - unsigned start; - path.close(); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start)); - // right, left, up, close - path.reset(); - path.moveTo(1, 1); - path.lineTo(2, 1); - path.lineTo(1, 1); - path.lineTo(1, 0); - path.close(); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start)); - // parallelogram with horizontal edges - path.reset(); - path.moveTo(1, 0); - path.lineTo(3, 0); - path.lineTo(2, 1); - path.lineTo(0, 1); - path.close(); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start)); - // parallelogram with vertical edges - path.reset(); - path.moveTo(0, 1); - path.lineTo(0, 3); - path.lineTo(1, 2); - path.lineTo(1, 0); - path.close(); - REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start)); - -} - -static void test_isNestedFillRects(skiatest::Reporter* reporter) { - // passing tests (all moveTo / lineTo... - SkPoint r1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}; // CW - SkPoint r2[] = {{1, 0}, {1, 1}, {0, 1}, {0, 0}}; - SkPoint r3[] = {{1, 1}, {0, 1}, {0, 0}, {1, 0}}; - SkPoint r4[] = {{0, 1}, {0, 0}, {1, 0}, {1, 1}}; - SkPoint r5[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}}; // CCW - SkPoint r6[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}}; - SkPoint r7[] = {{1, 1}, {1, 0}, {0, 0}, {0, 1}}; - SkPoint r8[] = {{1, 0}, {0, 0}, {0, 1}, {1, 1}}; - SkPoint r9[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}}; - SkPoint ra[] = {{0, 0}, {0, .5f}, {0, 1}, {.5f, 1}, {1, 1}, {1, .5f}, {1, 0}, {.5f, 0}}; // CCW - SkPoint rb[] = {{0, 0}, {.5f, 0}, {1, 0}, {1, .5f}, {1, 1}, {.5f, 1}, {0, 1}, {0, .5f}}; // CW - SkPoint rc[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}}; // CW - SkPoint rd[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}}; // CCW - SkPoint re[] = {{0, 0}, {1, 0}, {1, 0}, {1, 1}, {0, 1}}; // CW - - // failing tests - SkPoint f1[] = {{0, 0}, {1, 0}, {1, 1}}; // too few points - SkPoint f2[] = {{0, 0}, {1, 1}, {0, 1}, {1, 0}}; // diagonal - SkPoint f3[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}, {1, 0}}; // wraps - SkPoint f4[] = {{0, 0}, {1, 0}, {0, 0}, {1, 0}, {1, 1}, {0, 1}}; // backs up - SkPoint f5[] = {{0, 0}, {1, 0}, {1, 1}, {2, 0}}; // end overshoots - SkPoint f6[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 2}}; // end overshoots - SkPoint f7[] = {{0, 0}, {1, 0}, {1, 1}, {0, 2}}; // end overshoots - SkPoint f8[] = {{0, 0}, {1, 0}, {1, 1}, {1, 0}}; // 'L' - - // success, no close is OK - SkPoint c1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}; // close doesn't match - SkPoint c2[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}}; // ditto - - struct IsNestedRectTest { - SkPoint *fPoints; - int fPointCount; - SkPathPriv::FirstDirection fDirection; - bool fClose; - bool fIsNestedRect; // nests with path.addRect(-1, -1, 2, 2); - } tests[] = { - { r1, SK_ARRAY_COUNT(r1), SkPathPriv::kCW_FirstDirection , true, true }, - { r2, SK_ARRAY_COUNT(r2), SkPathPriv::kCW_FirstDirection , true, true }, - { r3, SK_ARRAY_COUNT(r3), SkPathPriv::kCW_FirstDirection , true, true }, - { r4, SK_ARRAY_COUNT(r4), SkPathPriv::kCW_FirstDirection , true, true }, - { r5, SK_ARRAY_COUNT(r5), SkPathPriv::kCCW_FirstDirection, true, true }, - { r6, SK_ARRAY_COUNT(r6), SkPathPriv::kCCW_FirstDirection, true, true }, - { r7, SK_ARRAY_COUNT(r7), SkPathPriv::kCCW_FirstDirection, true, true }, - { r8, SK_ARRAY_COUNT(r8), SkPathPriv::kCCW_FirstDirection, true, true }, - { r9, SK_ARRAY_COUNT(r9), SkPathPriv::kCCW_FirstDirection, true, true }, - { ra, SK_ARRAY_COUNT(ra), SkPathPriv::kCCW_FirstDirection, true, true }, - { rb, SK_ARRAY_COUNT(rb), SkPathPriv::kCW_FirstDirection, true, true }, - { rc, SK_ARRAY_COUNT(rc), SkPathPriv::kCW_FirstDirection, true, true }, - { rd, SK_ARRAY_COUNT(rd), SkPathPriv::kCCW_FirstDirection, true, true }, - { re, SK_ARRAY_COUNT(re), SkPathPriv::kCW_FirstDirection, true, true }, - - { f1, SK_ARRAY_COUNT(f1), SkPathPriv::kUnknown_FirstDirection, true, false }, - { f2, SK_ARRAY_COUNT(f2), SkPathPriv::kUnknown_FirstDirection, true, false }, - { f3, SK_ARRAY_COUNT(f3), SkPathPriv::kUnknown_FirstDirection, true, false }, - { f4, SK_ARRAY_COUNT(f4), SkPathPriv::kUnknown_FirstDirection, true, false }, - { f5, SK_ARRAY_COUNT(f5), SkPathPriv::kUnknown_FirstDirection, true, false }, - { f6, SK_ARRAY_COUNT(f6), SkPathPriv::kUnknown_FirstDirection, true, false }, - { f7, SK_ARRAY_COUNT(f7), SkPathPriv::kUnknown_FirstDirection, true, false }, - { f8, SK_ARRAY_COUNT(f8), SkPathPriv::kUnknown_FirstDirection, true, false }, - - { c1, SK_ARRAY_COUNT(c1), SkPathPriv::kCW_FirstDirection, false, true }, - { c2, SK_ARRAY_COUNT(c2), SkPathPriv::kCW_FirstDirection, false, true }, - }; - - const size_t testCount = SK_ARRAY_COUNT(tests); - int index; - for (int rectFirst = 0; rectFirst <= 1; ++rectFirst) { - for (size_t testIndex = 0; testIndex < testCount; ++testIndex) { - SkPath path; - if (rectFirst) { - path.addRect(-1, -1, 2, 2, SkPath::kCW_Direction); - } - path.moveTo(tests[testIndex].fPoints[0].fX, tests[testIndex].fPoints[0].fY); - for (index = 1; index < tests[testIndex].fPointCount; ++index) { - path.lineTo(tests[testIndex].fPoints[index].fX, tests[testIndex].fPoints[index].fY); - } - if (tests[testIndex].fClose) { - path.close(); - } - if (!rectFirst) { - path.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction); - } - REPORTER_ASSERT(reporter, - tests[testIndex].fIsNestedRect == path.isNestedFillRects(nullptr)); - if (tests[testIndex].fIsNestedRect) { - SkRect expected[2], computed[2]; - SkPathPriv::FirstDirection expectedDirs[2]; - SkPath::Direction computedDirs[2]; - SkRect testBounds; - testBounds.set(tests[testIndex].fPoints, tests[testIndex].fPointCount); - expected[0] = SkRect::MakeLTRB(-1, -1, 2, 2); - expected[1] = testBounds; - if (rectFirst) { - expectedDirs[0] = SkPathPriv::kCW_FirstDirection; - } else { - expectedDirs[0] = SkPathPriv::kCCW_FirstDirection; - } - expectedDirs[1] = tests[testIndex].fDirection; - REPORTER_ASSERT(reporter, path.isNestedFillRects(computed, computedDirs)); - REPORTER_ASSERT(reporter, expected[0] == computed[0]); - REPORTER_ASSERT(reporter, expected[1] == computed[1]); - REPORTER_ASSERT(reporter, expectedDirs[0] == SkPathPriv::AsFirstDirection(computedDirs[0])); - REPORTER_ASSERT(reporter, expectedDirs[1] == SkPathPriv::AsFirstDirection(computedDirs[1])); - } - } - - // fail, close then line - SkPath path1; - if (rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction); - } - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - path1.lineTo(1, 0); - if (!rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction); - } - REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr)); - - // fail, move in the middle - path1.reset(); - if (rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction); - } - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - if (index == 2) { - path1.moveTo(1, .5f); - } - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - if (!rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction); - } - REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr)); - - // fail, move on the edge - path1.reset(); - if (rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction); - } - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - path1.moveTo(r1[index - 1].fX, r1[index - 1].fY); - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - if (!rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction); - } - REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr)); - - // fail, quad - path1.reset(); - if (rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction); - } - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - if (index == 2) { - path1.quadTo(1, .5f, 1, .5f); - } - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - if (!rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction); - } - REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr)); - - // fail, cubic - path1.reset(); - if (rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction); - } - path1.moveTo(r1[0].fX, r1[0].fY); - for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) { - if (index == 2) { - path1.cubicTo(1, .5f, 1, .5f, 1, .5f); - } - path1.lineTo(r1[index].fX, r1[index].fY); - } - path1.close(); - if (!rectFirst) { - path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction); - } - REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr)); - - // fail, not nested - path1.reset(); - path1.addRect(1, 1, 3, 3, SkPath::kCW_Direction); - path1.addRect(2, 2, 4, 4, SkPath::kCW_Direction); - REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr)); - } - - // pass, constructed explicitly from manually closed rects specified as moves/lines. - SkPath path; - path.moveTo(0, 0); - path.lineTo(10, 0); - path.lineTo(10, 10); - path.lineTo(0, 10); - path.lineTo(0, 0); - path.moveTo(1, 1); - path.lineTo(9, 1); - path.lineTo(9, 9); - path.lineTo(1, 9); - path.lineTo(1, 1); - REPORTER_ASSERT(reporter, path.isNestedFillRects(nullptr)); - - // pass, stroke rect - SkPath src, dst; - src.addRect(1, 1, 7, 7, SkPath::kCW_Direction); - SkPaint strokePaint; - strokePaint.setStyle(SkPaint::kStroke_Style); - strokePaint.setStrokeWidth(2); - strokePaint.getFillPath(src, &dst); - REPORTER_ASSERT(reporter, dst.isNestedFillRects(nullptr)); -} - -static void write_and_read_back(skiatest::Reporter* reporter, - const SkPath& p) { - SkWriter32 writer; - writer.writePath(p); - size_t size = writer.bytesWritten(); - SkAutoMalloc storage(size); - writer.flatten(storage.get()); - SkReader32 reader(storage.get(), size); - - SkPath readBack; - REPORTER_ASSERT(reporter, readBack != p); - reader.readPath(&readBack); - REPORTER_ASSERT(reporter, readBack == p); - - REPORTER_ASSERT(reporter, readBack.getConvexityOrUnknown() == - p.getConvexityOrUnknown()); - - SkRect oval0, oval1; - SkPath::Direction dir0, dir1; - unsigned start0, start1; - REPORTER_ASSERT(reporter, readBack.isOval(nullptr) == p.isOval(nullptr)); - if (p.isOval(&oval0, &dir0, &start0) && readBack.isOval(&oval1, &dir1, &start1)) { - REPORTER_ASSERT(reporter, oval0 == oval1); - REPORTER_ASSERT(reporter, dir0 == dir1); - REPORTER_ASSERT(reporter, start0 == start1); - } - REPORTER_ASSERT(reporter, readBack.isRRect(nullptr) == p.isRRect(nullptr)); - SkRRect rrect0, rrect1; - if (p.isRRect(&rrect0, &dir0, &start0) && readBack.isRRect(&rrect1, &dir1, &start1)) { - REPORTER_ASSERT(reporter, rrect0 == rrect1); - REPORTER_ASSERT(reporter, dir0 == dir1); - REPORTER_ASSERT(reporter, start0 == start1); - } - const SkRect& origBounds = p.getBounds(); - const SkRect& readBackBounds = readBack.getBounds(); - - REPORTER_ASSERT(reporter, origBounds == readBackBounds); -} - -static void test_corrupt_flattening(skiatest::Reporter* reporter) { - SkPath path; - path.moveTo(1, 2); - path.lineTo(1, 2); - path.quadTo(1, 2, 3, 4); - path.conicTo(1, 2, 3, 4, 0.5f); - path.cubicTo(1, 2, 3, 4, 5, 6); - uint8_t buffer[1024]; - SkDEBUGCODE(size_t size =) path.writeToMemory(buffer); - SkASSERT(size <= sizeof(buffer)); - - // find where the counts and verbs are stored : from the impl in SkPathRef.cpp - int32_t* vCount = (int32_t*)&buffer[16]; - SkASSERT(*vCount == 5); - int32_t* pCount = (int32_t*)&buffer[20]; - SkASSERT(*pCount == 9); - int32_t* cCount = (int32_t*)&buffer[24]; - SkASSERT(*cCount == 1); - uint8_t* verbs = &buffer[28]; - - REPORTER_ASSERT(reporter, path.readFromMemory(buffer, sizeof(buffer))); - - // check that we detect under/over-flow of counts - - *vCount += 1; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - *vCount -= 1; // restore - - *pCount += 1; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - *pCount -= 2; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - *pCount += 1; // restore - - *cCount += 1; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - *cCount -= 2; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - *cCount += 1; // restore - - // Check that we detect when the verbs indicate more or fewer pts/conics - - uint8_t save = verbs[0]; - SkASSERT(save == SkPath::kCubic_Verb); - verbs[0] = SkPath::kQuad_Verb; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - verbs[0] = save; - - save = verbs[1]; - SkASSERT(save == SkPath::kConic_Verb); - verbs[1] = SkPath::kQuad_Verb; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - verbs[1] = SkPath::kCubic_Verb; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - verbs[1] = save; - - // Check that we detect invalid verbs - save = verbs[1]; - verbs[1] = 17; - REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer))); - verbs[1] = save; -} - -static void test_flattening(skiatest::Reporter* reporter) { - SkPath p; - - static const SkPoint pts[] = { - { 0, 0 }, - { SkIntToScalar(10), SkIntToScalar(10) }, - { SkIntToScalar(20), SkIntToScalar(10) }, { SkIntToScalar(20), 0 }, - { 0, 0 }, { 0, SkIntToScalar(10) }, { SkIntToScalar(1), SkIntToScalar(10) } - }; - p.moveTo(pts[0]); - p.lineTo(pts[1]); - p.quadTo(pts[2], pts[3]); - p.cubicTo(pts[4], pts[5], pts[6]); - - write_and_read_back(reporter, p); - - // create a buffer that should be much larger than the path so we don't - // kill our stack if writer goes too far. - char buffer[1024]; - size_t size1 = p.writeToMemory(nullptr); - size_t size2 = p.writeToMemory(buffer); - REPORTER_ASSERT(reporter, size1 == size2); - - SkPath p2; - size_t size3 = p2.readFromMemory(buffer, 1024); - REPORTER_ASSERT(reporter, size1 == size3); - REPORTER_ASSERT(reporter, p == p2); - - size3 = p2.readFromMemory(buffer, 0); - REPORTER_ASSERT(reporter, !size3); - - SkPath tooShort; - size3 = tooShort.readFromMemory(buffer, size1 - 1); - REPORTER_ASSERT(reporter, tooShort.isEmpty()); - - char buffer2[1024]; - size3 = p2.writeToMemory(buffer2); - REPORTER_ASSERT(reporter, size1 == size3); - REPORTER_ASSERT(reporter, memcmp(buffer, buffer2, size1) == 0); - - // test persistence of the oval flag & convexity - { - SkPath oval; - SkRect rect = SkRect::MakeWH(10, 10); - oval.addOval(rect); - - write_and_read_back(reporter, oval); - } - - test_corrupt_flattening(reporter); -} - -static void test_transform(skiatest::Reporter* reporter) { - SkPath p; - -#define CONIC_PERSPECTIVE_BUG_FIXED 0 - static const SkPoint pts[] = { - { 0, 0 }, // move - { SkIntToScalar(10), SkIntToScalar(10) }, // line - { SkIntToScalar(20), SkIntToScalar(10) }, { SkIntToScalar(20), 0 }, // quad - { 0, 0 }, { 0, SkIntToScalar(10) }, { SkIntToScalar(1), SkIntToScalar(10) }, // cubic -#if CONIC_PERSPECTIVE_BUG_FIXED - { 0, 0 }, { SkIntToScalar(20), SkIntToScalar(10) }, // conic -#endif - }; - const int kPtCount = SK_ARRAY_COUNT(pts); - - p.moveTo(pts[0]); - p.lineTo(pts[1]); - p.quadTo(pts[2], pts[3]); - p.cubicTo(pts[4], pts[5], pts[6]); -#if CONIC_PERSPECTIVE_BUG_FIXED - p.conicTo(pts[4], pts[5], 0.5f); -#endif - p.close(); - - { - SkMatrix matrix; - matrix.reset(); - SkPath p1; - p.transform(matrix, &p1); - REPORTER_ASSERT(reporter, p == p1); - } - - - { - SkMatrix matrix; - matrix.setScale(SK_Scalar1 * 2, SK_Scalar1 * 3); - - SkPath p1; // Leave p1 non-unique (i.e., the empty path) - - p.transform(matrix, &p1); - SkPoint pts1[kPtCount]; - int count = p1.getPoints(pts1, kPtCount); - REPORTER_ASSERT(reporter, kPtCount == count); - for (int i = 0; i < count; ++i) { - SkPoint newPt = SkPoint::Make(pts[i].fX * 2, pts[i].fY * 3); - REPORTER_ASSERT(reporter, newPt == pts1[i]); - } - } - - { - SkMatrix matrix; - matrix.reset(); - matrix.setPerspX(4); - - SkPath p1; - p1.moveTo(SkPoint::Make(0, 0)); - - p.transform(matrix, &p1); - REPORTER_ASSERT(reporter, matrix.invert(&matrix)); - p1.transform(matrix, nullptr); - SkRect pBounds = p.getBounds(); - SkRect p1Bounds = p1.getBounds(); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fLeft, p1Bounds.fLeft)); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fTop, p1Bounds.fTop)); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fRight, p1Bounds.fRight)); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fBottom, p1Bounds.fBottom)); - } - - p.reset(); - p.addCircle(0, 0, 1, SkPath::kCW_Direction); - - { - SkMatrix matrix; - matrix.reset(); - SkPath p1; - p1.moveTo(SkPoint::Make(0, 0)); - - p.transform(matrix, &p1); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p1, SkPathPriv::kCW_FirstDirection)); - } - - - { - SkMatrix matrix; - matrix.reset(); - matrix.setScaleX(-1); - SkPath p1; - p1.moveTo(SkPoint::Make(0, 0)); // Make p1 unique (i.e., not empty path) - - p.transform(matrix, &p1); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p1, SkPathPriv::kCCW_FirstDirection)); - } - - { - SkMatrix matrix; - matrix.setAll(1, 1, 0, 1, 1, 0, 0, 0, 1); - SkPath p1; - p1.moveTo(SkPoint::Make(0, 0)); // Make p1 unique (i.e., not empty path) - - p.transform(matrix, &p1); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p1, SkPathPriv::kUnknown_FirstDirection)); - } -} - -static void test_zero_length_paths(skiatest::Reporter* reporter) { - SkPath p; - uint8_t verbs[32]; - - struct SUPPRESS_VISIBILITY_WARNING zeroPathTestData { - const char* testPath; - const size_t numResultPts; - const SkRect resultBound; - const SkPath::Verb* resultVerbs; - const size_t numResultVerbs; - }; - - static const SkPath::Verb resultVerbs1[] = { SkPath::kMove_Verb }; - static const SkPath::Verb resultVerbs2[] = { SkPath::kMove_Verb, SkPath::kMove_Verb }; - static const SkPath::Verb resultVerbs3[] = { SkPath::kMove_Verb, SkPath::kClose_Verb }; - static const SkPath::Verb resultVerbs4[] = { SkPath::kMove_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kClose_Verb }; - static const SkPath::Verb resultVerbs5[] = { SkPath::kMove_Verb, SkPath::kLine_Verb }; - static const SkPath::Verb resultVerbs6[] = { SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kMove_Verb, SkPath::kLine_Verb }; - static const SkPath::Verb resultVerbs7[] = { SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb }; - static const SkPath::Verb resultVerbs8[] = { - SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb - }; - static const SkPath::Verb resultVerbs9[] = { SkPath::kMove_Verb, SkPath::kQuad_Verb }; - static const SkPath::Verb resultVerbs10[] = { SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kMove_Verb, SkPath::kQuad_Verb }; - static const SkPath::Verb resultVerbs11[] = { SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kClose_Verb }; - static const SkPath::Verb resultVerbs12[] = { - SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kClose_Verb - }; - static const SkPath::Verb resultVerbs13[] = { SkPath::kMove_Verb, SkPath::kCubic_Verb }; - static const SkPath::Verb resultVerbs14[] = { SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kMove_Verb, SkPath::kCubic_Verb }; - static const SkPath::Verb resultVerbs15[] = { SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kClose_Verb }; - static const SkPath::Verb resultVerbs16[] = { - SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kClose_Verb - }; - static const struct zeroPathTestData gZeroLengthTests[] = { - { "M 1 1", 1, {1, 1, 1, 1}, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "M 1 1 M 2 1", 2, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs2, SK_ARRAY_COUNT(resultVerbs2) }, - { "M 1 1 z", 1, {1, 1, 1, 1}, resultVerbs3, SK_ARRAY_COUNT(resultVerbs3) }, - { "M 1 1 z M 2 1 z", 2, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs4, SK_ARRAY_COUNT(resultVerbs4) }, - { "M 1 1 L 1 1", 2, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs5, SK_ARRAY_COUNT(resultVerbs5) }, - { "M 1 1 L 1 1 M 2 1 L 2 1", 4, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs6, SK_ARRAY_COUNT(resultVerbs6) }, - { "M 1 1 L 1 1 z", 2, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs7, SK_ARRAY_COUNT(resultVerbs7) }, - { "M 1 1 L 1 1 z M 2 1 L 2 1 z", 4, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs8, SK_ARRAY_COUNT(resultVerbs8) }, - { "M 1 1 Q 1 1 1 1", 3, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs9, SK_ARRAY_COUNT(resultVerbs9) }, - { "M 1 1 Q 1 1 1 1 M 2 1 Q 2 1 2 1", 6, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs10, SK_ARRAY_COUNT(resultVerbs10) }, - { "M 1 1 Q 1 1 1 1 z", 3, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs11, SK_ARRAY_COUNT(resultVerbs11) }, - { "M 1 1 Q 1 1 1 1 z M 2 1 Q 2 1 2 1 z", 6, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs12, SK_ARRAY_COUNT(resultVerbs12) }, - { "M 1 1 C 1 1 1 1 1 1", 4, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs13, SK_ARRAY_COUNT(resultVerbs13) }, - { "M 1 1 C 1 1 1 1 1 1 M 2 1 C 2 1 2 1 2 1", 8, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs14, - SK_ARRAY_COUNT(resultVerbs14) - }, - { "M 1 1 C 1 1 1 1 1 1 z", 4, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs15, SK_ARRAY_COUNT(resultVerbs15) }, - { "M 1 1 C 1 1 1 1 1 1 z M 2 1 C 2 1 2 1 2 1 z", 8, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs16, - SK_ARRAY_COUNT(resultVerbs16) - } - }; - - for (size_t i = 0; i < SK_ARRAY_COUNT(gZeroLengthTests); ++i) { - p.reset(); - bool valid = SkParsePath::FromSVGString(gZeroLengthTests[i].testPath, &p); - REPORTER_ASSERT(reporter, valid); - REPORTER_ASSERT(reporter, !p.isEmpty()); - REPORTER_ASSERT(reporter, gZeroLengthTests[i].numResultPts == (size_t)p.countPoints()); - REPORTER_ASSERT(reporter, gZeroLengthTests[i].resultBound == p.getBounds()); - REPORTER_ASSERT(reporter, gZeroLengthTests[i].numResultVerbs == (size_t)p.getVerbs(verbs, SK_ARRAY_COUNT(verbs))); - for (size_t j = 0; j < gZeroLengthTests[i].numResultVerbs; ++j) { - REPORTER_ASSERT(reporter, gZeroLengthTests[i].resultVerbs[j] == verbs[j]); - } - } -} - -struct SegmentInfo { - SkPath fPath; - int fPointCount; -}; - -#define kCurveSegmentMask (SkPath::kQuad_SegmentMask | SkPath::kCubic_SegmentMask) - -static void test_segment_masks(skiatest::Reporter* reporter) { - SkPath p, p2; - - p.moveTo(0, 0); - p.quadTo(100, 100, 200, 200); - REPORTER_ASSERT(reporter, SkPath::kQuad_SegmentMask == p.getSegmentMasks()); - REPORTER_ASSERT(reporter, !p.isEmpty()); - p2 = p; - REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks()); - p.cubicTo(100, 100, 200, 200, 300, 300); - REPORTER_ASSERT(reporter, kCurveSegmentMask == p.getSegmentMasks()); - REPORTER_ASSERT(reporter, !p.isEmpty()); - p2 = p; - REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks()); - - p.reset(); - p.moveTo(0, 0); - p.cubicTo(100, 100, 200, 200, 300, 300); - REPORTER_ASSERT(reporter, SkPath::kCubic_SegmentMask == p.getSegmentMasks()); - p2 = p; - REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks()); - - REPORTER_ASSERT(reporter, !p.isEmpty()); -} - -static void test_iter(skiatest::Reporter* reporter) { - SkPath p; - SkPoint pts[4]; - - // Test an iterator with no path - SkPath::Iter noPathIter; - REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); - - // Test that setting an empty path works - noPathIter.setPath(p, false); - REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); - - // Test that close path makes no difference for an empty path - noPathIter.setPath(p, true); - REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); - - // Test an iterator with an initial empty path - SkPath::Iter iter(p, false); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); - - // Test that close path makes no difference - iter.setPath(p, true); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); - - - struct iterTestData { - const char* testPath; - const bool forceClose; - const bool consumeDegenerates; - const size_t* numResultPtsPerVerb; - const SkPoint* resultPts; - const SkPath::Verb* resultVerbs; - const size_t numResultVerbs; - }; - - static const SkPath::Verb resultVerbs1[] = { SkPath::kDone_Verb }; - static const SkPath::Verb resultVerbs2[] = { - SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kLine_Verb, SkPath::kDone_Verb - }; - static const SkPath::Verb resultVerbs3[] = { - SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kLine_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb, SkPath::kDone_Verb - }; - static const SkPath::Verb resultVerbs4[] = { - SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kMove_Verb, SkPath::kClose_Verb, SkPath::kDone_Verb - }; - static const SkPath::Verb resultVerbs5[] = { - SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kClose_Verb, SkPath::kDone_Verb - }; - static const size_t resultPtsSizes1[] = { 0 }; - static const size_t resultPtsSizes2[] = { 1, 2, 2, 0 }; - static const size_t resultPtsSizes3[] = { 1, 2, 2, 2, 1, 0 }; - static const size_t resultPtsSizes4[] = { 1, 2, 1, 1, 0 }; - static const size_t resultPtsSizes5[] = { 1, 2, 1, 1, 1, 0 }; - static const SkPoint* resultPts1 = 0; - static const SkPoint resultPts2[] = { - { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, SK_Scalar1 }, { SK_Scalar1, SK_Scalar1 }, { 0, SK_Scalar1 } - }; - static const SkPoint resultPts3[] = { - { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, SK_Scalar1 }, { SK_Scalar1, SK_Scalar1 }, { 0, SK_Scalar1 }, - { 0, SK_Scalar1 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 } - }; - static const SkPoint resultPts4[] = { - { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { 0, 0 }, { 0, 0 } - }; - static const SkPoint resultPts5[] = { - { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { 0, 0 }, { 0, 0 } - }; - static const struct iterTestData gIterTests[] = { - { "M 1 0", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "M 1 0 M 2 0 M 3 0 M 4 0 M 5 0", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "M 1 0 M 1 0 M 3 0 M 4 0 M 5 0", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "z", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "z", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "z M 1 0 z z M 2 0 z M 3 0 M 4 0 z", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "z M 1 0 z z M 2 0 z M 3 0 M 4 0 z", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "M 1 0 L 1 1 L 0 1 M 0 0 z", false, true, resultPtsSizes2, resultPts2, resultVerbs2, SK_ARRAY_COUNT(resultVerbs2) }, - { "M 1 0 L 1 1 L 0 1 M 0 0 z", true, true, resultPtsSizes3, resultPts3, resultVerbs3, SK_ARRAY_COUNT(resultVerbs3) }, - { "M 1 0 L 1 0 M 0 0 z", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "M 1 0 L 1 0 M 0 0 z", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) }, - { "M 1 0 L 1 0 M 0 0 z", false, false, resultPtsSizes4, resultPts4, resultVerbs4, SK_ARRAY_COUNT(resultVerbs4) }, - { "M 1 0 L 1 0 M 0 0 z", true, false, resultPtsSizes5, resultPts5, resultVerbs5, SK_ARRAY_COUNT(resultVerbs5) } - }; - - for (size_t i = 0; i < SK_ARRAY_COUNT(gIterTests); ++i) { - p.reset(); - bool valid = SkParsePath::FromSVGString(gIterTests[i].testPath, &p); - REPORTER_ASSERT(reporter, valid); - iter.setPath(p, gIterTests[i].forceClose); - int j = 0, l = 0; - do { - REPORTER_ASSERT(reporter, iter.next(pts, gIterTests[i].consumeDegenerates) == gIterTests[i].resultVerbs[j]); - for (int k = 0; k < (int)gIterTests[i].numResultPtsPerVerb[j]; ++k) { - REPORTER_ASSERT(reporter, pts[k] == gIterTests[i].resultPts[l++]); - } - } while (gIterTests[i].resultVerbs[j++] != SkPath::kDone_Verb); - REPORTER_ASSERT(reporter, j == (int)gIterTests[i].numResultVerbs); - } - - p.reset(); - iter.setPath(p, false); - REPORTER_ASSERT(reporter, !iter.isClosedContour()); - p.lineTo(1, 1); - p.close(); - iter.setPath(p, false); - REPORTER_ASSERT(reporter, iter.isClosedContour()); - p.reset(); - iter.setPath(p, true); - REPORTER_ASSERT(reporter, !iter.isClosedContour()); - p.lineTo(1, 1); - iter.setPath(p, true); - REPORTER_ASSERT(reporter, iter.isClosedContour()); - p.moveTo(0, 0); - p.lineTo(2, 2); - iter.setPath(p, false); - REPORTER_ASSERT(reporter, !iter.isClosedContour()); - - // this checks to see if the NaN logic is executed in SkPath::autoClose(), but does not - // check to see if the result is correct. - for (int setNaN = 0; setNaN < 4; ++setNaN) { - p.reset(); - p.moveTo(setNaN == 0 ? SK_ScalarNaN : 0, setNaN == 1 ? SK_ScalarNaN : 0); - p.lineTo(setNaN == 2 ? SK_ScalarNaN : 1, setNaN == 3 ? SK_ScalarNaN : 1); - iter.setPath(p, true); - iter.next(pts, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kClose_Verb == iter.next(pts, false)); - } - - p.reset(); - p.quadTo(0, 0, 0, 0); - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kQuad_Verb == iter.next(pts, false)); - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); - - p.reset(); - p.conicTo(0, 0, 0, 0, 0.5f); - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kConic_Verb == iter.next(pts, false)); - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); - - p.reset(); - p.cubicTo(0, 0, 0, 0, 0, 0); - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == iter.next(pts, false)); - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); - - p.moveTo(1, 1); // add a trailing moveto - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == iter.next(pts, false)); - iter.setPath(p, false); - iter.next(pts, false); - REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); - - // The GM degeneratesegments.cpp test is more extensive - - // Test out mixed degenerate and non-degenerate geometry with Conics - const SkVector radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 100, 100 } }; - SkRect r = SkRect::MakeWH(100, 100); - SkRRect rr; - rr.setRectRadii(r, radii); - p.reset(); - p.addRRect(rr); - iter.setPath(p, false); - REPORTER_ASSERT(reporter, SkPath::kMove_Verb == iter.next(pts)); - REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts)); - REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts)); - REPORTER_ASSERT(reporter, SkPath::kConic_Verb == iter.next(pts)); - REPORTER_ASSERT(reporter, SK_ScalarRoot2Over2 == iter.conicWeight()); -} - -static void test_raw_iter(skiatest::Reporter* reporter) { - SkPath p; - SkPoint pts[4]; - - // Test an iterator with no path - SkPath::RawIter noPathIter; - REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); - // Test that setting an empty path works - noPathIter.setPath(p); - REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); - - // Test an iterator with an initial empty path - SkPath::RawIter iter(p); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); - - // Test that a move-only path returns the move. - p.moveTo(SK_Scalar1, 0); - iter.setPath(p); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1); - REPORTER_ASSERT(reporter, pts[0].fY == 0); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); - - // No matter how many moves we add, we should get them all back - p.moveTo(SK_Scalar1*2, SK_Scalar1); - p.moveTo(SK_Scalar1*3, SK_Scalar1*2); - iter.setPath(p); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1); - REPORTER_ASSERT(reporter, pts[0].fY == 0); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*2); - REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*3); - REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*2); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); - - // Initial close is never ever stored - p.reset(); - p.close(); - iter.setPath(p); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); - - // Move/close sequences - p.reset(); - p.close(); // Not stored, no purpose - p.moveTo(SK_Scalar1, 0); - p.close(); - p.close(); // Not stored, no purpose - p.moveTo(SK_Scalar1*2, SK_Scalar1); - p.close(); - p.moveTo(SK_Scalar1*3, SK_Scalar1*2); - p.moveTo(SK_Scalar1*4, SK_Scalar1*3); - p.close(); - iter.setPath(p); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1); - REPORTER_ASSERT(reporter, pts[0].fY == 0); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*2); - REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*3); - REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*2); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*4); - REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*3); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb); - REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); - - // Generate random paths and verify - SkPoint randomPts[25]; - for (int i = 0; i < 5; ++i) { - for (int j = 0; j < 5; ++j) { - randomPts[i*5+j].set(SK_Scalar1*i, SK_Scalar1*j); - } - } - - // Max of 10 segments, max 3 points per segment - SkRandom rand(9876543); - SkPoint expectedPts[31]; // May have leading moveTo - SkPath::Verb expectedVerbs[22]; // May have leading moveTo - SkPath::Verb nextVerb; - - for (int i = 0; i < 500; ++i) { - p.reset(); - bool lastWasClose = true; - bool haveMoveTo = false; - SkPoint lastMoveToPt = { 0, 0 }; - int numPoints = 0; - int numVerbs = (rand.nextU() >> 16) % 10; - int numIterVerbs = 0; - for (int j = 0; j < numVerbs; ++j) { - do { - nextVerb = static_cast<SkPath::Verb>((rand.nextU() >> 16) % SkPath::kDone_Verb); - } while (lastWasClose && nextVerb == SkPath::kClose_Verb); - switch (nextVerb) { - case SkPath::kMove_Verb: - expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25]; - p.moveTo(expectedPts[numPoints]); - lastMoveToPt = expectedPts[numPoints]; - numPoints += 1; - lastWasClose = false; - haveMoveTo = true; - break; - case SkPath::kLine_Verb: - if (!haveMoveTo) { - expectedPts[numPoints++] = lastMoveToPt; - expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb; - haveMoveTo = true; - } - expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25]; - p.lineTo(expectedPts[numPoints]); - numPoints += 1; - lastWasClose = false; - break; - case SkPath::kQuad_Verb: - if (!haveMoveTo) { - expectedPts[numPoints++] = lastMoveToPt; - expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb; - haveMoveTo = true; - } - expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25]; - expectedPts[numPoints + 1] = randomPts[(rand.nextU() >> 16) % 25]; - p.quadTo(expectedPts[numPoints], expectedPts[numPoints + 1]); - numPoints += 2; - lastWasClose = false; - break; - case SkPath::kConic_Verb: - if (!haveMoveTo) { - expectedPts[numPoints++] = lastMoveToPt; - expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb; - haveMoveTo = true; - } - expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25]; - expectedPts[numPoints + 1] = randomPts[(rand.nextU() >> 16) % 25]; - p.conicTo(expectedPts[numPoints], expectedPts[numPoints + 1], - rand.nextUScalar1() * 4); - numPoints += 2; - lastWasClose = false; - break; - case SkPath::kCubic_Verb: - if (!haveMoveTo) { - expectedPts[numPoints++] = lastMoveToPt; - expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb; - haveMoveTo = true; - } - expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25]; - expectedPts[numPoints + 1] = randomPts[(rand.nextU() >> 16) % 25]; - expectedPts[numPoints + 2] = randomPts[(rand.nextU() >> 16) % 25]; - p.cubicTo(expectedPts[numPoints], expectedPts[numPoints + 1], - expectedPts[numPoints + 2]); - numPoints += 3; - lastWasClose = false; - break; - case SkPath::kClose_Verb: - p.close(); - haveMoveTo = false; - lastWasClose = true; - break; - default: - SkDEBUGFAIL("unexpected verb"); - } - expectedVerbs[numIterVerbs++] = nextVerb; - } - - iter.setPath(p); - numVerbs = numIterVerbs; - numIterVerbs = 0; - int numIterPts = 0; - SkPoint lastMoveTo; - SkPoint lastPt; - lastMoveTo.set(0, 0); - lastPt.set(0, 0); - while ((nextVerb = iter.next(pts)) != SkPath::kDone_Verb) { - REPORTER_ASSERT(reporter, nextVerb == expectedVerbs[numIterVerbs]); - numIterVerbs++; - switch (nextVerb) { - case SkPath::kMove_Verb: - REPORTER_ASSERT(reporter, numIterPts < numPoints); - REPORTER_ASSERT(reporter, pts[0] == expectedPts[numIterPts]); - lastPt = lastMoveTo = pts[0]; - numIterPts += 1; - break; - case SkPath::kLine_Verb: - REPORTER_ASSERT(reporter, numIterPts < numPoints + 1); - REPORTER_ASSERT(reporter, pts[0] == lastPt); - REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]); - lastPt = pts[1]; - numIterPts += 1; - break; - case SkPath::kQuad_Verb: - case SkPath::kConic_Verb: - REPORTER_ASSERT(reporter, numIterPts < numPoints + 2); - REPORTER_ASSERT(reporter, pts[0] == lastPt); - REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]); - REPORTER_ASSERT(reporter, pts[2] == expectedPts[numIterPts + 1]); - lastPt = pts[2]; - numIterPts += 2; - break; - case SkPath::kCubic_Verb: - REPORTER_ASSERT(reporter, numIterPts < numPoints + 3); - REPORTER_ASSERT(reporter, pts[0] == lastPt); - REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]); - REPORTER_ASSERT(reporter, pts[2] == expectedPts[numIterPts + 1]); - REPORTER_ASSERT(reporter, pts[3] == expectedPts[numIterPts + 2]); - lastPt = pts[3]; - numIterPts += 3; - break; - case SkPath::kClose_Verb: - lastPt = lastMoveTo; - break; - default: - SkDEBUGFAIL("unexpected verb"); - } - } - REPORTER_ASSERT(reporter, numIterPts == numPoints); - REPORTER_ASSERT(reporter, numIterVerbs == numVerbs); - } -} - -static void check_for_circle(skiatest::Reporter* reporter, - const SkPath& path, - bool expectedCircle, - SkPathPriv::FirstDirection expectedDir) { - SkRect rect = SkRect::MakeEmpty(); - REPORTER_ASSERT(reporter, path.isOval(&rect) == expectedCircle); - SkPath::Direction isOvalDir; - unsigned isOvalStart; - if (path.isOval(&rect, &isOvalDir, &isOvalStart)) { - REPORTER_ASSERT(reporter, rect.height() == rect.width()); - REPORTER_ASSERT(reporter, SkPathPriv::AsFirstDirection(isOvalDir) == expectedDir); - SkPath tmpPath; - tmpPath.addOval(rect, isOvalDir, isOvalStart); - REPORTER_ASSERT(reporter, path == tmpPath); - } - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, expectedDir)); -} - -static void test_circle_skew(skiatest::Reporter* reporter, - const SkPath& path, - SkPathPriv::FirstDirection dir) { - SkPath tmp; - - SkMatrix m; - m.setSkew(SkIntToScalar(3), SkIntToScalar(5)); - path.transform(m, &tmp); - // this matrix reverses the direction. - if (SkPathPriv::kCCW_FirstDirection == dir) { - dir = SkPathPriv::kCW_FirstDirection; - } else { - REPORTER_ASSERT(reporter, SkPathPriv::kCW_FirstDirection == dir); - dir = SkPathPriv::kCCW_FirstDirection; - } - check_for_circle(reporter, tmp, false, dir); -} - -static void test_circle_translate(skiatest::Reporter* reporter, - const SkPath& path, - SkPathPriv::FirstDirection dir) { - SkPath tmp; - - // translate at small offset - SkMatrix m; - m.setTranslate(SkIntToScalar(15), SkIntToScalar(15)); - path.transform(m, &tmp); - check_for_circle(reporter, tmp, true, dir); - - tmp.reset(); - m.reset(); - - // translate at a relatively big offset - m.setTranslate(SkIntToScalar(1000), SkIntToScalar(1000)); - path.transform(m, &tmp); - check_for_circle(reporter, tmp, true, dir); -} - -static void test_circle_rotate(skiatest::Reporter* reporter, - const SkPath& path, - SkPathPriv::FirstDirection dir) { - for (int angle = 0; angle < 360; ++angle) { - SkPath tmp; - SkMatrix m; - m.setRotate(SkIntToScalar(angle)); - path.transform(m, &tmp); - - // TODO: a rotated circle whose rotated angle is not a multiple of 90 - // degrees is not an oval anymore, this can be improved. we made this - // for the simplicity of our implementation. - if (angle % 90 == 0) { - check_for_circle(reporter, tmp, true, dir); - } else { - check_for_circle(reporter, tmp, false, dir); - } - } -} - -static void test_circle_mirror_x(skiatest::Reporter* reporter, - const SkPath& path, - SkPathPriv::FirstDirection dir) { - SkPath tmp; - SkMatrix m; - m.reset(); - m.setScaleX(-SK_Scalar1); - path.transform(m, &tmp); - if (SkPathPriv::kCW_FirstDirection == dir) { - dir = SkPathPriv::kCCW_FirstDirection; - } else { - REPORTER_ASSERT(reporter, SkPathPriv::kCCW_FirstDirection == dir); - dir = SkPathPriv::kCW_FirstDirection; - } - check_for_circle(reporter, tmp, true, dir); -} - -static void test_circle_mirror_y(skiatest::Reporter* reporter, - const SkPath& path, - SkPathPriv::FirstDirection dir) { - SkPath tmp; - SkMatrix m; - m.reset(); - m.setScaleY(-SK_Scalar1); - path.transform(m, &tmp); - - if (SkPathPriv::kCW_FirstDirection == dir) { - dir = SkPathPriv::kCCW_FirstDirection; - } else { - REPORTER_ASSERT(reporter, SkPathPriv::kCCW_FirstDirection == dir); - dir = SkPathPriv::kCW_FirstDirection; - } - - check_for_circle(reporter, tmp, true, dir); -} - -static void test_circle_mirror_xy(skiatest::Reporter* reporter, - const SkPath& path, - SkPathPriv::FirstDirection dir) { - SkPath tmp; - SkMatrix m; - m.reset(); - m.setScaleX(-SK_Scalar1); - m.setScaleY(-SK_Scalar1); - path.transform(m, &tmp); - - check_for_circle(reporter, tmp, true, dir); -} - -static void test_circle_with_direction(skiatest::Reporter* reporter, - SkPath::Direction inDir) { - const SkPathPriv::FirstDirection dir = SkPathPriv::AsFirstDirection(inDir); - SkPath path; - - // circle at origin - path.addCircle(0, 0, SkIntToScalar(20), inDir); - - check_for_circle(reporter, path, true, dir); - test_circle_rotate(reporter, path, dir); - test_circle_translate(reporter, path, dir); - test_circle_skew(reporter, path, dir); - test_circle_mirror_x(reporter, path, dir); - test_circle_mirror_y(reporter, path, dir); - test_circle_mirror_xy(reporter, path, dir); - - // circle at an offset at (10, 10) - path.reset(); - path.addCircle(SkIntToScalar(10), SkIntToScalar(10), - SkIntToScalar(20), inDir); - - check_for_circle(reporter, path, true, dir); - test_circle_rotate(reporter, path, dir); - test_circle_translate(reporter, path, dir); - test_circle_skew(reporter, path, dir); - test_circle_mirror_x(reporter, path, dir); - test_circle_mirror_y(reporter, path, dir); - test_circle_mirror_xy(reporter, path, dir); - - // Try different starting points for the contour. - for (unsigned start = 0; start < 4; ++start) { - path.reset(); - path.addOval(SkRect::MakeXYWH(20, 10, 5, 5), inDir, start); - test_circle_rotate(reporter, path, dir); - test_circle_translate(reporter, path, dir); - test_circle_skew(reporter, path, dir); - test_circle_mirror_x(reporter, path, dir); - test_circle_mirror_y(reporter, path, dir); - test_circle_mirror_xy(reporter, path, dir); - } -} - -static void test_circle_with_add_paths(skiatest::Reporter* reporter) { - SkPath path; - SkPath circle; - SkPath rect; - SkPath empty; - - const SkPath::Direction kCircleDir = SkPath::kCW_Direction; - const SkPath::Direction kCircleDirOpposite = SkPath::kCCW_Direction; - - circle.addCircle(0, 0, SkIntToScalar(10), kCircleDir); - rect.addRect(SkIntToScalar(5), SkIntToScalar(5), - SkIntToScalar(20), SkIntToScalar(20), SkPath::kCW_Direction); - - SkMatrix translate; - translate.setTranslate(SkIntToScalar(12), SkIntToScalar(12)); - - // Although all the path concatenation related operations leave - // the path a circle, most mark it as a non-circle for simplicity - - // empty + circle (translate) - path = empty; - path.addPath(circle, translate); - check_for_circle(reporter, path, false, SkPathPriv::AsFirstDirection(kCircleDir)); - - // circle + empty (translate) - path = circle; - path.addPath(empty, translate); - - check_for_circle(reporter, path, true, SkPathPriv::AsFirstDirection(kCircleDir)); - - // test reverseAddPath - path = circle; - path.reverseAddPath(rect); - check_for_circle(reporter, path, false, SkPathPriv::AsFirstDirection(kCircleDirOpposite)); -} - -static void test_circle(skiatest::Reporter* reporter) { - test_circle_with_direction(reporter, SkPath::kCW_Direction); - test_circle_with_direction(reporter, SkPath::kCCW_Direction); - - // multiple addCircle() - SkPath path; - path.addCircle(0, 0, SkIntToScalar(10), SkPath::kCW_Direction); - path.addCircle(0, 0, SkIntToScalar(20), SkPath::kCW_Direction); - check_for_circle(reporter, path, false, SkPathPriv::kCW_FirstDirection); - - // some extra lineTo() would make isOval() fail - path.reset(); - path.addCircle(0, 0, SkIntToScalar(10), SkPath::kCW_Direction); - path.lineTo(0, 0); - check_for_circle(reporter, path, false, SkPathPriv::kCW_FirstDirection); - - // not back to the original point - path.reset(); - path.addCircle(0, 0, SkIntToScalar(10), SkPath::kCW_Direction); - path.setLastPt(SkIntToScalar(5), SkIntToScalar(5)); - check_for_circle(reporter, path, false, SkPathPriv::kCW_FirstDirection); - - test_circle_with_add_paths(reporter); - - // test negative radius - path.reset(); - path.addCircle(0, 0, -1, SkPath::kCW_Direction); - REPORTER_ASSERT(reporter, path.isEmpty()); -} - -static void test_oval(skiatest::Reporter* reporter) { - SkRect rect; - SkMatrix m; - SkPath path; - unsigned start = 0; - SkPath::Direction dir = SkPath::kCCW_Direction; - - rect = SkRect::MakeWH(SkIntToScalar(30), SkIntToScalar(50)); - path.addOval(rect); - - // Defaults to dir = CW and start = 1 - REPORTER_ASSERT(reporter, path.isOval(nullptr)); - - m.setRotate(SkIntToScalar(90)); - SkPath tmp; - path.transform(m, &tmp); - // an oval rotated 90 degrees is still an oval. The start index changes from 1 to 2. Direction - // is unchanged. - REPORTER_ASSERT(reporter, tmp.isOval(nullptr, &dir, &start)); - REPORTER_ASSERT(reporter, 2 == start); - REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir); - - m.reset(); - m.setRotate(SkIntToScalar(30)); - tmp.reset(); - path.transform(m, &tmp); - // an oval rotated 30 degrees is not an oval anymore. - REPORTER_ASSERT(reporter, !tmp.isOval(nullptr)); - - // since empty path being transformed. - path.reset(); - tmp.reset(); - m.reset(); - path.transform(m, &tmp); - REPORTER_ASSERT(reporter, !tmp.isOval(nullptr)); - - // empty path is not an oval - tmp.reset(); - REPORTER_ASSERT(reporter, !tmp.isOval(nullptr)); - - // only has moveTo()s - tmp.reset(); - tmp.moveTo(0, 0); - tmp.moveTo(SkIntToScalar(10), SkIntToScalar(10)); - REPORTER_ASSERT(reporter, !tmp.isOval(nullptr)); - - // mimic WebKit's calling convention, - // call moveTo() first and then call addOval() - path.reset(); - path.moveTo(0, 0); - path.addOval(rect); - REPORTER_ASSERT(reporter, path.isOval(nullptr)); - - // copy path - path.reset(); - tmp.reset(); - tmp.addOval(rect); - path = tmp; - REPORTER_ASSERT(reporter, path.isOval(nullptr, &dir, &start)); - REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir); - REPORTER_ASSERT(reporter, 1 == start); -} - -static void test_empty(skiatest::Reporter* reporter, const SkPath& p) { - SkPath empty; - - REPORTER_ASSERT(reporter, p.isEmpty()); - REPORTER_ASSERT(reporter, 0 == p.countPoints()); - REPORTER_ASSERT(reporter, 0 == p.countVerbs()); - REPORTER_ASSERT(reporter, 0 == p.getSegmentMasks()); - REPORTER_ASSERT(reporter, p.isConvex()); - REPORTER_ASSERT(reporter, p.getFillType() == SkPath::kWinding_FillType); - REPORTER_ASSERT(reporter, !p.isInverseFillType()); - REPORTER_ASSERT(reporter, p == empty); - REPORTER_ASSERT(reporter, !(p != empty)); -} - -static void test_rrect_is_convex(skiatest::Reporter* reporter, SkPath* path, - SkPath::Direction dir) { - REPORTER_ASSERT(reporter, path->isConvex()); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(*path, SkPathPriv::AsFirstDirection(dir))); - path->setConvexity(SkPath::kUnknown_Convexity); - REPORTER_ASSERT(reporter, path->isConvex()); - path->reset(); -} - -static void test_rrect_convexity_is_unknown(skiatest::Reporter* reporter, SkPath* path, - SkPath::Direction dir) { - REPORTER_ASSERT(reporter, path->isConvex()); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(*path, SkPathPriv::AsFirstDirection(dir))); - path->setConvexity(SkPath::kUnknown_Convexity); - REPORTER_ASSERT(reporter, path->getConvexity() == SkPath::kUnknown_Convexity); - path->reset(); -} - -static void test_rrect(skiatest::Reporter* reporter) { - SkPath p; - SkRRect rr; - SkVector radii[] = {{1, 2}, {3, 4}, {5, 6}, {7, 8}}; - SkRect r = {10, 20, 30, 40}; - rr.setRectRadii(r, radii); - p.addRRect(rr); - test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); - p.addRRect(rr, SkPath::kCCW_Direction); - test_rrect_is_convex(reporter, &p, SkPath::kCCW_Direction); - p.addRoundRect(r, &radii[0].fX); - test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); - p.addRoundRect(r, &radii[0].fX, SkPath::kCCW_Direction); - test_rrect_is_convex(reporter, &p, SkPath::kCCW_Direction); - p.addRoundRect(r, radii[1].fX, radii[1].fY); - test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); - p.addRoundRect(r, radii[1].fX, radii[1].fY, SkPath::kCCW_Direction); - test_rrect_is_convex(reporter, &p, SkPath::kCCW_Direction); - for (size_t i = 0; i < SK_ARRAY_COUNT(radii); ++i) { - SkVector save = radii[i]; - radii[i].set(0, 0); - rr.setRectRadii(r, radii); - p.addRRect(rr); - test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); - radii[i] = save; - } - p.addRoundRect(r, 0, 0); - SkRect returnedRect; - REPORTER_ASSERT(reporter, p.isRect(&returnedRect)); - REPORTER_ASSERT(reporter, returnedRect == r); - test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); - SkVector zeroRadii[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}}; - rr.setRectRadii(r, zeroRadii); - p.addRRect(rr); - bool closed; - SkPath::Direction dir; - REPORTER_ASSERT(reporter, p.isRect(nullptr, &closed, &dir)); - REPORTER_ASSERT(reporter, closed); - REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir); - test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); - p.addRRect(rr, SkPath::kCW_Direction); - p.addRRect(rr, SkPath::kCW_Direction); - REPORTER_ASSERT(reporter, !p.isConvex()); - p.reset(); - p.addRRect(rr, SkPath::kCCW_Direction); - p.addRRect(rr, SkPath::kCCW_Direction); - REPORTER_ASSERT(reporter, !p.isConvex()); - p.reset(); - SkRect emptyR = {10, 20, 10, 30}; - rr.setRectRadii(emptyR, radii); - p.addRRect(rr); - REPORTER_ASSERT(reporter, p.isEmpty()); - SkRect largeR = {0, 0, SK_ScalarMax, SK_ScalarMax}; - rr.setRectRadii(largeR, radii); - p.addRRect(rr); - test_rrect_convexity_is_unknown(reporter, &p, SkPath::kCW_Direction); - - // we check for non-finites - SkRect infR = {0, 0, SK_ScalarMax, SK_ScalarInfinity}; - rr.setRectRadii(infR, radii); - REPORTER_ASSERT(reporter, rr.isEmpty()); - - SkRect tinyR = {0, 0, 1e-9f, 1e-9f}; - p.addRoundRect(tinyR, 5e-11f, 5e-11f); - test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction); -} - -static void test_arc(skiatest::Reporter* reporter) { - SkPath p; - SkRect emptyOval = {10, 20, 30, 20}; - REPORTER_ASSERT(reporter, emptyOval.isEmpty()); - p.addArc(emptyOval, 1, 2); - REPORTER_ASSERT(reporter, p.isEmpty()); - p.reset(); - SkRect oval = {10, 20, 30, 40}; - p.addArc(oval, 1, 0); - REPORTER_ASSERT(reporter, p.isEmpty()); - p.reset(); - SkPath cwOval; - cwOval.addOval(oval); - p.addArc(oval, 0, 360); - REPORTER_ASSERT(reporter, p == cwOval); - p.reset(); - SkPath ccwOval; - ccwOval.addOval(oval, SkPath::kCCW_Direction); - p.addArc(oval, 0, -360); - REPORTER_ASSERT(reporter, p == ccwOval); - p.reset(); - p.addArc(oval, 1, 180); - REPORTER_ASSERT(reporter, p.isConvex()); - REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p, SkPathPriv::kCW_FirstDirection)); - p.setConvexity(SkPath::kUnknown_Convexity); - REPORTER_ASSERT(reporter, p.isConvex()); -} - -static inline SkScalar oval_start_index_to_angle(unsigned start) { - switch (start) { - case 0: - return 270.f; - case 1: - return 0.f; - case 2: - return 90.f; - case 3: - return 180.f; - default: - return -1.f; - } -} - -static inline SkScalar canonical_start_angle(float angle) { - while (angle < 0.f) { - angle += 360.f; - } - while (angle >= 360.f) { - angle -= 360.f; - } - return angle; -} - -static void check_oval_arc(skiatest::Reporter* reporter, SkScalar start, SkScalar sweep, - const SkPath& path) { - SkRect r = SkRect::MakeEmpty(); - SkPath::Direction d = SkPath::kCCW_Direction; - unsigned s = ~0U; - bool isOval = path.isOval(&r, &d, &s); - REPORTER_ASSERT(reporter, isOval); - SkPath recreatedPath; - recreatedPath.addOval(r, d, s); - REPORTER_ASSERT(reporter, path == recreatedPath); - REPORTER_ASSERT(reporter, oval_start_index_to_angle(s) == canonical_start_angle(start)); - REPORTER_ASSERT(reporter, (SkPath::kCW_Direction == d) == (sweep > 0.f)); -} - -static void test_arc_ovals(skiatest::Reporter* reporter) { - SkRect oval = SkRect::MakeWH(10, 20); - for (SkScalar sweep : {-720.f, -540.f, -360.f, 360.f, 432.f, 720.f}) { - for (SkScalar start = -360.f; start <= 360.f; start += 1.f) { - SkPath path; - path.addArc(oval, start, sweep); - // SkPath's interfaces for inserting and extracting ovals only allow contours - // to start at multiples of 90 degrees. - if (std::fmod(start, 90.f) == 0) { - check_oval_arc(reporter, start, sweep, path); - } else { - REPORTER_ASSERT(reporter, !path.isOval(nullptr)); - } - } - // Test start angles that are nearly at valid oval start angles. - for (float start : {-180.f, -90.f, 90.f, 180.f}) { - for (float delta : {-SK_ScalarNearlyZero, SK_ScalarNearlyZero}) { - SkPath path; - path.addArc(oval, start + delta, sweep); - check_oval_arc(reporter, start, sweep, path); - } - } - } -} - -static void check_move(skiatest::Reporter* reporter, SkPath::RawIter* iter, - SkScalar x0, SkScalar y0) { - SkPoint pts[4]; - SkPath::Verb v = iter->next(pts); - REPORTER_ASSERT(reporter, v == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, pts[0].fX == x0); - REPORTER_ASSERT(reporter, pts[0].fY == y0); -} - -static void check_line(skiatest::Reporter* reporter, SkPath::RawIter* iter, - SkScalar x1, SkScalar y1) { - SkPoint pts[4]; - SkPath::Verb v = iter->next(pts); - REPORTER_ASSERT(reporter, v == SkPath::kLine_Verb); - REPORTER_ASSERT(reporter, pts[1].fX == x1); - REPORTER_ASSERT(reporter, pts[1].fY == y1); -} - -static void check_quad(skiatest::Reporter* reporter, SkPath::RawIter* iter, - SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) { - SkPoint pts[4]; - SkPath::Verb v = iter->next(pts); - REPORTER_ASSERT(reporter, v == SkPath::kQuad_Verb); - REPORTER_ASSERT(reporter, pts[1].fX == x1); - REPORTER_ASSERT(reporter, pts[1].fY == y1); - REPORTER_ASSERT(reporter, pts[2].fX == x2); - REPORTER_ASSERT(reporter, pts[2].fY == y2); -} - -static void check_done(skiatest::Reporter* reporter, SkPath* p, SkPath::RawIter* iter) { - SkPoint pts[4]; - SkPath::Verb v = iter->next(pts); - REPORTER_ASSERT(reporter, v == SkPath::kDone_Verb); -} - -static void check_done_and_reset(skiatest::Reporter* reporter, SkPath* p, SkPath::RawIter* iter) { - check_done(reporter, p, iter); - p->reset(); -} - -static void check_path_is_move_and_reset(skiatest::Reporter* reporter, SkPath* p, - SkScalar x0, SkScalar y0) { - SkPath::RawIter iter(*p); - check_move(reporter, &iter, x0, y0); - check_done_and_reset(reporter, p, &iter); -} - -static void check_path_is_line_and_reset(skiatest::Reporter* reporter, SkPath* p, - SkScalar x1, SkScalar y1) { - SkPath::RawIter iter(*p); - check_move(reporter, &iter, 0, 0); - check_line(reporter, &iter, x1, y1); - check_done_and_reset(reporter, p, &iter); -} - -static void check_path_is_line(skiatest::Reporter* reporter, SkPath* p, - SkScalar x1, SkScalar y1) { - SkPath::RawIter iter(*p); - check_move(reporter, &iter, 0, 0); - check_line(reporter, &iter, x1, y1); - check_done(reporter, p, &iter); -} - -static void check_path_is_line_pair_and_reset(skiatest::Reporter* reporter, SkPath* p, - SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) { - SkPath::RawIter iter(*p); - check_move(reporter, &iter, 0, 0); - check_line(reporter, &iter, x1, y1); - check_line(reporter, &iter, x2, y2); - check_done_and_reset(reporter, p, &iter); -} - -static void check_path_is_quad_and_reset(skiatest::Reporter* reporter, SkPath* p, - SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) { - SkPath::RawIter iter(*p); - check_move(reporter, &iter, 0, 0); - check_quad(reporter, &iter, x1, y1, x2, y2); - check_done_and_reset(reporter, p, &iter); -} - -static bool nearly_equal(const SkRect& a, const SkRect& b) { - return SkScalarNearlyEqual(a.fLeft, b.fLeft) && - SkScalarNearlyEqual(a.fTop, b.fTop) && - SkScalarNearlyEqual(a.fRight, b.fRight) && - SkScalarNearlyEqual(a.fBottom, b.fBottom); -} - -static void test_arcTo(skiatest::Reporter* reporter) { - SkPath p; - p.arcTo(0, 0, 1, 2, 1); - check_path_is_line_and_reset(reporter, &p, 0, 0); - p.arcTo(1, 2, 1, 2, 1); - check_path_is_line_and_reset(reporter, &p, 1, 2); - p.arcTo(1, 2, 3, 4, 0); - check_path_is_line_and_reset(reporter, &p, 1, 2); - p.arcTo(1, 2, 0, 0, 1); - check_path_is_line_and_reset(reporter, &p, 1, 2); - p.arcTo(1, 0, 1, 1, 1); - SkPoint pt; - REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt.fX == 1 && pt.fY == 1); - p.reset(); - p.arcTo(1, 0, 1, -1, 1); - REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt.fX == 1 && pt.fY == -1); - p.reset(); - SkRect oval = {1, 2, 3, 4}; - p.arcTo(oval, 0, 0, true); - check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY()); - p.arcTo(oval, 0, 0, false); - check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY()); - p.arcTo(oval, 360, 0, true); - check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY()); - p.arcTo(oval, 360, 0, false); - check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY()); - - for (float sweep = 359, delta = 0.5f; sweep != (float) (sweep + delta); ) { - p.arcTo(oval, 0, sweep, false); - REPORTER_ASSERT(reporter, nearly_equal(p.getBounds(), oval)); - sweep += delta; - delta /= 2; - } - for (float sweep = 361, delta = 0.5f; sweep != (float) (sweep - delta);) { - p.arcTo(oval, 0, sweep, false); - REPORTER_ASSERT(reporter, nearly_equal(p.getBounds(), oval)); - sweep -= delta; - delta /= 2; - } - SkRect noOvalWidth = {1, 2, 0, 3}; - p.reset(); - p.arcTo(noOvalWidth, 0, 360, false); - REPORTER_ASSERT(reporter, p.isEmpty()); - - SkRect noOvalHeight = {1, 2, 3, 1}; - p.reset(); - p.arcTo(noOvalHeight, 0, 360, false); - REPORTER_ASSERT(reporter, p.isEmpty()); -} - -static void test_addPath(skiatest::Reporter* reporter) { - SkPath p, q; - p.lineTo(1, 2); - q.moveTo(4, 4); - q.lineTo(7, 8); - q.conicTo(8, 7, 6, 5, 0.5f); - q.quadTo(6, 7, 8, 6); - q.cubicTo(5, 6, 7, 8, 7, 5); - q.close(); - p.addPath(q, -4, -4); - SkRect expected = {0, 0, 4, 4}; - REPORTER_ASSERT(reporter, p.getBounds() == expected); - p.reset(); - p.reverseAddPath(q); - SkRect reverseExpected = {4, 4, 8, 8}; - REPORTER_ASSERT(reporter, p.getBounds() == reverseExpected); -} - -static void test_addPathMode(skiatest::Reporter* reporter, bool explicitMoveTo, bool extend) { - SkPath p, q; - if (explicitMoveTo) { - p.moveTo(1, 1); - } - p.lineTo(1, 2); - if (explicitMoveTo) { - q.moveTo(2, 1); - } - q.lineTo(2, 2); - p.addPath(q, extend ? SkPath::kExtend_AddPathMode : SkPath::kAppend_AddPathMode); - uint8_t verbs[4]; - int verbcount = p.getVerbs(verbs, 4); - REPORTER_ASSERT(reporter, verbcount == 4); - REPORTER_ASSERT(reporter, verbs[0] == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, verbs[1] == SkPath::kLine_Verb); - REPORTER_ASSERT(reporter, verbs[2] == (extend ? SkPath::kLine_Verb : SkPath::kMove_Verb)); - REPORTER_ASSERT(reporter, verbs[3] == SkPath::kLine_Verb); -} - -static void test_extendClosedPath(skiatest::Reporter* reporter) { - SkPath p, q; - p.moveTo(1, 1); - p.lineTo(1, 2); - p.lineTo(2, 2); - p.close(); - q.moveTo(2, 1); - q.lineTo(2, 3); - p.addPath(q, SkPath::kExtend_AddPathMode); - uint8_t verbs[7]; - int verbcount = p.getVerbs(verbs, 7); - REPORTER_ASSERT(reporter, verbcount == 7); - REPORTER_ASSERT(reporter, verbs[0] == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, verbs[1] == SkPath::kLine_Verb); - REPORTER_ASSERT(reporter, verbs[2] == SkPath::kLine_Verb); - REPORTER_ASSERT(reporter, verbs[3] == SkPath::kClose_Verb); - REPORTER_ASSERT(reporter, verbs[4] == SkPath::kMove_Verb); - REPORTER_ASSERT(reporter, verbs[5] == SkPath::kLine_Verb); - REPORTER_ASSERT(reporter, verbs[6] == SkPath::kLine_Verb); - - SkPoint pt; - REPORTER_ASSERT(reporter, p.getLastPt(&pt)); - REPORTER_ASSERT(reporter, pt == SkPoint::Make(2, 3)); - REPORTER_ASSERT(reporter, p.getPoint(3) == SkPoint::Make(1, 1)); -} - -static void test_addEmptyPath(skiatest::Reporter* reporter, SkPath::AddPathMode mode) { - SkPath p, q, r; - // case 1: dst is empty - p.moveTo(2, 1); - p.lineTo(2, 3); - q.addPath(p, mode); - REPORTER_ASSERT(reporter, q == p); - // case 2: src is empty - p.addPath(r, mode); - REPORTER_ASSERT(reporter, q == p); - // case 3: src and dst are empty - q.reset(); - q.addPath(r, mode); - REPORTER_ASSERT(reporter, q.isEmpty()); -} - -static void test_conicTo_special_case(skiatest::Reporter* reporter) { - SkPath p; - p.conicTo(1, 2, 3, 4, -1); - check_path_is_line_and_reset(reporter, &p, 3, 4); - p.conicTo(1, 2, 3, 4, SK_ScalarInfinity); - check_path_is_line_pair_and_reset(reporter, &p, 1, 2, 3, 4); - p.conicTo(1, 2, 3, 4, 1); - check_path_is_quad_and_reset(reporter, &p, 1, 2, 3, 4); -} - -static void test_get_point(skiatest::Reporter* reporter) { - SkPath p; - SkPoint pt = p.getPoint(0); - REPORTER_ASSERT(reporter, pt == SkPoint::Make(0, 0)); - REPORTER_ASSERT(reporter, !p.getLastPt(nullptr)); - REPORTER_ASSERT(reporter, !p.getLastPt(&pt) && pt == SkPoint::Make(0, 0)); - p.setLastPt(10, 10); - pt = p.getPoint(0); - REPORTER_ASSERT(reporter, pt == SkPoint::Make(10, 10)); - REPORTER_ASSERT(reporter, p.getLastPt(nullptr)); - p.rMoveTo(10, 10); - REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt == SkPoint::Make(20, 20)); -} - -static void test_contains(skiatest::Reporter* reporter) { - SkPath p; - p.moveTo(SkBits2Float(0xe085e7b1), SkBits2Float(0x5f512c00)); // -7.7191e+19f, 1.50724e+19f - p.conicTo(SkBits2Float(0xdfdaa221), SkBits2Float(0x5eaac338), SkBits2Float(0x60342f13), SkBits2Float(0xdf0cbb58), SkBits2Float(0x3f3504f3)); // -3.15084e+19f, 6.15237e+18f, 5.19345e+19f, -1.01408e+19f, 0.707107f - p.conicTo(SkBits2Float(0x60ead799), SkBits2Float(0xdfb76c24), SkBits2Float(0x609b9872), SkBits2Float(0xdf730de8), SkBits2Float(0x3f3504f4)); // 1.35377e+20f, -2.6434e+19f, 8.96947e+19f, -1.75139e+19f, 0.707107f - p.lineTo(SkBits2Float(0x609b9872), SkBits2Float(0xdf730de8)); // 8.96947e+19f, -1.75139e+19f - p.conicTo(SkBits2Float(0x6018b296), SkBits2Float(0xdeee870d), SkBits2Float(0xe008cd8e), SkBits2Float(0x5ed5b2db), SkBits2Float(0x3f3504f3)); // 4.40121e+19f, -8.59386e+18f, -3.94308e+19f, 7.69931e+18f, 0.707107f - p.conicTo(SkBits2Float(0xe0d526d9), SkBits2Float(0x5fa67b31), SkBits2Float(0xe085e7b2), SkBits2Float(0x5f512c01), SkBits2Float(0x3f3504f3)); // -1.22874e+20f, 2.39925e+19f, -7.7191e+19f, 1.50724e+19f, 0.707107f - // this may return true or false, depending on the platform's numerics, but it should not crash - (void) p.contains(-77.2027664f, 15.3066053f); - - p.reset(); - p.setFillType(SkPath::kInverseWinding_FillType); - REPORTER_ASSERT(reporter, p.contains(0, 0)); - p.setFillType(SkPath::kWinding_FillType); - REPORTER_ASSERT(reporter, !p.contains(0, 0)); - p.moveTo(4, 4); - p.lineTo(6, 8); - p.lineTo(8, 4); - // test on edge - REPORTER_ASSERT(reporter, p.contains(6, 4)); - REPORTER_ASSERT(reporter, p.contains(5, 6)); - REPORTER_ASSERT(reporter, p.contains(7, 6)); - // test quick reject - REPORTER_ASSERT(reporter, !p.contains(4, 0)); - REPORTER_ASSERT(reporter, !p.contains(0, 4)); - REPORTER_ASSERT(reporter, !p.contains(4, 10)); - REPORTER_ASSERT(reporter, !p.contains(10, 4)); - // test various crossings in x - REPORTER_ASSERT(reporter, !p.contains(5, 7)); - REPORTER_ASSERT(reporter, p.contains(6, 7)); - REPORTER_ASSERT(reporter, !p.contains(7, 7)); - p.reset(); - p.moveTo(4, 4); - p.lineTo(8, 6); - p.lineTo(4, 8); - // test on edge - REPORTER_ASSERT(reporter, p.contains(4, 6)); - REPORTER_ASSERT(reporter, p.contains(6, 5)); - REPORTER_ASSERT(reporter, p.contains(6, 7)); - // test various crossings in y - REPORTER_ASSERT(reporter, !p.contains(7, 5)); - REPORTER_ASSERT(reporter, p.contains(7, 6)); - REPORTER_ASSERT(reporter, !p.contains(7, 7)); - p.reset(); - p.moveTo(4, 4); - p.lineTo(8, 4); - p.lineTo(8, 8); - p.lineTo(4, 8); - // test on vertices - REPORTER_ASSERT(reporter, p.contains(4, 4)); - REPORTER_ASSERT(reporter, p.contains(8, 4)); - REPORTER_ASSERT(reporter, p.contains(8, 8)); - REPORTER_ASSERT(reporter, p.contains(4, 8)); - p.reset(); - p.moveTo(4, 4); - p.lineTo(6, 8); - p.lineTo(2, 8); - // test on edge - REPORTER_ASSERT(reporter, p.contains(5, 6)); - REPORTER_ASSERT(reporter, p.contains(4, 8)); - REPORTER_ASSERT(reporter, p.contains(3, 6)); - p.reset(); - p.moveTo(4, 4); - p.lineTo(0, 6); - p.lineTo(4, 8); - // test on edge - REPORTER_ASSERT(reporter, p.contains(2, 5)); - REPORTER_ASSERT(reporter, p.contains(2, 7)); - REPORTER_ASSERT(reporter, p.contains(4, 6)); - // test canceling coincident edge (a smaller triangle is coincident with a larger one) - p.reset(); - p.moveTo(4, 0); - p.lineTo(6, 4); - p.lineTo(2, 4); - p.moveTo(4, 0); - p.lineTo(0, 8); - p.lineTo(8, 8); - REPORTER_ASSERT(reporter, !p.contains(1, 2)); - REPORTER_ASSERT(reporter, !p.contains(3, 2)); - REPORTER_ASSERT(reporter, !p.contains(4, 0)); - REPORTER_ASSERT(reporter, p.contains(4, 4)); - - // test quads - p.reset(); - p.moveTo(4, 4); - p.quadTo(6, 6, 8, 8); - p.quadTo(6, 8, 4, 8); - p.quadTo(4, 6, 4, 4); - REPORTER_ASSERT(reporter, p.contains(5, 6)); - REPORTER_ASSERT(reporter, !p.contains(6, 5)); - // test quad edge - REPORTER_ASSERT(reporter, p.contains(5, 5)); - REPORTER_ASSERT(reporter, p.contains(5, 8)); - REPORTER_ASSERT(reporter, p.contains(4, 5)); - // test quad endpoints - REPORTER_ASSERT(reporter, p.contains(4, 4)); - REPORTER_ASSERT(reporter, p.contains(8, 8)); - REPORTER_ASSERT(reporter, p.contains(4, 8)); - - p.reset(); - const SkPoint qPts[] = {{6, 6}, {8, 8}, {6, 8}, {4, 8}, {4, 6}, {4, 4}, {6, 6}}; - p.moveTo(qPts[0]); - for (int index = 1; index < (int) SK_ARRAY_COUNT(qPts); index += 2) { - p.quadTo(qPts[index], qPts[index + 1]); - } - REPORTER_ASSERT(reporter, p.contains(5, 6)); - REPORTER_ASSERT(reporter, !p.contains(6, 5)); - // test quad edge - SkPoint halfway; - for (int index = 0; index < (int) SK_ARRAY_COUNT(qPts) - 2; index += 2) { - SkEvalQuadAt(&qPts[index], 0.5f, &halfway, nullptr); - REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY)); - } - - // test conics - p.reset(); - const SkPoint kPts[] = {{4, 4}, {6, 6}, {8, 8}, {6, 8}, {4, 8}, {4, 6}, {4, 4}}; - p.moveTo(kPts[0]); - for (int index = 1; index < (int) SK_ARRAY_COUNT(kPts); index += 2) { - p.conicTo(kPts[index], kPts[index + 1], 0.5f); - } - REPORTER_ASSERT(reporter, p.contains(5, 6)); - REPORTER_ASSERT(reporter, !p.contains(6, 5)); - // test conic edge - for (int index = 0; index < (int) SK_ARRAY_COUNT(kPts) - 2; index += 2) { - SkConic conic(&kPts[index], 0.5f); - halfway = conic.evalAt(0.5f); - REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY)); - } - // test conic end points - REPORTER_ASSERT(reporter, p.contains(4, 4)); - REPORTER_ASSERT(reporter, p.contains(8, 8)); - REPORTER_ASSERT(reporter, p.contains(4, 8)); - - // test cubics - SkPoint pts[] = {{5, 4}, {6, 5}, {7, 6}, {6, 6}, {4, 6}, {5, 7}, {5, 5}, {5, 4}, {6, 5}, {7, 6}}; - for (int i = 0; i < 3; ++i) { - p.reset(); - p.setFillType(SkPath::kEvenOdd_FillType); - p.moveTo(pts[i].fX, pts[i].fY); - p.cubicTo(pts[i + 1].fX, pts[i + 1].fY, pts[i + 2].fX, pts[i + 2].fY, pts[i + 3].fX, pts[i + 3].fY); - p.cubicTo(pts[i + 4].fX, pts[i + 4].fY, pts[i + 5].fX, pts[i + 5].fY, pts[i + 6].fX, pts[i + 6].fY); - p.close(); - REPORTER_ASSERT(reporter, p.contains(5.5f, 5.5f)); - REPORTER_ASSERT(reporter, !p.contains(4.5f, 5.5f)); - // test cubic edge - SkEvalCubicAt(&pts[i], 0.5f, &halfway, nullptr, nullptr); - REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY)); - SkEvalCubicAt(&pts[i + 3], 0.5f, &halfway, nullptr, nullptr); - REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY)); - // test cubic end points - REPORTER_ASSERT(reporter, p.contains(pts[i].fX, pts[i].fY)); - REPORTER_ASSERT(reporter, p.contains(pts[i + 3].fX, pts[i + 3].fY)); - REPORTER_ASSERT(reporter, p.contains(pts[i + 6].fX, pts[i + 6].fY)); - } -} - -class PathRefTest_Private { -public: - static void TestPathRef(skiatest::Reporter* reporter) { - static const int kRepeatCnt = 10; - - sk_sp<SkPathRef> pathRef(new SkPathRef); - - SkPathRef::Editor ed(&pathRef); - - { - ed.growForRepeatedVerb(SkPath::kMove_Verb, kRepeatCnt); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints()); - REPORTER_ASSERT(reporter, 0 == pathRef->getSegmentMasks()); - for (int i = 0; i < kRepeatCnt; ++i) { - REPORTER_ASSERT(reporter, SkPath::kMove_Verb == pathRef->atVerb(i)); - } - ed.resetToSize(0, 0, 0); - } - - { - ed.growForRepeatedVerb(SkPath::kLine_Verb, kRepeatCnt); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints()); - REPORTER_ASSERT(reporter, SkPath::kLine_SegmentMask == pathRef->getSegmentMasks()); - for (int i = 0; i < kRepeatCnt; ++i) { - REPORTER_ASSERT(reporter, SkPath::kLine_Verb == pathRef->atVerb(i)); - } - ed.resetToSize(0, 0, 0); - } - - { - ed.growForRepeatedVerb(SkPath::kQuad_Verb, kRepeatCnt); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); - REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints()); - REPORTER_ASSERT(reporter, SkPath::kQuad_SegmentMask == pathRef->getSegmentMasks()); - for (int i = 0; i < kRepeatCnt; ++i) { - REPORTER_ASSERT(reporter, SkPath::kQuad_Verb == pathRef->atVerb(i)); - } - ed.resetToSize(0, 0, 0); - } - - { - SkScalar* weights = nullptr; - ed.growForRepeatedVerb(SkPath::kConic_Verb, kRepeatCnt, &weights); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); - REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints()); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countWeights()); - REPORTER_ASSERT(reporter, SkPath::kConic_SegmentMask == pathRef->getSegmentMasks()); - REPORTER_ASSERT(reporter, weights); - for (int i = 0; i < kRepeatCnt; ++i) { - REPORTER_ASSERT(reporter, SkPath::kConic_Verb == pathRef->atVerb(i)); - } - ed.resetToSize(0, 0, 0); - } - - { - ed.growForRepeatedVerb(SkPath::kCubic_Verb, kRepeatCnt); - REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); - REPORTER_ASSERT(reporter, 3*kRepeatCnt == pathRef->countPoints()); - REPORTER_ASSERT(reporter, SkPath::kCubic_SegmentMask == pathRef->getSegmentMasks()); - for (int i = 0; i < kRepeatCnt; ++i) { - REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == pathRef->atVerb(i)); - } - ed.resetToSize(0, 0, 0); - } - } -}; - -static void test_operatorEqual(skiatest::Reporter* reporter) { - SkPath a; - SkPath b; - REPORTER_ASSERT(reporter, a == a); - REPORTER_ASSERT(reporter, a == b); - a.setFillType(SkPath::kInverseWinding_FillType); - REPORTER_ASSERT(reporter, a != b); - a.reset(); - REPORTER_ASSERT(reporter, a == b); - a.lineTo(1, 1); - REPORTER_ASSERT(reporter, a != b); - a.reset(); - REPORTER_ASSERT(reporter, a == b); - a.lineTo(1, 1); - b.lineTo(1, 2); - REPORTER_ASSERT(reporter, a != b); - a.reset(); - a.lineTo(1, 2); - REPORTER_ASSERT(reporter, a == b); -} - -static void compare_dump(skiatest::Reporter* reporter, const SkPath& path, bool force, - bool dumpAsHex, const char* str) { - SkDynamicMemoryWStream wStream; - path.dump(&wStream, force, dumpAsHex); - sk_sp<SkData> data = wStream.detachAsData(); - REPORTER_ASSERT(reporter, data->size() == strlen(str)); - if (strlen(str) > 0) { - REPORTER_ASSERT(reporter, !memcmp(data->data(), str, strlen(str))); - } else { - REPORTER_ASSERT(reporter, data->data() == nullptr || !memcmp(data->data(), str, strlen(str))); - } -} - -static void test_dump(skiatest::Reporter* reporter) { - SkPath p; - compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kWinding_FillType);\n"); - compare_dump(reporter, p, true, false, "path.setFillType(SkPath::kWinding_FillType);\n"); - p.moveTo(1, 2); - p.lineTo(3, 4); - compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kWinding_FillType);\n" - "path.moveTo(1, 2);\n" - "path.lineTo(3, 4);\n"); - compare_dump(reporter, p, true, false, "path.setFillType(SkPath::kWinding_FillType);\n" - "path.moveTo(1, 2);\n" - "path.lineTo(3, 4);\n" - "path.lineTo(1, 2);\n" - "path.close();\n"); - p.reset(); - p.setFillType(SkPath::kEvenOdd_FillType); - p.moveTo(1, 2); - p.quadTo(3, 4, 5, 6); - compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kEvenOdd_FillType);\n" - "path.moveTo(1, 2);\n" - "path.quadTo(3, 4, 5, 6);\n"); - p.reset(); - p.setFillType(SkPath::kInverseWinding_FillType); - p.moveTo(1, 2); - p.conicTo(3, 4, 5, 6, 0.5f); - compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kInverseWinding_FillType);\n" - "path.moveTo(1, 2);\n" - "path.conicTo(3, 4, 5, 6, 0.5f);\n"); - p.reset(); - p.setFillType(SkPath::kInverseEvenOdd_FillType); - p.moveTo(1, 2); - p.cubicTo(3, 4, 5, 6, 7, 8); - compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kInverseEvenOdd_FillType);\n" - "path.moveTo(1, 2);\n" - "path.cubicTo(3, 4, 5, 6, 7, 8);\n"); - p.reset(); - p.setFillType(SkPath::kWinding_FillType); - p.moveTo(1, 2); - p.lineTo(3, 4); - compare_dump(reporter, p, false, true, - "path.setFillType(SkPath::kWinding_FillType);\n" - "path.moveTo(SkBits2Float(0x3f800000), SkBits2Float(0x40000000)); // 1, 2\n" - "path.lineTo(SkBits2Float(0x40400000), SkBits2Float(0x40800000)); // 3, 4\n"); - p.reset(); - p.moveTo(SkBits2Float(0x3f800000), SkBits2Float(0x40000000)); - p.lineTo(SkBits2Float(0x40400000), SkBits2Float(0x40800000)); - compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kWinding_FillType);\n" - "path.moveTo(1, 2);\n" - "path.lineTo(3, 4);\n"); -} - -namespace { - -class ChangeListener : public SkPathRef::GenIDChangeListener { -public: - ChangeListener(bool *changed) : fChanged(changed) { *fChanged = false; } - ~ChangeListener() override {} - void onChange() override { - *fChanged = true; - } -private: - bool* fChanged; -}; - -} - -class PathTest_Private { -public: - static void TestPathTo(skiatest::Reporter* reporter) { - SkPath p, q; - p.lineTo(4, 4); - p.reversePathTo(q); - check_path_is_line(reporter, &p, 4, 4); - q.moveTo(-4, -4); - p.reversePathTo(q); - check_path_is_line(reporter, &p, 4, 4); - q.lineTo(7, 8); - q.conicTo(8, 7, 6, 5, 0.5f); - q.quadTo(6, 7, 8, 6); - q.cubicTo(5, 6, 7, 8, 7, 5); - q.close(); - p.reversePathTo(q); - SkRect reverseExpected = {-4, -4, 8, 8}; - REPORTER_ASSERT(reporter, p.getBounds() == reverseExpected); - } - - static void TestPathrefListeners(skiatest::Reporter* reporter) { - SkPath p; - - bool changed = false; - p.moveTo(0, 0); - - // Check that listener is notified on moveTo(). - - SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed)); - REPORTER_ASSERT(reporter, !changed); - p.moveTo(10, 0); - REPORTER_ASSERT(reporter, changed); - - // Check that listener is notified on lineTo(). - SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed)); - REPORTER_ASSERT(reporter, !changed); - p.lineTo(20, 0); - REPORTER_ASSERT(reporter, changed); - - // Check that listener is notified on reset(). - SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed)); - REPORTER_ASSERT(reporter, !changed); - p.reset(); - REPORTER_ASSERT(reporter, changed); - - p.moveTo(0, 0); - - // Check that listener is notified on rewind(). - SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed)); - REPORTER_ASSERT(reporter, !changed); - p.rewind(); - REPORTER_ASSERT(reporter, changed); - - // Check that listener is notified when pathref is deleted. - { - SkPath q; - q.moveTo(10, 10); - SkPathPriv::AddGenIDChangeListener(q, new ChangeListener(&changed)); - REPORTER_ASSERT(reporter, !changed); - } - // q went out of scope. - REPORTER_ASSERT(reporter, changed); - } -}; - -static void test_crbug_629455(skiatest::Reporter* reporter) { - SkPath path; - path.moveTo(0, 0); - path.cubicTo(SkBits2Float(0xcdcdcd00), SkBits2Float(0xcdcdcdcd), - SkBits2Float(0xcdcdcdcd), SkBits2Float(0xcdcdcdcd), - SkBits2Float(0x423fcdcd), SkBits2Float(0x40ed9341)); -// AKA: cubicTo(-4.31596e+08f, -4.31602e+08f, -4.31602e+08f, -4.31602e+08f, 47.951f, 7.42423f); - path.lineTo(0, 0); - - auto surface = SkSurface::MakeRasterN32Premul(100, 100); - SkPaint paint; - paint.setAntiAlias(true); - surface->getCanvas()->drawPath(path, paint); -} - -static void test_fuzz_crbug_662952(skiatest::Reporter* reporter) { - SkPath path; - path.moveTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f - path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411c0000)); // 8.65f, 9.75f - path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411e6666)); // 8.65f, 9.9f - path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411e6666)); // 8.6f, 9.9f - path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f - path.close(); - - auto surface = SkSurface::MakeRasterN32Premul(100, 100); - SkPaint paint; - paint.setAntiAlias(true); - surface->getCanvas()->clipPath(path, true); - surface->getCanvas()->drawRect(SkRect::MakeWH(100, 100), paint); -} - -static void test_path_crbugskia6003() { - auto surface(SkSurface::MakeRasterN32Premul(500, 500)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint paint; - paint.setAntiAlias(true); - SkPath path; - path.moveTo(SkBits2Float(0x4325e666), SkBits2Float(0x42a1999a)); // 165.9f, 80.8f - path.lineTo(SkBits2Float(0x4325e666), SkBits2Float(0x42a2999a)); // 165.9f, 81.3f - path.lineTo(SkBits2Float(0x4325b333), SkBits2Float(0x42a2999a)); // 165.7f, 81.3f - path.lineTo(SkBits2Float(0x4325b333), SkBits2Float(0x42a16666)); // 165.7f, 80.7f - path.lineTo(SkBits2Float(0x4325b333), SkBits2Float(0x429f6666)); // 165.7f, 79.7f - // 165.7f, 79.7f, 165.8f, 79.7f, 165.8f, 79.7f - path.cubicTo(SkBits2Float(0x4325b333), SkBits2Float(0x429f6666), SkBits2Float(0x4325cccc), - SkBits2Float(0x429f6666), SkBits2Float(0x4325cccc), SkBits2Float(0x429f6666)); - // 165.8f, 79.7f, 165.8f, 79.7f, 165.9f, 79.7f - path.cubicTo(SkBits2Float(0x4325cccc), SkBits2Float(0x429f6666), SkBits2Float(0x4325cccc), - SkBits2Float(0x429f6666), SkBits2Float(0x4325e666), SkBits2Float(0x429f6666)); - path.lineTo(SkBits2Float(0x4325e666), SkBits2Float(0x42a1999a)); // 165.9f, 80.8f - path.close(); - canvas->clipPath(path, true); - canvas->drawRect(SkRect::MakeWH(500, 500), paint); -} - -static void test_fuzz_crbug_662730(skiatest::Reporter* reporter) { - SkPath path; - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.lineTo(SkBits2Float(0xd5394437), SkBits2Float(0x37373737)); // -1.2731e+13f, 1.09205e-05f - path.lineTo(SkBits2Float(0x37373737), SkBits2Float(0x37373737)); // 1.09205e-05f, 1.09205e-05f - path.lineTo(SkBits2Float(0x37373745), SkBits2Float(0x0001b800)); // 1.09205e-05f, 1.57842e-40f - path.close(); - - auto surface = SkSurface::MakeRasterN32Premul(100, 100); - SkPaint paint; - paint.setAntiAlias(true); - surface->getCanvas()->drawPath(path, paint); -} - -#if !defined(SK_SUPPORT_LEGACY_DELTA_AA) -static void test_skbug_6947() { - SkPath path; - SkPoint points[] = - {{125.126022f, -0.499872506f}, {125.288895f, -0.499338806f}, - {125.299316f, -0.499290764f}, {126.294594f, 0.505449712f}, - {125.999992f, 62.5047531f}, {124.0f, 62.4980202f}, - {124.122749f, 0.498142242f}, {125.126022f, -0.499872506f}, - {125.119476f, 1.50011659f}, {125.122749f, 0.50012207f}, - {126.122749f, 0.502101898f}, {126.0f, 62.5019798f}, - {125.0f, 62.5f}, {124.000008f, 62.4952469f}, - {124.294609f, 0.495946467f}, {125.294601f, 0.50069809f}, - {125.289886f, 1.50068688f}, {125.282349f, 1.50065041f}, - {125.119476f, 1.50011659f}}; - constexpr SkPath::Verb kMove = SkPath::kMove_Verb; - constexpr SkPath::Verb kLine = SkPath::kLine_Verb; - constexpr SkPath::Verb kClose = SkPath::kClose_Verb; - SkPath::Verb verbs[] = {kMove, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kClose, - kMove, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kClose}; - int pointIndex = 0; - for(auto verb : verbs) { - switch (verb) { - case kMove: - path.moveTo(points[pointIndex++]); - break; - case kLine: - path.lineTo(points[pointIndex++]); - break; - case kClose: - default: - path.close(); - break; - } - } - - auto surface = SkSurface::MakeRasterN32Premul(250, 125); - SkPaint paint; - paint.setAntiAlias(true); - surface->getCanvas()->drawPath(path, paint); -} -#endif - -static void test_interp(skiatest::Reporter* reporter) { - SkPath p1, p2, out; - REPORTER_ASSERT(reporter, p1.isInterpolatable(p2)); - REPORTER_ASSERT(reporter, p1.interpolate(p2, 0, &out)); - REPORTER_ASSERT(reporter, p1 == out); - REPORTER_ASSERT(reporter, p1.interpolate(p2, 1, &out)); - REPORTER_ASSERT(reporter, p1 == out); - p1.moveTo(0, 2); - p1.lineTo(0, 4); - REPORTER_ASSERT(reporter, !p1.isInterpolatable(p2)); - REPORTER_ASSERT(reporter, !p1.interpolate(p2, 1, &out)); - p2.moveTo(6, 0); - p2.lineTo(8, 0); - REPORTER_ASSERT(reporter, p1.isInterpolatable(p2)); - REPORTER_ASSERT(reporter, p1.interpolate(p2, 0, &out)); - REPORTER_ASSERT(reporter, p2 == out); - REPORTER_ASSERT(reporter, p1.interpolate(p2, 1, &out)); - REPORTER_ASSERT(reporter, p1 == out); - REPORTER_ASSERT(reporter, p1.interpolate(p2, 0.5f, &out)); - REPORTER_ASSERT(reporter, out.getBounds() == SkRect::MakeLTRB(3, 1, 4, 2)); - p1.reset(); - p1.moveTo(4, 4); - p1.conicTo(5, 4, 5, 5, 1 / SkScalarSqrt(2)); - p2.reset(); - p2.moveTo(4, 2); - p2.conicTo(7, 2, 7, 5, 1 / SkScalarSqrt(2)); - REPORTER_ASSERT(reporter, p1.isInterpolatable(p2)); - REPORTER_ASSERT(reporter, p1.interpolate(p2, 0.5f, &out)); - REPORTER_ASSERT(reporter, out.getBounds() == SkRect::MakeLTRB(4, 3, 6, 5)); - p2.reset(); - p2.moveTo(4, 2); - p2.conicTo(6, 3, 6, 5, 1); - REPORTER_ASSERT(reporter, !p1.isInterpolatable(p2)); - p2.reset(); - p2.moveTo(4, 4); - p2.conicTo(5, 4, 5, 5, 0.5f); - REPORTER_ASSERT(reporter, !p1.isInterpolatable(p2)); -} - -DEF_TEST(PathInterp, reporter) { - test_interp(reporter); -} - -#include "SkSurface.h" -DEF_TEST(PathBigCubic, reporter) { - SkPath path; - path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 - path.moveTo(SkBits2Float(0x44000000), SkBits2Float(0x373938b8)); // 512, 1.10401e-05f - path.cubicTo(SkBits2Float(0x00000001), SkBits2Float(0xdf000052), SkBits2Float(0x00000100), SkBits2Float(0x00000000), SkBits2Float(0x00000100), SkBits2Float(0x00000000)); // 1.4013e-45f, -9.22346e+18f, 3.58732e-43f, 0, 3.58732e-43f, 0 - path.moveTo(0, 512); - - // this call should not assert - SkSurface::MakeRasterN32Premul(255, 255, nullptr)->getCanvas()->drawPath(path, SkPaint()); -} - -DEF_TEST(PathContains, reporter) { - test_contains(reporter); -} - -DEF_TEST(Paths, reporter) { - test_fuzz_crbug_647922(); - test_fuzz_crbug_643933(); - test_sect_with_horizontal_needs_pinning(); - test_crbug_629455(reporter); - test_fuzz_crbug_627414(reporter); - test_path_crbug364224(); - test_fuzz_crbug_662952(reporter); - test_fuzz_crbug_662730(reporter); - test_fuzz_crbug_662780(); - test_mask_overflow(); - test_path_crbugskia6003(); - test_fuzz_crbug_668907(); -#if !defined(SK_SUPPORT_LEGACY_DELTA_AA) - test_skbug_6947(); -#endif - - SkSize::Make(3, 4); - - SkPath p, empty; - SkRect bounds, bounds2; - test_empty(reporter, p); - - REPORTER_ASSERT(reporter, p.getBounds().isEmpty()); - - // this triggers a code path in SkPath::operator= which is otherwise unexercised - SkPath& self = p; - p = self; - - // this triggers a code path in SkPath::swap which is otherwise unexercised - p.swap(self); - - bounds.set(0, 0, SK_Scalar1, SK_Scalar1); - - p.addRoundRect(bounds, SK_Scalar1, SK_Scalar1); - check_convex_bounds(reporter, p, bounds); - // we have quads or cubics - REPORTER_ASSERT(reporter, - p.getSegmentMasks() & (kCurveSegmentMask | SkPath::kConic_SegmentMask)); - REPORTER_ASSERT(reporter, !p.isEmpty()); - - p.reset(); - test_empty(reporter, p); - - p.addOval(bounds); - check_convex_bounds(reporter, p, bounds); - REPORTER_ASSERT(reporter, !p.isEmpty()); - - p.rewind(); - test_empty(reporter, p); - - p.addRect(bounds); - check_convex_bounds(reporter, p, bounds); - // we have only lines - REPORTER_ASSERT(reporter, SkPath::kLine_SegmentMask == p.getSegmentMasks()); - REPORTER_ASSERT(reporter, !p.isEmpty()); - - REPORTER_ASSERT(reporter, p != empty); - REPORTER_ASSERT(reporter, !(p == empty)); - - // do getPoints and getVerbs return the right result - REPORTER_ASSERT(reporter, p.getPoints(nullptr, 0) == 4); - REPORTER_ASSERT(reporter, p.getVerbs(nullptr, 0) == 5); - SkPoint pts[4]; - int count = p.getPoints(pts, 4); - REPORTER_ASSERT(reporter, count == 4); - uint8_t verbs[6]; - verbs[5] = 0xff; - p.getVerbs(verbs, 5); - REPORTER_ASSERT(reporter, SkPath::kMove_Verb == verbs[0]); - REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[1]); - REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[2]); - REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[3]); - REPORTER_ASSERT(reporter, SkPath::kClose_Verb == verbs[4]); - REPORTER_ASSERT(reporter, 0xff == verbs[5]); - bounds2.set(pts, 4); - REPORTER_ASSERT(reporter, bounds == bounds2); - - bounds.offset(SK_Scalar1*3, SK_Scalar1*4); - p.offset(SK_Scalar1*3, SK_Scalar1*4); - REPORTER_ASSERT(reporter, bounds == p.getBounds()); - - REPORTER_ASSERT(reporter, p.isRect(nullptr)); - bounds2.setEmpty(); - REPORTER_ASSERT(reporter, p.isRect(&bounds2)); - REPORTER_ASSERT(reporter, bounds == bounds2); - - // now force p to not be a rect - bounds.set(0, 0, SK_Scalar1/2, SK_Scalar1/2); - p.addRect(bounds); - REPORTER_ASSERT(reporter, !p.isRect(nullptr)); - - // Test an edge case w.r.t. the bound returned by isRect (i.e., the - // path has a trailing moveTo. Please see crbug.com\445368) - { - SkRect r; - p.reset(); - p.addRect(bounds); - REPORTER_ASSERT(reporter, p.isRect(&r)); - REPORTER_ASSERT(reporter, r == bounds); - // add a moveTo outside of our bounds - p.moveTo(bounds.fLeft + 10, bounds.fBottom + 10); - REPORTER_ASSERT(reporter, p.isRect(&r)); - REPORTER_ASSERT(reporter, r == bounds); - } - - test_operatorEqual(reporter); - test_isLine(reporter); - test_isRect(reporter); - test_is_simple_closed_rect(reporter); - test_isNestedFillRects(reporter); - test_zero_length_paths(reporter); - test_direction(reporter); - test_convexity(reporter); - test_convexity2(reporter); - test_conservativelyContains(reporter); - test_close(reporter); - test_segment_masks(reporter); - test_flattening(reporter); - test_transform(reporter); - test_bounds(reporter); - test_iter(reporter); - test_raw_iter(reporter); - test_circle(reporter); - test_oval(reporter); - test_strokerec(reporter); - test_addPoly(reporter); - test_isfinite(reporter); - test_isfinite_after_transform(reporter); - test_islastcontourclosed(reporter); - test_arb_round_rect_is_convex(reporter); - test_arb_zero_rad_round_rect_is_rect(reporter); - test_addrect(reporter); - test_addrect_isfinite(reporter); - test_tricky_cubic(); - test_clipped_cubic(); - test_crbug_170666(); - test_crbug_493450(reporter); - test_crbug_495894(reporter); - test_crbug_613918(); - test_bad_cubic_crbug229478(); - test_bad_cubic_crbug234190(); - test_gen_id(reporter); - test_path_close_issue1474(reporter); - test_path_to_region(reporter); - test_rrect(reporter); - test_arc(reporter); - test_arc_ovals(reporter); - test_arcTo(reporter); - test_addPath(reporter); - test_addPathMode(reporter, false, false); - test_addPathMode(reporter, true, false); - test_addPathMode(reporter, false, true); - test_addPathMode(reporter, true, true); - test_extendClosedPath(reporter); - test_addEmptyPath(reporter, SkPath::kExtend_AddPathMode); - test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); - test_conicTo_special_case(reporter); - test_get_point(reporter); - test_contains(reporter); - PathTest_Private::TestPathTo(reporter); - PathRefTest_Private::TestPathRef(reporter); - PathTest_Private::TestPathrefListeners(reporter); - test_dump(reporter); - test_path_crbug389050(reporter); - test_path_crbugskia2820(reporter); - test_path_crbugskia5995(); - test_skbug_3469(reporter); - test_skbug_3239(reporter); - test_bounds_crbug_513799(reporter); - test_fuzz_crbug_638223(); -} - -DEF_TEST(conservatively_contains_rect, reporter) { - SkPath path; - - path.moveTo(SkBits2Float(0x44000000), SkBits2Float(0x373938b8)); // 512, 1.10401e-05f - // 1.4013e-45f, -9.22346e+18f, 3.58732e-43f, 0, 3.58732e-43f, 0 - path.cubicTo(SkBits2Float(0x00000001), SkBits2Float(0xdf000052), - SkBits2Float(0x00000100), SkBits2Float(0x00000000), - SkBits2Float(0x00000100), SkBits2Float(0x00000000)); - path.moveTo(0, 0); - - // this guy should not assert - path.conservativelyContainsRect({ -211747, 12.1115f, -197893, 25.0321f }); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -static void rand_path(SkPath* path, SkRandom& rand, SkPath::Verb verb, int n) { - for (int i = 0; i < n; ++i) { - switch (verb) { - case SkPath::kLine_Verb: - path->lineTo(rand.nextF()*100, rand.nextF()*100); - break; - case SkPath::kQuad_Verb: - path->quadTo(rand.nextF()*100, rand.nextF()*100, - rand.nextF()*100, rand.nextF()*100); - break; - case SkPath::kConic_Verb: - path->conicTo(rand.nextF()*100, rand.nextF()*100, - rand.nextF()*100, rand.nextF()*100, rand.nextF()*10); - break; - case SkPath::kCubic_Verb: - path->cubicTo(rand.nextF()*100, rand.nextF()*100, - rand.nextF()*100, rand.nextF()*100, - rand.nextF()*100, rand.nextF()*100); - break; - default: - SkASSERT(false); - } - } -} - -#include "SkPathOps.h" -DEF_TEST(path_tight_bounds, reporter) { - SkRandom rand; - - const SkPath::Verb verbs[] = { - SkPath::kLine_Verb, SkPath::kQuad_Verb, SkPath::kConic_Verb, SkPath::kCubic_Verb, - }; - for (int i = 0; i < 1000; ++i) { - for (int n = 1; n <= 10; n += 9) { - for (SkPath::Verb verb : verbs) { - SkPath path; - rand_path(&path, rand, verb, n); - SkRect bounds = path.getBounds(); - SkRect tight = path.computeTightBounds(); - REPORTER_ASSERT(reporter, bounds.contains(tight)); - - SkRect tight2; - TightBounds(path, &tight2); - REPORTER_ASSERT(reporter, nearly_equal(tight, tight2)); - } - } - } -} - -DEF_TEST(skbug_6450, r) { - SkRect ri = { 0.18554693f, 195.26283f, 0.185784385f, 752.644409f }; - SkVector rdi[4] = { - { 1.81159976e-09f, 7.58768801e-05f }, - { 0.000118725002f, 0.000118725002f }, - { 0.000118725002f, 0.000118725002f }, - { 0.000118725002f, 0.486297607f } - }; - SkRRect irr; - irr.setRectRadii(ri, rdi); - SkRect ro = { 9.18354821e-39f, 2.1710848e+9f, 2.16945843e+9f, 3.47808128e+9f }; - SkVector rdo[4] = { - { 0, 0 }, - { 0.0103298295f, 0.185887396f }, - { 2.52999727e-29f, 169.001938f }, - { 195.262741f, 195.161255f } - }; - SkRRect orr; - orr.setRectRadii(ro, rdo); - SkMakeNullCanvas()->drawDRRect(orr, irr, SkPaint()); -} - -DEF_TEST(PathRefSerialization, reporter) { - SkPath path; - const size_t numMoves = 5; - const size_t numConics = 7; - const size_t numPoints = numMoves + 2 * numConics; - const size_t numVerbs = numMoves + numConics; - for (size_t i = 0; i < numMoves; ++i) path.moveTo(1, 2); - for (size_t i = 0; i < numConics; ++i) path.conicTo(1, 2, 3, 4, 5); - REPORTER_ASSERT(reporter, path.countPoints() == numPoints); - REPORTER_ASSERT(reporter, path.countVerbs() == numVerbs); - - // Verify that path serializes/deserializes properly. - sk_sp<SkData> data = path.serialize(); - size_t bytesWritten = data->size(); - - { - SkPath readBack; - REPORTER_ASSERT(reporter, readBack != path); - size_t bytesRead = readBack.readFromMemory(data->data(), bytesWritten); - REPORTER_ASSERT(reporter, bytesRead == bytesWritten); - REPORTER_ASSERT(reporter, readBack == path); - } - - // uint32_t[] offset into serialized path. - const size_t verbCountOffset = 4; - const size_t pointCountOffset = 5; - const size_t conicCountOffset = 6; - - // Verify that this test is changing the right values. - const int* writtenValues = static_cast<const int*>(data->data()); - REPORTER_ASSERT(reporter, writtenValues[verbCountOffset] == numVerbs); - REPORTER_ASSERT(reporter, writtenValues[pointCountOffset] == numPoints); - REPORTER_ASSERT(reporter, writtenValues[conicCountOffset] == numConics); - - // Too many verbs, points, or conics fails to deserialize silently. - const int tooManyObjects = INT_MAX; - size_t offsets[] = {verbCountOffset, pointCountOffset, conicCountOffset}; - for (size_t i = 0; i < 3; ++i) { - SkAutoMalloc storage_copy(bytesWritten); - memcpy(storage_copy.get(), data->data(), bytesWritten); - static_cast<int*>(storage_copy.get())[offsets[i]] = tooManyObjects; - SkPath readBack; - size_t bytesRead = readBack.readFromMemory(storage_copy.get(), bytesWritten); - REPORTER_ASSERT(reporter, !bytesRead); - } - - // One less byte (rounded down to alignment) than was written will also - // fail to be deserialized. - { - SkPath readBack; - size_t bytesRead = readBack.readFromMemory(data->data(), bytesWritten - 4); - REPORTER_ASSERT(reporter, !bytesRead); - } -} + path.close();
+ check_convexity(reporter, path, SkPath::kConcave_Convexity);
+
+}
+
+static void test_isLine(skiatest::Reporter* reporter) {
+ SkPath path;
+ SkPoint pts[2];
+ const SkScalar value = SkIntToScalar(5);
+
+ REPORTER_ASSERT(reporter, !path.isLine(nullptr));
+
+ // set some non-zero values
+ pts[0].set(value, value);
+ pts[1].set(value, value);
+ REPORTER_ASSERT(reporter, !path.isLine(pts));
+ // check that pts was untouched
+ REPORTER_ASSERT(reporter, pts[0].equals(value, value));
+ REPORTER_ASSERT(reporter, pts[1].equals(value, value));
+
+ const SkScalar moveX = SkIntToScalar(1);
+ const SkScalar moveY = SkIntToScalar(2);
+ REPORTER_ASSERT(reporter, value != moveX && value != moveY);
+
+ path.moveTo(moveX, moveY);
+ REPORTER_ASSERT(reporter, !path.isLine(nullptr));
+ REPORTER_ASSERT(reporter, !path.isLine(pts));
+ // check that pts was untouched
+ REPORTER_ASSERT(reporter, pts[0].equals(value, value));
+ REPORTER_ASSERT(reporter, pts[1].equals(value, value));
+
+ const SkScalar lineX = SkIntToScalar(2);
+ const SkScalar lineY = SkIntToScalar(2);
+ REPORTER_ASSERT(reporter, value != lineX && value != lineY);
+
+ path.lineTo(lineX, lineY);
+ REPORTER_ASSERT(reporter, path.isLine(nullptr));
+
+ REPORTER_ASSERT(reporter, !pts[0].equals(moveX, moveY));
+ REPORTER_ASSERT(reporter, !pts[1].equals(lineX, lineY));
+ REPORTER_ASSERT(reporter, path.isLine(pts));
+ REPORTER_ASSERT(reporter, pts[0].equals(moveX, moveY));
+ REPORTER_ASSERT(reporter, pts[1].equals(lineX, lineY));
+
+ path.lineTo(0, 0); // too many points/verbs
+ REPORTER_ASSERT(reporter, !path.isLine(nullptr));
+ REPORTER_ASSERT(reporter, !path.isLine(pts));
+ REPORTER_ASSERT(reporter, pts[0].equals(moveX, moveY));
+ REPORTER_ASSERT(reporter, pts[1].equals(lineX, lineY));
+
+ path.reset();
+ path.quadTo(1, 1, 2, 2);
+ REPORTER_ASSERT(reporter, !path.isLine(nullptr));
+}
+
+static void test_conservativelyContains(skiatest::Reporter* reporter) {
+ SkPath path;
+
+ // kBaseRect is used to construct most our test paths: a rect, a circle, and a round-rect.
+ static const SkRect kBaseRect = SkRect::MakeWH(SkIntToScalar(100), SkIntToScalar(100));
+
+ // A circle that bounds kBaseRect (with a significant amount of slop)
+ SkScalar circleR = SkMaxScalar(kBaseRect.width(), kBaseRect.height());
+ circleR *= 1.75f / 2;
+ static const SkPoint kCircleC = {kBaseRect.centerX(), kBaseRect.centerY()};
+
+ // round-rect radii
+ static const SkScalar kRRRadii[] = {SkIntToScalar(5), SkIntToScalar(3)};
+
+ static const struct SUPPRESS_VISIBILITY_WARNING {
+ SkRect fQueryRect;
+ bool fInRect;
+ bool fInCircle;
+ bool fInRR;
+ bool fInCubicRR;
+ } kQueries[] = {
+ {kBaseRect, true, true, false, false},
+
+ // rect well inside of kBaseRect
+ {SkRect::MakeLTRB(kBaseRect.fLeft + 0.25f*kBaseRect.width(),
+ kBaseRect.fTop + 0.25f*kBaseRect.height(),
+ kBaseRect.fRight - 0.25f*kBaseRect.width(),
+ kBaseRect.fBottom - 0.25f*kBaseRect.height()),
+ true, true, true, true},
+
+ // rects with edges off by one from kBaseRect's edges
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop,
+ kBaseRect.width(), kBaseRect.height() + 1),
+ false, true, false, false},
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop,
+ kBaseRect.width() + 1, kBaseRect.height()),
+ false, true, false, false},
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop,
+ kBaseRect.width() + 1, kBaseRect.height() + 1),
+ false, true, false, false},
+ {SkRect::MakeXYWH(kBaseRect.fLeft - 1, kBaseRect.fTop,
+ kBaseRect.width(), kBaseRect.height()),
+ false, true, false, false},
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop - 1,
+ kBaseRect.width(), kBaseRect.height()),
+ false, true, false, false},
+ {SkRect::MakeXYWH(kBaseRect.fLeft - 1, kBaseRect.fTop,
+ kBaseRect.width() + 2, kBaseRect.height()),
+ false, true, false, false},
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop - 1,
+ kBaseRect.width() + 2, kBaseRect.height()),
+ false, true, false, false},
+
+ // zero-w/h rects at each corner of kBaseRect
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fTop, 0, 0), true, true, false, false},
+ {SkRect::MakeXYWH(kBaseRect.fRight, kBaseRect.fTop, 0, 0), true, true, false, true},
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.fBottom, 0, 0), true, true, false, true},
+ {SkRect::MakeXYWH(kBaseRect.fRight, kBaseRect.fBottom, 0, 0), true, true, false, true},
+
+ // far away rect
+ {SkRect::MakeXYWH(10 * kBaseRect.fRight, 10 * kBaseRect.fBottom,
+ SkIntToScalar(10), SkIntToScalar(10)),
+ false, false, false, false},
+
+ // very large rect containing kBaseRect
+ {SkRect::MakeXYWH(kBaseRect.fLeft - 5 * kBaseRect.width(),
+ kBaseRect.fTop - 5 * kBaseRect.height(),
+ 11 * kBaseRect.width(), 11 * kBaseRect.height()),
+ false, false, false, false},
+
+ // skinny rect that spans same y-range as kBaseRect
+ {SkRect::MakeXYWH(kBaseRect.centerX(), kBaseRect.fTop,
+ SkIntToScalar(1), kBaseRect.height()),
+ true, true, true, true},
+
+ // short rect that spans same x-range as kBaseRect
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.centerY(), kBaseRect.width(), SkScalar(1)),
+ true, true, true, true},
+
+ // skinny rect that spans slightly larger y-range than kBaseRect
+ {SkRect::MakeXYWH(kBaseRect.centerX(), kBaseRect.fTop,
+ SkIntToScalar(1), kBaseRect.height() + 1),
+ false, true, false, false},
+
+ // short rect that spans slightly larger x-range than kBaseRect
+ {SkRect::MakeXYWH(kBaseRect.fLeft, kBaseRect.centerY(),
+ kBaseRect.width() + 1, SkScalar(1)),
+ false, true, false, false},
+ };
+
+ for (int inv = 0; inv < 4; ++inv) {
+ for (size_t q = 0; q < SK_ARRAY_COUNT(kQueries); ++q) {
+ SkRect qRect = kQueries[q].fQueryRect;
+ if (inv & 0x1) {
+ SkTSwap(qRect.fLeft, qRect.fRight);
+ }
+ if (inv & 0x2) {
+ SkTSwap(qRect.fTop, qRect.fBottom);
+ }
+ for (int d = 0; d < 2; ++d) {
+ SkPath::Direction dir = d ? SkPath::kCCW_Direction : SkPath::kCW_Direction;
+ path.reset();
+ path.addRect(kBaseRect, dir);
+ REPORTER_ASSERT(reporter, kQueries[q].fInRect ==
+ path.conservativelyContainsRect(qRect));
+
+ path.reset();
+ path.addCircle(kCircleC.fX, kCircleC.fY, circleR, dir);
+ REPORTER_ASSERT(reporter, kQueries[q].fInCircle ==
+ path.conservativelyContainsRect(qRect));
+
+ path.reset();
+ path.addRoundRect(kBaseRect, kRRRadii[0], kRRRadii[1], dir);
+ REPORTER_ASSERT(reporter, kQueries[q].fInRR ==
+ path.conservativelyContainsRect(qRect));
+
+ path.reset();
+ path.moveTo(kBaseRect.fLeft + kRRRadii[0], kBaseRect.fTop);
+ path.cubicTo(kBaseRect.fLeft + kRRRadii[0] / 2, kBaseRect.fTop,
+ kBaseRect.fLeft, kBaseRect.fTop + kRRRadii[1] / 2,
+ kBaseRect.fLeft, kBaseRect.fTop + kRRRadii[1]);
+ path.lineTo(kBaseRect.fLeft, kBaseRect.fBottom);
+ path.lineTo(kBaseRect.fRight, kBaseRect.fBottom);
+ path.lineTo(kBaseRect.fRight, kBaseRect.fTop);
+ path.close();
+ REPORTER_ASSERT(reporter, kQueries[q].fInCubicRR ==
+ path.conservativelyContainsRect(qRect));
+
+ }
+ // Slightly non-convex shape, shouldn't contain any rects.
+ path.reset();
+ path.moveTo(0, 0);
+ path.lineTo(SkIntToScalar(50), 0.05f);
+ path.lineTo(SkIntToScalar(100), 0);
+ path.lineTo(SkIntToScalar(100), SkIntToScalar(100));
+ path.lineTo(0, SkIntToScalar(100));
+ path.close();
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(qRect));
+ }
+ }
+
+ // make sure a minimal convex shape works, a right tri with edges along pos x and y axes.
+ path.reset();
+ path.moveTo(0, 0);
+ path.lineTo(SkIntToScalar(100), 0);
+ path.lineTo(0, SkIntToScalar(100));
+
+ // inside, on along top edge
+ REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0,
+ SkIntToScalar(10),
+ SkIntToScalar(10))));
+ // above
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(
+ SkRect::MakeXYWH(SkIntToScalar(50),
+ SkIntToScalar(-10),
+ SkIntToScalar(10),
+ SkIntToScalar(10))));
+ // to the left
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(-10),
+ SkIntToScalar(5),
+ SkIntToScalar(5),
+ SkIntToScalar(5))));
+
+ // outside the diagonal edge
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(10),
+ SkIntToScalar(200),
+ SkIntToScalar(20),
+ SkIntToScalar(5))));
+
+
+ // Test that multiple move commands do not cause asserts.
+
+ // At the time of writing, this would not modify cached convexity. This caused an assert while
+ // checking conservative containment again. https://bug.skia.org/1460
+ path.moveTo(SkIntToScalar(100), SkIntToScalar(100));
+#if 0
+ REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0,
+ SkIntToScalar(10),
+ SkIntToScalar(10))));
+#endif
+
+ // Same as above path and first test but with an extra moveTo.
+ path.reset();
+ path.moveTo(100, 100);
+ path.moveTo(0, 0);
+ path.lineTo(SkIntToScalar(100), 0);
+ path.lineTo(0, SkIntToScalar(100));
+
+ REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0,
+ SkIntToScalar(10),
+ SkIntToScalar(10))));
+
+ // Same as above path and first test but with the extra moveTo making a degenerate sub-path
+ // following the non-empty sub-path. Verifies that this does not trigger assertions.
+ path.reset();
+ path.moveTo(0, 0);
+ path.lineTo(SkIntToScalar(100), 0);
+ path.lineTo(0, SkIntToScalar(100));
+ path.moveTo(100, 100);
+
+ REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0,
+ SkIntToScalar(10),
+ SkIntToScalar(10))));
+
+ // Test that multiple move commands do not cause asserts and that the function
+ // is not confused by the multiple moves.
+ path.reset();
+ path.moveTo(0, 0);
+ path.lineTo(SkIntToScalar(100), 0);
+ path.lineTo(0, SkIntToScalar(100));
+ path.moveTo(0, SkIntToScalar(200));
+ path.lineTo(SkIntToScalar(100), SkIntToScalar(200));
+ path.lineTo(0, SkIntToScalar(300));
+
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(
+ SkRect::MakeXYWH(SkIntToScalar(50), 0,
+ SkIntToScalar(10),
+ SkIntToScalar(10))));
+
+ path.reset();
+ path.lineTo(100, 100);
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(0, 0, 1, 1)));
+
+ // An empty path should not contain any rectangle. It's questionable whether an empty path
+ // contains an empty rectangle. However, since it is a conservative test it is ok to
+ // return false.
+ path.reset();
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeWH(1,1)));
+ REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeWH(0,0)));
+}
+
+static void test_isRect_open_close(skiatest::Reporter* reporter) {
+ SkPath path;
+ bool isClosed;
+
+ path.moveTo(0, 0); path.lineTo(1, 0); path.lineTo(1, 1); path.lineTo(0, 1);
+ path.close();
+
+ REPORTER_ASSERT(reporter, path.isRect(nullptr, &isClosed, nullptr));
+ REPORTER_ASSERT(reporter, isClosed);
+}
+
+// Simple isRect test is inline TestPath, below.
+// test_isRect provides more extensive testing.
+static void test_isRect(skiatest::Reporter* reporter) {
+ test_isRect_open_close(reporter);
+
+ // passing tests (all moveTo / lineTo...
+ SkPoint r1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
+ SkPoint r2[] = {{1, 0}, {1, 1}, {0, 1}, {0, 0}};
+ SkPoint r3[] = {{1, 1}, {0, 1}, {0, 0}, {1, 0}};
+ SkPoint r4[] = {{0, 1}, {0, 0}, {1, 0}, {1, 1}};
+ SkPoint r5[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}};
+ SkPoint r6[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}};
+ SkPoint r7[] = {{1, 1}, {1, 0}, {0, 0}, {0, 1}};
+ SkPoint r8[] = {{1, 0}, {0, 0}, {0, 1}, {1, 1}};
+ SkPoint r9[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}};
+ SkPoint ra[] = {{0, 0}, {0, .5f}, {0, 1}, {.5f, 1}, {1, 1}, {1, .5f}, {1, 0}, {.5f, 0}};
+ SkPoint rb[] = {{0, 0}, {.5f, 0}, {1, 0}, {1, .5f}, {1, 1}, {.5f, 1}, {0, 1}, {0, .5f}};
+ SkPoint rc[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}};
+ SkPoint rd[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}};
+ SkPoint re[] = {{0, 0}, {1, 0}, {1, 0}, {1, 1}, {0, 1}};
+ SkPoint rf[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, 0}};
+
+ // failing tests
+ SkPoint f1[] = {{0, 0}, {1, 0}, {1, 1}}; // too few points
+ SkPoint f2[] = {{0, 0}, {1, 1}, {0, 1}, {1, 0}}; // diagonal
+ SkPoint f3[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}, {1, 0}}; // wraps
+ SkPoint f4[] = {{0, 0}, {1, 0}, {0, 0}, {1, 0}, {1, 1}, {0, 1}}; // backs up
+ SkPoint f5[] = {{0, 0}, {1, 0}, {1, 1}, {2, 0}}; // end overshoots
+ SkPoint f6[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 2}}; // end overshoots
+ SkPoint f7[] = {{0, 0}, {1, 0}, {1, 1}, {0, 2}}; // end overshoots
+ SkPoint f8[] = {{0, 0}, {1, 0}, {1, 1}, {1, 0}}; // 'L'
+ SkPoint f9[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, 0}, {2, 0}}; // overlaps
+ SkPoint fa[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, -1}, {1, -1}}; // non colinear gap
+ SkPoint fb[] = {{1, 0}, {8, 0}, {8, 8}, {0, 8}, {0, 1}}; // falls short
+
+ // no close, but we should detect them as fillably the same as a rect
+ SkPoint c1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
+ SkPoint c2[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}};
+ SkPoint c3[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}, {0, 0}}; // hit the start
+
+ // like c2, but we double-back on ourselves
+ SkPoint d1[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}, {0, 2}};
+ // like c2, but we overshoot the start point
+ SkPoint d2[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, -1}};
+ SkPoint d3[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, -1}, {0, 0}};
+
+ struct IsRectTest {
+ SkPoint *fPoints;
+ int fPointCount;
+ bool fClose;
+ bool fIsRect;
+ } tests[] = {
+ { r1, SK_ARRAY_COUNT(r1), true, true },
+ { r2, SK_ARRAY_COUNT(r2), true, true },
+ { r3, SK_ARRAY_COUNT(r3), true, true },
+ { r4, SK_ARRAY_COUNT(r4), true, true },
+ { r5, SK_ARRAY_COUNT(r5), true, true },
+ { r6, SK_ARRAY_COUNT(r6), true, true },
+ { r7, SK_ARRAY_COUNT(r7), true, true },
+ { r8, SK_ARRAY_COUNT(r8), true, true },
+ { r9, SK_ARRAY_COUNT(r9), true, true },
+ { ra, SK_ARRAY_COUNT(ra), true, true },
+ { rb, SK_ARRAY_COUNT(rb), true, true },
+ { rc, SK_ARRAY_COUNT(rc), true, true },
+ { rd, SK_ARRAY_COUNT(rd), true, true },
+ { re, SK_ARRAY_COUNT(re), true, true },
+ { rf, SK_ARRAY_COUNT(rf), true, true },
+
+ { f1, SK_ARRAY_COUNT(f1), true, false },
+ { f2, SK_ARRAY_COUNT(f2), true, false },
+ { f3, SK_ARRAY_COUNT(f3), true, false },
+ { f4, SK_ARRAY_COUNT(f4), true, false },
+ { f5, SK_ARRAY_COUNT(f5), true, false },
+ { f6, SK_ARRAY_COUNT(f6), true, false },
+ { f7, SK_ARRAY_COUNT(f7), true, false },
+ { f8, SK_ARRAY_COUNT(f8), true, false },
+ { f9, SK_ARRAY_COUNT(f9), true, false },
+ { fa, SK_ARRAY_COUNT(fa), true, false },
+ { fb, SK_ARRAY_COUNT(fb), true, false },
+
+ { c1, SK_ARRAY_COUNT(c1), false, true },
+ { c2, SK_ARRAY_COUNT(c2), false, true },
+ { c3, SK_ARRAY_COUNT(c3), false, true },
+
+ { d1, SK_ARRAY_COUNT(d1), false, false },
+ { d2, SK_ARRAY_COUNT(d2), false, false },
+ { d3, SK_ARRAY_COUNT(d3), false, false },
+ };
+
+ const size_t testCount = SK_ARRAY_COUNT(tests);
+ int index;
+ for (size_t testIndex = 0; testIndex < testCount; ++testIndex) {
+ SkPath path;
+ path.moveTo(tests[testIndex].fPoints[0].fX, tests[testIndex].fPoints[0].fY);
+ for (index = 1; index < tests[testIndex].fPointCount; ++index) {
+ path.lineTo(tests[testIndex].fPoints[index].fX, tests[testIndex].fPoints[index].fY);
+ }
+ if (tests[testIndex].fClose) {
+ path.close();
+ }
+ REPORTER_ASSERT(reporter, tests[testIndex].fIsRect == path.isRect(nullptr));
+
+ if (tests[testIndex].fIsRect) {
+ SkRect computed, expected;
+ bool isClosed;
+ SkPath::Direction direction;
+ SkPathPriv::FirstDirection cheapDirection;
+ expected.set(tests[testIndex].fPoints, tests[testIndex].fPointCount);
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapComputeFirstDirection(path, &cheapDirection));
+ REPORTER_ASSERT(reporter, path.isRect(&computed, &isClosed, &direction));
+ REPORTER_ASSERT(reporter, expected == computed);
+ REPORTER_ASSERT(reporter, isClosed == tests[testIndex].fClose);
+ REPORTER_ASSERT(reporter, SkPathPriv::AsFirstDirection(direction) == cheapDirection);
+ } else {
+ SkRect computed;
+ computed.set(123, 456, 789, 1011);
+ bool isClosed = (bool)-1;
+ SkPath::Direction direction = (SkPath::Direction) - 1;
+ REPORTER_ASSERT(reporter, !path.isRect(&computed, &isClosed, &direction));
+ REPORTER_ASSERT(reporter, computed.fLeft == 123 && computed.fTop == 456);
+ REPORTER_ASSERT(reporter, computed.fRight == 789 && computed.fBottom == 1011);
+ REPORTER_ASSERT(reporter, isClosed == (bool) -1);
+ REPORTER_ASSERT(reporter, direction == (SkPath::Direction) -1);
+ }
+ }
+
+ // fail, close then line
+ SkPath path1;
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ path1.lineTo(1, 0);
+ REPORTER_ASSERT(reporter, !path1.isRect(nullptr));
+
+ // fail, move in the middle
+ path1.reset();
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ if (index == 2) {
+ path1.moveTo(1, .5f);
+ }
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ REPORTER_ASSERT(reporter, !path1.isRect(nullptr));
+
+ // fail, move on the edge
+ path1.reset();
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ path1.moveTo(r1[index - 1].fX, r1[index - 1].fY);
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ REPORTER_ASSERT(reporter, !path1.isRect(nullptr));
+
+ // fail, quad
+ path1.reset();
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ if (index == 2) {
+ path1.quadTo(1, .5f, 1, .5f);
+ }
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ REPORTER_ASSERT(reporter, !path1.isRect(nullptr));
+
+ // fail, cubic
+ path1.reset();
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ if (index == 2) {
+ path1.cubicTo(1, .5f, 1, .5f, 1, .5f);
+ }
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ REPORTER_ASSERT(reporter, !path1.isRect(nullptr));
+}
+
+static void check_simple_closed_rect(skiatest::Reporter* reporter, const SkPath& path,
+ const SkRect& rect, SkPath::Direction dir, unsigned start) {
+ SkRect r = SkRect::MakeEmpty();
+ SkPath::Direction d = SkPath::kCCW_Direction;
+ unsigned s = ~0U;
+
+ REPORTER_ASSERT(reporter, SkPathPriv::IsSimpleClosedRect(path, &r, &d, &s));
+ REPORTER_ASSERT(reporter, r == rect);
+ REPORTER_ASSERT(reporter, d == dir);
+ REPORTER_ASSERT(reporter, s == start);
+}
+
+static void test_is_simple_closed_rect(skiatest::Reporter* reporter) {
+ SkRect r = SkRect::MakeEmpty();
+ SkPath::Direction d = SkPath::kCCW_Direction;
+ unsigned s = ~0U;
+
+ const SkRect testRect = SkRect::MakeXYWH(10, 10, 50, 70);
+ const SkRect emptyRect = SkRect::MakeEmpty();
+ SkPath path;
+ for (int start = 0; start < 4; ++start) {
+ for (auto dir : {SkPath::kCCW_Direction, SkPath::kCW_Direction}) {
+ SkPath path;
+ path.addRect(testRect, dir, start);
+ check_simple_closed_rect(reporter, path, testRect, dir, start);
+ path.close();
+ check_simple_closed_rect(reporter, path, testRect, dir, start);
+ SkPath path2 = path;
+ path2.lineTo(10, 10);
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s));
+ path2 = path;
+ path2.moveTo(10, 10);
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s));
+ path2 = path;
+ path2.addRect(testRect, dir, start);
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s));
+ // Make the path by hand, manually closing it.
+ path2.reset();
+ SkPath::RawIter iter(path);
+ SkPath::Verb v;
+ SkPoint verbPts[4];
+ SkPoint firstPt = {0.f, 0.f};
+ while ((v = iter.next(verbPts)) != SkPath::kDone_Verb) {
+ switch(v) {
+ case SkPath::kMove_Verb:
+ firstPt = verbPts[0];
+ path2.moveTo(verbPts[0]);
+ break;
+ case SkPath::kLine_Verb:
+ path2.lineTo(verbPts[1]);
+ break;
+ default:
+ break;
+ }
+ }
+ // We haven't closed it yet...
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s));
+ // ... now we do and test again.
+ path2.lineTo(firstPt);
+ check_simple_closed_rect(reporter, path2, testRect, dir, start);
+ // A redundant close shouldn't cause a failure.
+ path2.close();
+ check_simple_closed_rect(reporter, path2, testRect, dir, start);
+ // Degenerate point and line rects are not allowed
+ path2.reset();
+ path2.addRect(emptyRect, dir, start);
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s));
+ SkRect degenRect = testRect;
+ degenRect.fLeft = degenRect.fRight;
+ path2.reset();
+ path2.addRect(degenRect, dir, start);
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s));
+ degenRect = testRect;
+ degenRect.fTop = degenRect.fBottom;
+ path2.reset();
+ path2.addRect(degenRect, dir, start);
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path2, &r, &d, &s));
+ // An inverted rect makes a rect path, but changes the winding dir and start point.
+ SkPath::Direction swapDir = (dir == SkPath::kCW_Direction)
+ ? SkPath::kCCW_Direction
+ : SkPath::kCW_Direction;
+ static constexpr unsigned kXSwapStarts[] = { 1, 0, 3, 2 };
+ static constexpr unsigned kYSwapStarts[] = { 3, 2, 1, 0 };
+ SkRect swapRect = testRect;
+ SkTSwap(swapRect.fLeft, swapRect.fRight);
+ path2.reset();
+ path2.addRect(swapRect, dir, start);
+ check_simple_closed_rect(reporter, path2, testRect, swapDir, kXSwapStarts[start]);
+ swapRect = testRect;
+ SkTSwap(swapRect.fTop, swapRect.fBottom);
+ path2.reset();
+ path2.addRect(swapRect, dir, start);
+ check_simple_closed_rect(reporter, path2, testRect, swapDir, kYSwapStarts[start]);
+ }
+ }
+ // down, up, left, close
+ path.reset();
+ path.moveTo(1, 1);
+ path.lineTo(1, 2);
+ path.lineTo(1, 1);
+ path.lineTo(0, 1);
+ SkRect rect;
+ SkPath::Direction dir;
+ unsigned start;
+ path.close();
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start));
+ // right, left, up, close
+ path.reset();
+ path.moveTo(1, 1);
+ path.lineTo(2, 1);
+ path.lineTo(1, 1);
+ path.lineTo(1, 0);
+ path.close();
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start));
+ // parallelogram with horizontal edges
+ path.reset();
+ path.moveTo(1, 0);
+ path.lineTo(3, 0);
+ path.lineTo(2, 1);
+ path.lineTo(0, 1);
+ path.close();
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start));
+ // parallelogram with vertical edges
+ path.reset();
+ path.moveTo(0, 1);
+ path.lineTo(0, 3);
+ path.lineTo(1, 2);
+ path.lineTo(1, 0);
+ path.close();
+ REPORTER_ASSERT(reporter, !SkPathPriv::IsSimpleClosedRect(path, &rect, &dir, &start));
+
+}
+
+static void test_isNestedFillRects(skiatest::Reporter* reporter) {
+ // passing tests (all moveTo / lineTo...
+ SkPoint r1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}; // CW
+ SkPoint r2[] = {{1, 0}, {1, 1}, {0, 1}, {0, 0}};
+ SkPoint r3[] = {{1, 1}, {0, 1}, {0, 0}, {1, 0}};
+ SkPoint r4[] = {{0, 1}, {0, 0}, {1, 0}, {1, 1}};
+ SkPoint r5[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}}; // CCW
+ SkPoint r6[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}};
+ SkPoint r7[] = {{1, 1}, {1, 0}, {0, 0}, {0, 1}};
+ SkPoint r8[] = {{1, 0}, {0, 0}, {0, 1}, {1, 1}};
+ SkPoint r9[] = {{0, 1}, {1, 1}, {1, 0}, {0, 0}};
+ SkPoint ra[] = {{0, 0}, {0, .5f}, {0, 1}, {.5f, 1}, {1, 1}, {1, .5f}, {1, 0}, {.5f, 0}}; // CCW
+ SkPoint rb[] = {{0, 0}, {.5f, 0}, {1, 0}, {1, .5f}, {1, 1}, {.5f, 1}, {0, 1}, {0, .5f}}; // CW
+ SkPoint rc[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}}; // CW
+ SkPoint rd[] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}}; // CCW
+ SkPoint re[] = {{0, 0}, {1, 0}, {1, 0}, {1, 1}, {0, 1}}; // CW
+
+ // failing tests
+ SkPoint f1[] = {{0, 0}, {1, 0}, {1, 1}}; // too few points
+ SkPoint f2[] = {{0, 0}, {1, 1}, {0, 1}, {1, 0}}; // diagonal
+ SkPoint f3[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}, {1, 0}}; // wraps
+ SkPoint f4[] = {{0, 0}, {1, 0}, {0, 0}, {1, 0}, {1, 1}, {0, 1}}; // backs up
+ SkPoint f5[] = {{0, 0}, {1, 0}, {1, 1}, {2, 0}}; // end overshoots
+ SkPoint f6[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 2}}; // end overshoots
+ SkPoint f7[] = {{0, 0}, {1, 0}, {1, 1}, {0, 2}}; // end overshoots
+ SkPoint f8[] = {{0, 0}, {1, 0}, {1, 1}, {1, 0}}; // 'L'
+
+ // success, no close is OK
+ SkPoint c1[] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}; // close doesn't match
+ SkPoint c2[] = {{0, 0}, {1, 0}, {1, 2}, {0, 2}, {0, 1}}; // ditto
+
+ struct IsNestedRectTest {
+ SkPoint *fPoints;
+ int fPointCount;
+ SkPathPriv::FirstDirection fDirection;
+ bool fClose;
+ bool fIsNestedRect; // nests with path.addRect(-1, -1, 2, 2);
+ } tests[] = {
+ { r1, SK_ARRAY_COUNT(r1), SkPathPriv::kCW_FirstDirection , true, true },
+ { r2, SK_ARRAY_COUNT(r2), SkPathPriv::kCW_FirstDirection , true, true },
+ { r3, SK_ARRAY_COUNT(r3), SkPathPriv::kCW_FirstDirection , true, true },
+ { r4, SK_ARRAY_COUNT(r4), SkPathPriv::kCW_FirstDirection , true, true },
+ { r5, SK_ARRAY_COUNT(r5), SkPathPriv::kCCW_FirstDirection, true, true },
+ { r6, SK_ARRAY_COUNT(r6), SkPathPriv::kCCW_FirstDirection, true, true },
+ { r7, SK_ARRAY_COUNT(r7), SkPathPriv::kCCW_FirstDirection, true, true },
+ { r8, SK_ARRAY_COUNT(r8), SkPathPriv::kCCW_FirstDirection, true, true },
+ { r9, SK_ARRAY_COUNT(r9), SkPathPriv::kCCW_FirstDirection, true, true },
+ { ra, SK_ARRAY_COUNT(ra), SkPathPriv::kCCW_FirstDirection, true, true },
+ { rb, SK_ARRAY_COUNT(rb), SkPathPriv::kCW_FirstDirection, true, true },
+ { rc, SK_ARRAY_COUNT(rc), SkPathPriv::kCW_FirstDirection, true, true },
+ { rd, SK_ARRAY_COUNT(rd), SkPathPriv::kCCW_FirstDirection, true, true },
+ { re, SK_ARRAY_COUNT(re), SkPathPriv::kCW_FirstDirection, true, true },
+
+ { f1, SK_ARRAY_COUNT(f1), SkPathPriv::kUnknown_FirstDirection, true, false },
+ { f2, SK_ARRAY_COUNT(f2), SkPathPriv::kUnknown_FirstDirection, true, false },
+ { f3, SK_ARRAY_COUNT(f3), SkPathPriv::kUnknown_FirstDirection, true, false },
+ { f4, SK_ARRAY_COUNT(f4), SkPathPriv::kUnknown_FirstDirection, true, false },
+ { f5, SK_ARRAY_COUNT(f5), SkPathPriv::kUnknown_FirstDirection, true, false },
+ { f6, SK_ARRAY_COUNT(f6), SkPathPriv::kUnknown_FirstDirection, true, false },
+ { f7, SK_ARRAY_COUNT(f7), SkPathPriv::kUnknown_FirstDirection, true, false },
+ { f8, SK_ARRAY_COUNT(f8), SkPathPriv::kUnknown_FirstDirection, true, false },
+
+ { c1, SK_ARRAY_COUNT(c1), SkPathPriv::kCW_FirstDirection, false, true },
+ { c2, SK_ARRAY_COUNT(c2), SkPathPriv::kCW_FirstDirection, false, true },
+ };
+
+ const size_t testCount = SK_ARRAY_COUNT(tests);
+ int index;
+ for (int rectFirst = 0; rectFirst <= 1; ++rectFirst) {
+ for (size_t testIndex = 0; testIndex < testCount; ++testIndex) {
+ SkPath path;
+ if (rectFirst) {
+ path.addRect(-1, -1, 2, 2, SkPath::kCW_Direction);
+ }
+ path.moveTo(tests[testIndex].fPoints[0].fX, tests[testIndex].fPoints[0].fY);
+ for (index = 1; index < tests[testIndex].fPointCount; ++index) {
+ path.lineTo(tests[testIndex].fPoints[index].fX, tests[testIndex].fPoints[index].fY);
+ }
+ if (tests[testIndex].fClose) {
+ path.close();
+ }
+ if (!rectFirst) {
+ path.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction);
+ }
+ REPORTER_ASSERT(reporter,
+ tests[testIndex].fIsNestedRect == path.isNestedFillRects(nullptr));
+ if (tests[testIndex].fIsNestedRect) {
+ SkRect expected[2], computed[2];
+ SkPathPriv::FirstDirection expectedDirs[2];
+ SkPath::Direction computedDirs[2];
+ SkRect testBounds;
+ testBounds.set(tests[testIndex].fPoints, tests[testIndex].fPointCount);
+ expected[0] = SkRect::MakeLTRB(-1, -1, 2, 2);
+ expected[1] = testBounds;
+ if (rectFirst) {
+ expectedDirs[0] = SkPathPriv::kCW_FirstDirection;
+ } else {
+ expectedDirs[0] = SkPathPriv::kCCW_FirstDirection;
+ }
+ expectedDirs[1] = tests[testIndex].fDirection;
+ REPORTER_ASSERT(reporter, path.isNestedFillRects(computed, computedDirs));
+ REPORTER_ASSERT(reporter, expected[0] == computed[0]);
+ REPORTER_ASSERT(reporter, expected[1] == computed[1]);
+ REPORTER_ASSERT(reporter, expectedDirs[0] == SkPathPriv::AsFirstDirection(computedDirs[0]));
+ REPORTER_ASSERT(reporter, expectedDirs[1] == SkPathPriv::AsFirstDirection(computedDirs[1]));
+ }
+ }
+
+ // fail, close then line
+ SkPath path1;
+ if (rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction);
+ }
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ path1.lineTo(1, 0);
+ if (!rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction);
+ }
+ REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr));
+
+ // fail, move in the middle
+ path1.reset();
+ if (rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction);
+ }
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ if (index == 2) {
+ path1.moveTo(1, .5f);
+ }
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ if (!rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction);
+ }
+ REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr));
+
+ // fail, move on the edge
+ path1.reset();
+ if (rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction);
+ }
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ path1.moveTo(r1[index - 1].fX, r1[index - 1].fY);
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ if (!rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction);
+ }
+ REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr));
+
+ // fail, quad
+ path1.reset();
+ if (rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction);
+ }
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ if (index == 2) {
+ path1.quadTo(1, .5f, 1, .5f);
+ }
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ if (!rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction);
+ }
+ REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr));
+
+ // fail, cubic
+ path1.reset();
+ if (rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCW_Direction);
+ }
+ path1.moveTo(r1[0].fX, r1[0].fY);
+ for (index = 1; index < SkToInt(SK_ARRAY_COUNT(r1)); ++index) {
+ if (index == 2) {
+ path1.cubicTo(1, .5f, 1, .5f, 1, .5f);
+ }
+ path1.lineTo(r1[index].fX, r1[index].fY);
+ }
+ path1.close();
+ if (!rectFirst) {
+ path1.addRect(-1, -1, 2, 2, SkPath::kCCW_Direction);
+ }
+ REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr));
+
+ // fail, not nested
+ path1.reset();
+ path1.addRect(1, 1, 3, 3, SkPath::kCW_Direction);
+ path1.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
+ REPORTER_ASSERT(reporter, !path1.isNestedFillRects(nullptr));
+ }
+
+ // pass, constructed explicitly from manually closed rects specified as moves/lines.
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(10, 0);
+ path.lineTo(10, 10);
+ path.lineTo(0, 10);
+ path.lineTo(0, 0);
+ path.moveTo(1, 1);
+ path.lineTo(9, 1);
+ path.lineTo(9, 9);
+ path.lineTo(1, 9);
+ path.lineTo(1, 1);
+ REPORTER_ASSERT(reporter, path.isNestedFillRects(nullptr));
+
+ // pass, stroke rect
+ SkPath src, dst;
+ src.addRect(1, 1, 7, 7, SkPath::kCW_Direction);
+ SkPaint strokePaint;
+ strokePaint.setStyle(SkPaint::kStroke_Style);
+ strokePaint.setStrokeWidth(2);
+ strokePaint.getFillPath(src, &dst);
+ REPORTER_ASSERT(reporter, dst.isNestedFillRects(nullptr));
+}
+
+static void write_and_read_back(skiatest::Reporter* reporter,
+ const SkPath& p) {
+ SkWriter32 writer;
+ writer.writePath(p);
+ size_t size = writer.bytesWritten();
+ SkAutoMalloc storage(size);
+ writer.flatten(storage.get());
+ SkReader32 reader(storage.get(), size);
+
+ SkPath readBack;
+ REPORTER_ASSERT(reporter, readBack != p);
+ reader.readPath(&readBack);
+ REPORTER_ASSERT(reporter, readBack == p);
+
+ REPORTER_ASSERT(reporter, readBack.getConvexityOrUnknown() ==
+ p.getConvexityOrUnknown());
+
+ SkRect oval0, oval1;
+ SkPath::Direction dir0, dir1;
+ unsigned start0, start1;
+ REPORTER_ASSERT(reporter, readBack.isOval(nullptr) == p.isOval(nullptr));
+ if (p.isOval(&oval0, &dir0, &start0) && readBack.isOval(&oval1, &dir1, &start1)) {
+ REPORTER_ASSERT(reporter, oval0 == oval1);
+ REPORTER_ASSERT(reporter, dir0 == dir1);
+ REPORTER_ASSERT(reporter, start0 == start1);
+ }
+ REPORTER_ASSERT(reporter, readBack.isRRect(nullptr) == p.isRRect(nullptr));
+ SkRRect rrect0, rrect1;
+ if (p.isRRect(&rrect0, &dir0, &start0) && readBack.isRRect(&rrect1, &dir1, &start1)) {
+ REPORTER_ASSERT(reporter, rrect0 == rrect1);
+ REPORTER_ASSERT(reporter, dir0 == dir1);
+ REPORTER_ASSERT(reporter, start0 == start1);
+ }
+ const SkRect& origBounds = p.getBounds();
+ const SkRect& readBackBounds = readBack.getBounds();
+
+ REPORTER_ASSERT(reporter, origBounds == readBackBounds);
+}
+
+static void test_corrupt_flattening(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(1, 2);
+ path.lineTo(1, 2);
+ path.quadTo(1, 2, 3, 4);
+ path.conicTo(1, 2, 3, 4, 0.5f);
+ path.cubicTo(1, 2, 3, 4, 5, 6);
+ uint8_t buffer[1024];
+ SkDEBUGCODE(size_t size =) path.writeToMemory(buffer);
+ SkASSERT(size <= sizeof(buffer));
+
+ // find where the counts and verbs are stored : from the impl in SkPathRef.cpp
+ int32_t* vCount = (int32_t*)&buffer[16];
+ SkASSERT(*vCount == 5);
+ int32_t* pCount = (int32_t*)&buffer[20];
+ SkASSERT(*pCount == 9);
+ int32_t* cCount = (int32_t*)&buffer[24];
+ SkASSERT(*cCount == 1);
+ uint8_t* verbs = &buffer[28];
+
+ REPORTER_ASSERT(reporter, path.readFromMemory(buffer, sizeof(buffer)));
+
+ // check that we detect under/over-flow of counts
+
+ *vCount += 1;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ *vCount -= 1; // restore
+
+ *pCount += 1;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ *pCount -= 2;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ *pCount += 1; // restore
+
+ *cCount += 1;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ *cCount -= 2;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ *cCount += 1; // restore
+
+ // Check that we detect when the verbs indicate more or fewer pts/conics
+
+ uint8_t save = verbs[0];
+ SkASSERT(save == SkPath::kCubic_Verb);
+ verbs[0] = SkPath::kQuad_Verb;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ verbs[0] = save;
+
+ save = verbs[1];
+ SkASSERT(save == SkPath::kConic_Verb);
+ verbs[1] = SkPath::kQuad_Verb;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ verbs[1] = SkPath::kCubic_Verb;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ verbs[1] = save;
+
+ // Check that we detect invalid verbs
+ save = verbs[1];
+ verbs[1] = 17;
+ REPORTER_ASSERT(reporter, !path.readFromMemory(buffer, sizeof(buffer)));
+ verbs[1] = save;
+}
+
+static void test_flattening(skiatest::Reporter* reporter) {
+ SkPath p;
+
+ static const SkPoint pts[] = {
+ { 0, 0 },
+ { SkIntToScalar(10), SkIntToScalar(10) },
+ { SkIntToScalar(20), SkIntToScalar(10) }, { SkIntToScalar(20), 0 },
+ { 0, 0 }, { 0, SkIntToScalar(10) }, { SkIntToScalar(1), SkIntToScalar(10) }
+ };
+ p.moveTo(pts[0]);
+ p.lineTo(pts[1]);
+ p.quadTo(pts[2], pts[3]);
+ p.cubicTo(pts[4], pts[5], pts[6]);
+
+ write_and_read_back(reporter, p);
+
+ // create a buffer that should be much larger than the path so we don't
+ // kill our stack if writer goes too far.
+ char buffer[1024];
+ size_t size1 = p.writeToMemory(nullptr);
+ size_t size2 = p.writeToMemory(buffer);
+ REPORTER_ASSERT(reporter, size1 == size2);
+
+ SkPath p2;
+ size_t size3 = p2.readFromMemory(buffer, 1024);
+ REPORTER_ASSERT(reporter, size1 == size3);
+ REPORTER_ASSERT(reporter, p == p2);
+
+ size3 = p2.readFromMemory(buffer, 0);
+ REPORTER_ASSERT(reporter, !size3);
+
+ SkPath tooShort;
+ size3 = tooShort.readFromMemory(buffer, size1 - 1);
+ REPORTER_ASSERT(reporter, tooShort.isEmpty());
+
+ char buffer2[1024];
+ size3 = p2.writeToMemory(buffer2);
+ REPORTER_ASSERT(reporter, size1 == size3);
+ REPORTER_ASSERT(reporter, memcmp(buffer, buffer2, size1) == 0);
+
+ // test persistence of the oval flag & convexity
+ {
+ SkPath oval;
+ SkRect rect = SkRect::MakeWH(10, 10);
+ oval.addOval(rect);
+
+ write_and_read_back(reporter, oval);
+ }
+
+ test_corrupt_flattening(reporter);
+}
+
+static void test_transform(skiatest::Reporter* reporter) {
+ SkPath p;
+
+#define CONIC_PERSPECTIVE_BUG_FIXED 0
+ static const SkPoint pts[] = {
+ { 0, 0 }, // move
+ { SkIntToScalar(10), SkIntToScalar(10) }, // line
+ { SkIntToScalar(20), SkIntToScalar(10) }, { SkIntToScalar(20), 0 }, // quad
+ { 0, 0 }, { 0, SkIntToScalar(10) }, { SkIntToScalar(1), SkIntToScalar(10) }, // cubic
+#if CONIC_PERSPECTIVE_BUG_FIXED
+ { 0, 0 }, { SkIntToScalar(20), SkIntToScalar(10) }, // conic
+#endif
+ };
+ const int kPtCount = SK_ARRAY_COUNT(pts);
+
+ p.moveTo(pts[0]);
+ p.lineTo(pts[1]);
+ p.quadTo(pts[2], pts[3]);
+ p.cubicTo(pts[4], pts[5], pts[6]);
+#if CONIC_PERSPECTIVE_BUG_FIXED
+ p.conicTo(pts[4], pts[5], 0.5f);
+#endif
+ p.close();
+
+ {
+ SkMatrix matrix;
+ matrix.reset();
+ SkPath p1;
+ p.transform(matrix, &p1);
+ REPORTER_ASSERT(reporter, p == p1);
+ }
+
+
+ {
+ SkMatrix matrix;
+ matrix.setScale(SK_Scalar1 * 2, SK_Scalar1 * 3);
+
+ SkPath p1; // Leave p1 non-unique (i.e., the empty path)
+
+ p.transform(matrix, &p1);
+ SkPoint pts1[kPtCount];
+ int count = p1.getPoints(pts1, kPtCount);
+ REPORTER_ASSERT(reporter, kPtCount == count);
+ for (int i = 0; i < count; ++i) {
+ SkPoint newPt = SkPoint::Make(pts[i].fX * 2, pts[i].fY * 3);
+ REPORTER_ASSERT(reporter, newPt == pts1[i]);
+ }
+ }
+
+ {
+ SkMatrix matrix;
+ matrix.reset();
+ matrix.setPerspX(4);
+
+ SkPath p1;
+ p1.moveTo(SkPoint::Make(0, 0));
+
+ p.transform(matrix, &p1);
+ REPORTER_ASSERT(reporter, matrix.invert(&matrix));
+ p1.transform(matrix, nullptr);
+ SkRect pBounds = p.getBounds();
+ SkRect p1Bounds = p1.getBounds();
+ REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fLeft, p1Bounds.fLeft));
+ REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fTop, p1Bounds.fTop));
+ REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fRight, p1Bounds.fRight));
+ REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fBottom, p1Bounds.fBottom));
+ }
+
+ p.reset();
+ p.addCircle(0, 0, 1, SkPath::kCW_Direction);
+
+ {
+ SkMatrix matrix;
+ matrix.reset();
+ SkPath p1;
+ p1.moveTo(SkPoint::Make(0, 0));
+
+ p.transform(matrix, &p1);
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p1, SkPathPriv::kCW_FirstDirection));
+ }
+
+
+ {
+ SkMatrix matrix;
+ matrix.reset();
+ matrix.setScaleX(-1);
+ SkPath p1;
+ p1.moveTo(SkPoint::Make(0, 0)); // Make p1 unique (i.e., not empty path)
+
+ p.transform(matrix, &p1);
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p1, SkPathPriv::kCCW_FirstDirection));
+ }
+
+ {
+ SkMatrix matrix;
+ matrix.setAll(1, 1, 0, 1, 1, 0, 0, 0, 1);
+ SkPath p1;
+ p1.moveTo(SkPoint::Make(0, 0)); // Make p1 unique (i.e., not empty path)
+
+ p.transform(matrix, &p1);
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p1, SkPathPriv::kUnknown_FirstDirection));
+ }
+}
+
+static void test_zero_length_paths(skiatest::Reporter* reporter) {
+ SkPath p;
+ uint8_t verbs[32];
+
+ struct SUPPRESS_VISIBILITY_WARNING zeroPathTestData {
+ const char* testPath;
+ const size_t numResultPts;
+ const SkRect resultBound;
+ const SkPath::Verb* resultVerbs;
+ const size_t numResultVerbs;
+ };
+
+ static const SkPath::Verb resultVerbs1[] = { SkPath::kMove_Verb };
+ static const SkPath::Verb resultVerbs2[] = { SkPath::kMove_Verb, SkPath::kMove_Verb };
+ static const SkPath::Verb resultVerbs3[] = { SkPath::kMove_Verb, SkPath::kClose_Verb };
+ static const SkPath::Verb resultVerbs4[] = { SkPath::kMove_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kClose_Verb };
+ static const SkPath::Verb resultVerbs5[] = { SkPath::kMove_Verb, SkPath::kLine_Verb };
+ static const SkPath::Verb resultVerbs6[] = { SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kMove_Verb, SkPath::kLine_Verb };
+ static const SkPath::Verb resultVerbs7[] = { SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb };
+ static const SkPath::Verb resultVerbs8[] = {
+ SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb
+ };
+ static const SkPath::Verb resultVerbs9[] = { SkPath::kMove_Verb, SkPath::kQuad_Verb };
+ static const SkPath::Verb resultVerbs10[] = { SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kMove_Verb, SkPath::kQuad_Verb };
+ static const SkPath::Verb resultVerbs11[] = { SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kClose_Verb };
+ static const SkPath::Verb resultVerbs12[] = {
+ SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kQuad_Verb, SkPath::kClose_Verb
+ };
+ static const SkPath::Verb resultVerbs13[] = { SkPath::kMove_Verb, SkPath::kCubic_Verb };
+ static const SkPath::Verb resultVerbs14[] = { SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kMove_Verb, SkPath::kCubic_Verb };
+ static const SkPath::Verb resultVerbs15[] = { SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kClose_Verb };
+ static const SkPath::Verb resultVerbs16[] = {
+ SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kCubic_Verb, SkPath::kClose_Verb
+ };
+ static const struct zeroPathTestData gZeroLengthTests[] = {
+ { "M 1 1", 1, {1, 1, 1, 1}, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "M 1 1 M 2 1", 2, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs2, SK_ARRAY_COUNT(resultVerbs2) },
+ { "M 1 1 z", 1, {1, 1, 1, 1}, resultVerbs3, SK_ARRAY_COUNT(resultVerbs3) },
+ { "M 1 1 z M 2 1 z", 2, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs4, SK_ARRAY_COUNT(resultVerbs4) },
+ { "M 1 1 L 1 1", 2, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs5, SK_ARRAY_COUNT(resultVerbs5) },
+ { "M 1 1 L 1 1 M 2 1 L 2 1", 4, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs6, SK_ARRAY_COUNT(resultVerbs6) },
+ { "M 1 1 L 1 1 z", 2, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs7, SK_ARRAY_COUNT(resultVerbs7) },
+ { "M 1 1 L 1 1 z M 2 1 L 2 1 z", 4, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs8, SK_ARRAY_COUNT(resultVerbs8) },
+ { "M 1 1 Q 1 1 1 1", 3, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs9, SK_ARRAY_COUNT(resultVerbs9) },
+ { "M 1 1 Q 1 1 1 1 M 2 1 Q 2 1 2 1", 6, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs10, SK_ARRAY_COUNT(resultVerbs10) },
+ { "M 1 1 Q 1 1 1 1 z", 3, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs11, SK_ARRAY_COUNT(resultVerbs11) },
+ { "M 1 1 Q 1 1 1 1 z M 2 1 Q 2 1 2 1 z", 6, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs12, SK_ARRAY_COUNT(resultVerbs12) },
+ { "M 1 1 C 1 1 1 1 1 1", 4, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs13, SK_ARRAY_COUNT(resultVerbs13) },
+ { "M 1 1 C 1 1 1 1 1 1 M 2 1 C 2 1 2 1 2 1", 8, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs14,
+ SK_ARRAY_COUNT(resultVerbs14)
+ },
+ { "M 1 1 C 1 1 1 1 1 1 z", 4, {SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1}, resultVerbs15, SK_ARRAY_COUNT(resultVerbs15) },
+ { "M 1 1 C 1 1 1 1 1 1 z M 2 1 C 2 1 2 1 2 1 z", 8, {SK_Scalar1, SK_Scalar1, 2*SK_Scalar1, SK_Scalar1}, resultVerbs16,
+ SK_ARRAY_COUNT(resultVerbs16)
+ }
+ };
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gZeroLengthTests); ++i) {
+ p.reset();
+ bool valid = SkParsePath::FromSVGString(gZeroLengthTests[i].testPath, &p);
+ REPORTER_ASSERT(reporter, valid);
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+ REPORTER_ASSERT(reporter, gZeroLengthTests[i].numResultPts == (size_t)p.countPoints());
+ REPORTER_ASSERT(reporter, gZeroLengthTests[i].resultBound == p.getBounds());
+ REPORTER_ASSERT(reporter, gZeroLengthTests[i].numResultVerbs == (size_t)p.getVerbs(verbs, SK_ARRAY_COUNT(verbs)));
+ for (size_t j = 0; j < gZeroLengthTests[i].numResultVerbs; ++j) {
+ REPORTER_ASSERT(reporter, gZeroLengthTests[i].resultVerbs[j] == verbs[j]);
+ }
+ }
+}
+
+struct SegmentInfo {
+ SkPath fPath;
+ int fPointCount;
+};
+
+#define kCurveSegmentMask (SkPath::kQuad_SegmentMask | SkPath::kCubic_SegmentMask)
+
+static void test_segment_masks(skiatest::Reporter* reporter) {
+ SkPath p, p2;
+
+ p.moveTo(0, 0);
+ p.quadTo(100, 100, 200, 200);
+ REPORTER_ASSERT(reporter, SkPath::kQuad_SegmentMask == p.getSegmentMasks());
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+ p2 = p;
+ REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks());
+ p.cubicTo(100, 100, 200, 200, 300, 300);
+ REPORTER_ASSERT(reporter, kCurveSegmentMask == p.getSegmentMasks());
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+ p2 = p;
+ REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks());
+
+ p.reset();
+ p.moveTo(0, 0);
+ p.cubicTo(100, 100, 200, 200, 300, 300);
+ REPORTER_ASSERT(reporter, SkPath::kCubic_SegmentMask == p.getSegmentMasks());
+ p2 = p;
+ REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks());
+
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+}
+
+static void test_iter(skiatest::Reporter* reporter) {
+ SkPath p;
+ SkPoint pts[4];
+
+ // Test an iterator with no path
+ SkPath::Iter noPathIter;
+ REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb);
+
+ // Test that setting an empty path works
+ noPathIter.setPath(p, false);
+ REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb);
+
+ // Test that close path makes no difference for an empty path
+ noPathIter.setPath(p, true);
+ REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb);
+
+ // Test an iterator with an initial empty path
+ SkPath::Iter iter(p, false);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb);
+
+ // Test that close path makes no difference
+ iter.setPath(p, true);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb);
+
+
+ struct iterTestData {
+ const char* testPath;
+ const bool forceClose;
+ const bool consumeDegenerates;
+ const size_t* numResultPtsPerVerb;
+ const SkPoint* resultPts;
+ const SkPath::Verb* resultVerbs;
+ const size_t numResultVerbs;
+ };
+
+ static const SkPath::Verb resultVerbs1[] = { SkPath::kDone_Verb };
+ static const SkPath::Verb resultVerbs2[] = {
+ SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kLine_Verb, SkPath::kDone_Verb
+ };
+ static const SkPath::Verb resultVerbs3[] = {
+ SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kLine_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb, SkPath::kDone_Verb
+ };
+ static const SkPath::Verb resultVerbs4[] = {
+ SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kMove_Verb, SkPath::kClose_Verb, SkPath::kDone_Verb
+ };
+ static const SkPath::Verb resultVerbs5[] = {
+ SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kClose_Verb, SkPath::kMove_Verb, SkPath::kClose_Verb, SkPath::kDone_Verb
+ };
+ static const size_t resultPtsSizes1[] = { 0 };
+ static const size_t resultPtsSizes2[] = { 1, 2, 2, 0 };
+ static const size_t resultPtsSizes3[] = { 1, 2, 2, 2, 1, 0 };
+ static const size_t resultPtsSizes4[] = { 1, 2, 1, 1, 0 };
+ static const size_t resultPtsSizes5[] = { 1, 2, 1, 1, 1, 0 };
+ static const SkPoint* resultPts1 = nullptr;
+ static const SkPoint resultPts2[] = {
+ { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, SK_Scalar1 }, { SK_Scalar1, SK_Scalar1 }, { 0, SK_Scalar1 }
+ };
+ static const SkPoint resultPts3[] = {
+ { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, SK_Scalar1 }, { SK_Scalar1, SK_Scalar1 }, { 0, SK_Scalar1 },
+ { 0, SK_Scalar1 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 }
+ };
+ static const SkPoint resultPts4[] = {
+ { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { 0, 0 }, { 0, 0 }
+ };
+ static const SkPoint resultPts5[] = {
+ { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { SK_Scalar1, 0 }, { 0, 0 }, { 0, 0 }
+ };
+ static const struct iterTestData gIterTests[] = {
+ { "M 1 0", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "M 1 0 M 2 0 M 3 0 M 4 0 M 5 0", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "M 1 0 M 1 0 M 3 0 M 4 0 M 5 0", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "z", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "z", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "z M 1 0 z z M 2 0 z M 3 0 M 4 0 z", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "z M 1 0 z z M 2 0 z M 3 0 M 4 0 z", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "M 1 0 L 1 1 L 0 1 M 0 0 z", false, true, resultPtsSizes2, resultPts2, resultVerbs2, SK_ARRAY_COUNT(resultVerbs2) },
+ { "M 1 0 L 1 1 L 0 1 M 0 0 z", true, true, resultPtsSizes3, resultPts3, resultVerbs3, SK_ARRAY_COUNT(resultVerbs3) },
+ { "M 1 0 L 1 0 M 0 0 z", false, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "M 1 0 L 1 0 M 0 0 z", true, true, resultPtsSizes1, resultPts1, resultVerbs1, SK_ARRAY_COUNT(resultVerbs1) },
+ { "M 1 0 L 1 0 M 0 0 z", false, false, resultPtsSizes4, resultPts4, resultVerbs4, SK_ARRAY_COUNT(resultVerbs4) },
+ { "M 1 0 L 1 0 M 0 0 z", true, false, resultPtsSizes5, resultPts5, resultVerbs5, SK_ARRAY_COUNT(resultVerbs5) }
+ };
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gIterTests); ++i) {
+ p.reset();
+ bool valid = SkParsePath::FromSVGString(gIterTests[i].testPath, &p);
+ REPORTER_ASSERT(reporter, valid);
+ iter.setPath(p, gIterTests[i].forceClose);
+ int j = 0, l = 0;
+ do {
+ REPORTER_ASSERT(reporter, iter.next(pts, gIterTests[i].consumeDegenerates) == gIterTests[i].resultVerbs[j]);
+ for (int k = 0; k < (int)gIterTests[i].numResultPtsPerVerb[j]; ++k) {
+ REPORTER_ASSERT(reporter, pts[k] == gIterTests[i].resultPts[l++]);
+ }
+ } while (gIterTests[i].resultVerbs[j++] != SkPath::kDone_Verb);
+ REPORTER_ASSERT(reporter, j == (int)gIterTests[i].numResultVerbs);
+ }
+
+ p.reset();
+ iter.setPath(p, false);
+ REPORTER_ASSERT(reporter, !iter.isClosedContour());
+ p.lineTo(1, 1);
+ p.close();
+ iter.setPath(p, false);
+ REPORTER_ASSERT(reporter, iter.isClosedContour());
+ p.reset();
+ iter.setPath(p, true);
+ REPORTER_ASSERT(reporter, !iter.isClosedContour());
+ p.lineTo(1, 1);
+ iter.setPath(p, true);
+ REPORTER_ASSERT(reporter, iter.isClosedContour());
+ p.moveTo(0, 0);
+ p.lineTo(2, 2);
+ iter.setPath(p, false);
+ REPORTER_ASSERT(reporter, !iter.isClosedContour());
+
+ // this checks to see if the NaN logic is executed in SkPath::autoClose(), but does not
+ // check to see if the result is correct.
+ for (int setNaN = 0; setNaN < 4; ++setNaN) {
+ p.reset();
+ p.moveTo(setNaN == 0 ? SK_ScalarNaN : 0, setNaN == 1 ? SK_ScalarNaN : 0);
+ p.lineTo(setNaN == 2 ? SK_ScalarNaN : 1, setNaN == 3 ? SK_ScalarNaN : 1);
+ iter.setPath(p, true);
+ iter.next(pts, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kClose_Verb == iter.next(pts, false));
+ }
+
+ p.reset();
+ p.quadTo(0, 0, 0, 0);
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kQuad_Verb == iter.next(pts, false));
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true));
+
+ p.reset();
+ p.conicTo(0, 0, 0, 0, 0.5f);
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kConic_Verb == iter.next(pts, false));
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true));
+
+ p.reset();
+ p.cubicTo(0, 0, 0, 0, 0, 0);
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == iter.next(pts, false));
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true));
+
+ p.moveTo(1, 1); // add a trailing moveto
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == iter.next(pts, false));
+ iter.setPath(p, false);
+ iter.next(pts, false);
+ REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true));
+
+ // The GM degeneratesegments.cpp test is more extensive
+
+ // Test out mixed degenerate and non-degenerate geometry with Conics
+ const SkVector radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 100, 100 } };
+ SkRect r = SkRect::MakeWH(100, 100);
+ SkRRect rr;
+ rr.setRectRadii(r, radii);
+ p.reset();
+ p.addRRect(rr);
+ iter.setPath(p, false);
+ REPORTER_ASSERT(reporter, SkPath::kMove_Verb == iter.next(pts));
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts));
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts));
+ REPORTER_ASSERT(reporter, SkPath::kConic_Verb == iter.next(pts));
+ REPORTER_ASSERT(reporter, SK_ScalarRoot2Over2 == iter.conicWeight());
+}
+
+static void test_raw_iter(skiatest::Reporter* reporter) {
+ SkPath p;
+ SkPoint pts[4];
+
+ // Test an iterator with no path
+ SkPath::RawIter noPathIter;
+ REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb);
+ // Test that setting an empty path works
+ noPathIter.setPath(p);
+ REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb);
+
+ // Test an iterator with an initial empty path
+ SkPath::RawIter iter(p);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb);
+
+ // Test that a move-only path returns the move.
+ p.moveTo(SK_Scalar1, 0);
+ iter.setPath(p);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1);
+ REPORTER_ASSERT(reporter, pts[0].fY == 0);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb);
+
+ // No matter how many moves we add, we should get them all back
+ p.moveTo(SK_Scalar1*2, SK_Scalar1);
+ p.moveTo(SK_Scalar1*3, SK_Scalar1*2);
+ iter.setPath(p);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1);
+ REPORTER_ASSERT(reporter, pts[0].fY == 0);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*2);
+ REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*3);
+ REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*2);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb);
+
+ // Initial close is never ever stored
+ p.reset();
+ p.close();
+ iter.setPath(p);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb);
+
+ // Move/close sequences
+ p.reset();
+ p.close(); // Not stored, no purpose
+ p.moveTo(SK_Scalar1, 0);
+ p.close();
+ p.close(); // Not stored, no purpose
+ p.moveTo(SK_Scalar1*2, SK_Scalar1);
+ p.close();
+ p.moveTo(SK_Scalar1*3, SK_Scalar1*2);
+ p.moveTo(SK_Scalar1*4, SK_Scalar1*3);
+ p.close();
+ iter.setPath(p);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1);
+ REPORTER_ASSERT(reporter, pts[0].fY == 0);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*2);
+ REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*3);
+ REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*2);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*4);
+ REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*3);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb);
+ REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb);
+
+ // Generate random paths and verify
+ SkPoint randomPts[25];
+ for (int i = 0; i < 5; ++i) {
+ for (int j = 0; j < 5; ++j) {
+ randomPts[i*5+j].set(SK_Scalar1*i, SK_Scalar1*j);
+ }
+ }
+
+ // Max of 10 segments, max 3 points per segment
+ SkRandom rand(9876543);
+ SkPoint expectedPts[31]; // May have leading moveTo
+ SkPath::Verb expectedVerbs[22]; // May have leading moveTo
+ SkPath::Verb nextVerb;
+
+ for (int i = 0; i < 500; ++i) {
+ p.reset();
+ bool lastWasClose = true;
+ bool haveMoveTo = false;
+ SkPoint lastMoveToPt = { 0, 0 };
+ int numPoints = 0;
+ int numVerbs = (rand.nextU() >> 16) % 10;
+ int numIterVerbs = 0;
+ for (int j = 0; j < numVerbs; ++j) {
+ do {
+ nextVerb = static_cast<SkPath::Verb>((rand.nextU() >> 16) % SkPath::kDone_Verb);
+ } while (lastWasClose && nextVerb == SkPath::kClose_Verb);
+ switch (nextVerb) {
+ case SkPath::kMove_Verb:
+ expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25];
+ p.moveTo(expectedPts[numPoints]);
+ lastMoveToPt = expectedPts[numPoints];
+ numPoints += 1;
+ lastWasClose = false;
+ haveMoveTo = true;
+ break;
+ case SkPath::kLine_Verb:
+ if (!haveMoveTo) {
+ expectedPts[numPoints++] = lastMoveToPt;
+ expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb;
+ haveMoveTo = true;
+ }
+ expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25];
+ p.lineTo(expectedPts[numPoints]);
+ numPoints += 1;
+ lastWasClose = false;
+ break;
+ case SkPath::kQuad_Verb:
+ if (!haveMoveTo) {
+ expectedPts[numPoints++] = lastMoveToPt;
+ expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb;
+ haveMoveTo = true;
+ }
+ expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25];
+ expectedPts[numPoints + 1] = randomPts[(rand.nextU() >> 16) % 25];
+ p.quadTo(expectedPts[numPoints], expectedPts[numPoints + 1]);
+ numPoints += 2;
+ lastWasClose = false;
+ break;
+ case SkPath::kConic_Verb:
+ if (!haveMoveTo) {
+ expectedPts[numPoints++] = lastMoveToPt;
+ expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb;
+ haveMoveTo = true;
+ }
+ expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25];
+ expectedPts[numPoints + 1] = randomPts[(rand.nextU() >> 16) % 25];
+ p.conicTo(expectedPts[numPoints], expectedPts[numPoints + 1],
+ rand.nextUScalar1() * 4);
+ numPoints += 2;
+ lastWasClose = false;
+ break;
+ case SkPath::kCubic_Verb:
+ if (!haveMoveTo) {
+ expectedPts[numPoints++] = lastMoveToPt;
+ expectedVerbs[numIterVerbs++] = SkPath::kMove_Verb;
+ haveMoveTo = true;
+ }
+ expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25];
+ expectedPts[numPoints + 1] = randomPts[(rand.nextU() >> 16) % 25];
+ expectedPts[numPoints + 2] = randomPts[(rand.nextU() >> 16) % 25];
+ p.cubicTo(expectedPts[numPoints], expectedPts[numPoints + 1],
+ expectedPts[numPoints + 2]);
+ numPoints += 3;
+ lastWasClose = false;
+ break;
+ case SkPath::kClose_Verb:
+ p.close();
+ haveMoveTo = false;
+ lastWasClose = true;
+ break;
+ default:
+ SkDEBUGFAIL("unexpected verb");
+ }
+ expectedVerbs[numIterVerbs++] = nextVerb;
+ }
+
+ iter.setPath(p);
+ numVerbs = numIterVerbs;
+ numIterVerbs = 0;
+ int numIterPts = 0;
+ SkPoint lastMoveTo;
+ SkPoint lastPt;
+ lastMoveTo.set(0, 0);
+ lastPt.set(0, 0);
+ while ((nextVerb = iter.next(pts)) != SkPath::kDone_Verb) {
+ REPORTER_ASSERT(reporter, nextVerb == expectedVerbs[numIterVerbs]);
+ numIterVerbs++;
+ switch (nextVerb) {
+ case SkPath::kMove_Verb:
+ REPORTER_ASSERT(reporter, numIterPts < numPoints);
+ REPORTER_ASSERT(reporter, pts[0] == expectedPts[numIterPts]);
+ lastPt = lastMoveTo = pts[0];
+ numIterPts += 1;
+ break;
+ case SkPath::kLine_Verb:
+ REPORTER_ASSERT(reporter, numIterPts < numPoints + 1);
+ REPORTER_ASSERT(reporter, pts[0] == lastPt);
+ REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]);
+ lastPt = pts[1];
+ numIterPts += 1;
+ break;
+ case SkPath::kQuad_Verb:
+ case SkPath::kConic_Verb:
+ REPORTER_ASSERT(reporter, numIterPts < numPoints + 2);
+ REPORTER_ASSERT(reporter, pts[0] == lastPt);
+ REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]);
+ REPORTER_ASSERT(reporter, pts[2] == expectedPts[numIterPts + 1]);
+ lastPt = pts[2];
+ numIterPts += 2;
+ break;
+ case SkPath::kCubic_Verb:
+ REPORTER_ASSERT(reporter, numIterPts < numPoints + 3);
+ REPORTER_ASSERT(reporter, pts[0] == lastPt);
+ REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]);
+ REPORTER_ASSERT(reporter, pts[2] == expectedPts[numIterPts + 1]);
+ REPORTER_ASSERT(reporter, pts[3] == expectedPts[numIterPts + 2]);
+ lastPt = pts[3];
+ numIterPts += 3;
+ break;
+ case SkPath::kClose_Verb:
+ lastPt = lastMoveTo;
+ break;
+ default:
+ SkDEBUGFAIL("unexpected verb");
+ }
+ }
+ REPORTER_ASSERT(reporter, numIterPts == numPoints);
+ REPORTER_ASSERT(reporter, numIterVerbs == numVerbs);
+ }
+}
+
+static void check_for_circle(skiatest::Reporter* reporter,
+ const SkPath& path,
+ bool expectedCircle,
+ SkPathPriv::FirstDirection expectedDir) {
+ SkRect rect = SkRect::MakeEmpty();
+ REPORTER_ASSERT(reporter, path.isOval(&rect) == expectedCircle);
+ SkPath::Direction isOvalDir;
+ unsigned isOvalStart;
+ if (path.isOval(&rect, &isOvalDir, &isOvalStart)) {
+ REPORTER_ASSERT(reporter, rect.height() == rect.width());
+ REPORTER_ASSERT(reporter, SkPathPriv::AsFirstDirection(isOvalDir) == expectedDir);
+ SkPath tmpPath;
+ tmpPath.addOval(rect, isOvalDir, isOvalStart);
+ REPORTER_ASSERT(reporter, path == tmpPath);
+ }
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(path, expectedDir));
+}
+
+static void test_circle_skew(skiatest::Reporter* reporter,
+ const SkPath& path,
+ SkPathPriv::FirstDirection dir) {
+ SkPath tmp;
+
+ SkMatrix m;
+ m.setSkew(SkIntToScalar(3), SkIntToScalar(5));
+ path.transform(m, &tmp);
+ // this matrix reverses the direction.
+ if (SkPathPriv::kCCW_FirstDirection == dir) {
+ dir = SkPathPriv::kCW_FirstDirection;
+ } else {
+ REPORTER_ASSERT(reporter, SkPathPriv::kCW_FirstDirection == dir);
+ dir = SkPathPriv::kCCW_FirstDirection;
+ }
+ check_for_circle(reporter, tmp, false, dir);
+}
+
+static void test_circle_translate(skiatest::Reporter* reporter,
+ const SkPath& path,
+ SkPathPriv::FirstDirection dir) {
+ SkPath tmp;
+
+ // translate at small offset
+ SkMatrix m;
+ m.setTranslate(SkIntToScalar(15), SkIntToScalar(15));
+ path.transform(m, &tmp);
+ check_for_circle(reporter, tmp, true, dir);
+
+ tmp.reset();
+ m.reset();
+
+ // translate at a relatively big offset
+ m.setTranslate(SkIntToScalar(1000), SkIntToScalar(1000));
+ path.transform(m, &tmp);
+ check_for_circle(reporter, tmp, true, dir);
+}
+
+static void test_circle_rotate(skiatest::Reporter* reporter,
+ const SkPath& path,
+ SkPathPriv::FirstDirection dir) {
+ for (int angle = 0; angle < 360; ++angle) {
+ SkPath tmp;
+ SkMatrix m;
+ m.setRotate(SkIntToScalar(angle));
+ path.transform(m, &tmp);
+
+ // TODO: a rotated circle whose rotated angle is not a multiple of 90
+ // degrees is not an oval anymore, this can be improved. we made this
+ // for the simplicity of our implementation.
+ if (angle % 90 == 0) {
+ check_for_circle(reporter, tmp, true, dir);
+ } else {
+ check_for_circle(reporter, tmp, false, dir);
+ }
+ }
+}
+
+static void test_circle_mirror_x(skiatest::Reporter* reporter,
+ const SkPath& path,
+ SkPathPriv::FirstDirection dir) {
+ SkPath tmp;
+ SkMatrix m;
+ m.reset();
+ m.setScaleX(-SK_Scalar1);
+ path.transform(m, &tmp);
+ if (SkPathPriv::kCW_FirstDirection == dir) {
+ dir = SkPathPriv::kCCW_FirstDirection;
+ } else {
+ REPORTER_ASSERT(reporter, SkPathPriv::kCCW_FirstDirection == dir);
+ dir = SkPathPriv::kCW_FirstDirection;
+ }
+ check_for_circle(reporter, tmp, true, dir);
+}
+
+static void test_circle_mirror_y(skiatest::Reporter* reporter,
+ const SkPath& path,
+ SkPathPriv::FirstDirection dir) {
+ SkPath tmp;
+ SkMatrix m;
+ m.reset();
+ m.setScaleY(-SK_Scalar1);
+ path.transform(m, &tmp);
+
+ if (SkPathPriv::kCW_FirstDirection == dir) {
+ dir = SkPathPriv::kCCW_FirstDirection;
+ } else {
+ REPORTER_ASSERT(reporter, SkPathPriv::kCCW_FirstDirection == dir);
+ dir = SkPathPriv::kCW_FirstDirection;
+ }
+
+ check_for_circle(reporter, tmp, true, dir);
+}
+
+static void test_circle_mirror_xy(skiatest::Reporter* reporter,
+ const SkPath& path,
+ SkPathPriv::FirstDirection dir) {
+ SkPath tmp;
+ SkMatrix m;
+ m.reset();
+ m.setScaleX(-SK_Scalar1);
+ m.setScaleY(-SK_Scalar1);
+ path.transform(m, &tmp);
+
+ check_for_circle(reporter, tmp, true, dir);
+}
+
+static void test_circle_with_direction(skiatest::Reporter* reporter,
+ SkPath::Direction inDir) {
+ const SkPathPriv::FirstDirection dir = SkPathPriv::AsFirstDirection(inDir);
+ SkPath path;
+
+ // circle at origin
+ path.addCircle(0, 0, SkIntToScalar(20), inDir);
+
+ check_for_circle(reporter, path, true, dir);
+ test_circle_rotate(reporter, path, dir);
+ test_circle_translate(reporter, path, dir);
+ test_circle_skew(reporter, path, dir);
+ test_circle_mirror_x(reporter, path, dir);
+ test_circle_mirror_y(reporter, path, dir);
+ test_circle_mirror_xy(reporter, path, dir);
+
+ // circle at an offset at (10, 10)
+ path.reset();
+ path.addCircle(SkIntToScalar(10), SkIntToScalar(10),
+ SkIntToScalar(20), inDir);
+
+ check_for_circle(reporter, path, true, dir);
+ test_circle_rotate(reporter, path, dir);
+ test_circle_translate(reporter, path, dir);
+ test_circle_skew(reporter, path, dir);
+ test_circle_mirror_x(reporter, path, dir);
+ test_circle_mirror_y(reporter, path, dir);
+ test_circle_mirror_xy(reporter, path, dir);
+
+ // Try different starting points for the contour.
+ for (unsigned start = 0; start < 4; ++start) {
+ path.reset();
+ path.addOval(SkRect::MakeXYWH(20, 10, 5, 5), inDir, start);
+ test_circle_rotate(reporter, path, dir);
+ test_circle_translate(reporter, path, dir);
+ test_circle_skew(reporter, path, dir);
+ test_circle_mirror_x(reporter, path, dir);
+ test_circle_mirror_y(reporter, path, dir);
+ test_circle_mirror_xy(reporter, path, dir);
+ }
+}
+
+static void test_circle_with_add_paths(skiatest::Reporter* reporter) {
+ SkPath path;
+ SkPath circle;
+ SkPath rect;
+ SkPath empty;
+
+ const SkPath::Direction kCircleDir = SkPath::kCW_Direction;
+ const SkPath::Direction kCircleDirOpposite = SkPath::kCCW_Direction;
+
+ circle.addCircle(0, 0, SkIntToScalar(10), kCircleDir);
+ rect.addRect(SkIntToScalar(5), SkIntToScalar(5),
+ SkIntToScalar(20), SkIntToScalar(20), SkPath::kCW_Direction);
+
+ SkMatrix translate;
+ translate.setTranslate(SkIntToScalar(12), SkIntToScalar(12));
+
+ // Although all the path concatenation related operations leave
+ // the path a circle, most mark it as a non-circle for simplicity
+
+ // empty + circle (translate)
+ path = empty;
+ path.addPath(circle, translate);
+ check_for_circle(reporter, path, false, SkPathPriv::AsFirstDirection(kCircleDir));
+
+ // circle + empty (translate)
+ path = circle;
+ path.addPath(empty, translate);
+
+ check_for_circle(reporter, path, true, SkPathPriv::AsFirstDirection(kCircleDir));
+
+ // test reverseAddPath
+ path = circle;
+ path.reverseAddPath(rect);
+ check_for_circle(reporter, path, false, SkPathPriv::AsFirstDirection(kCircleDirOpposite));
+}
+
+static void test_circle(skiatest::Reporter* reporter) {
+ test_circle_with_direction(reporter, SkPath::kCW_Direction);
+ test_circle_with_direction(reporter, SkPath::kCCW_Direction);
+
+ // multiple addCircle()
+ SkPath path;
+ path.addCircle(0, 0, SkIntToScalar(10), SkPath::kCW_Direction);
+ path.addCircle(0, 0, SkIntToScalar(20), SkPath::kCW_Direction);
+ check_for_circle(reporter, path, false, SkPathPriv::kCW_FirstDirection);
+
+ // some extra lineTo() would make isOval() fail
+ path.reset();
+ path.addCircle(0, 0, SkIntToScalar(10), SkPath::kCW_Direction);
+ path.lineTo(0, 0);
+ check_for_circle(reporter, path, false, SkPathPriv::kCW_FirstDirection);
+
+ // not back to the original point
+ path.reset();
+ path.addCircle(0, 0, SkIntToScalar(10), SkPath::kCW_Direction);
+ path.setLastPt(SkIntToScalar(5), SkIntToScalar(5));
+ check_for_circle(reporter, path, false, SkPathPriv::kCW_FirstDirection);
+
+ test_circle_with_add_paths(reporter);
+
+ // test negative radius
+ path.reset();
+ path.addCircle(0, 0, -1, SkPath::kCW_Direction);
+ REPORTER_ASSERT(reporter, path.isEmpty());
+}
+
+static void test_oval(skiatest::Reporter* reporter) {
+ SkRect rect;
+ SkMatrix m;
+ SkPath path;
+ unsigned start = 0;
+ SkPath::Direction dir = SkPath::kCCW_Direction;
+
+ rect = SkRect::MakeWH(SkIntToScalar(30), SkIntToScalar(50));
+ path.addOval(rect);
+
+ // Defaults to dir = CW and start = 1
+ REPORTER_ASSERT(reporter, path.isOval(nullptr));
+
+ m.setRotate(SkIntToScalar(90));
+ SkPath tmp;
+ path.transform(m, &tmp);
+ // an oval rotated 90 degrees is still an oval. The start index changes from 1 to 2. Direction
+ // is unchanged.
+ REPORTER_ASSERT(reporter, tmp.isOval(nullptr, &dir, &start));
+ REPORTER_ASSERT(reporter, 2 == start);
+ REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir);
+
+ m.reset();
+ m.setRotate(SkIntToScalar(30));
+ tmp.reset();
+ path.transform(m, &tmp);
+ // an oval rotated 30 degrees is not an oval anymore.
+ REPORTER_ASSERT(reporter, !tmp.isOval(nullptr));
+
+ // since empty path being transformed.
+ path.reset();
+ tmp.reset();
+ m.reset();
+ path.transform(m, &tmp);
+ REPORTER_ASSERT(reporter, !tmp.isOval(nullptr));
+
+ // empty path is not an oval
+ tmp.reset();
+ REPORTER_ASSERT(reporter, !tmp.isOval(nullptr));
+
+ // only has moveTo()s
+ tmp.reset();
+ tmp.moveTo(0, 0);
+ tmp.moveTo(SkIntToScalar(10), SkIntToScalar(10));
+ REPORTER_ASSERT(reporter, !tmp.isOval(nullptr));
+
+ // mimic WebKit's calling convention,
+ // call moveTo() first and then call addOval()
+ path.reset();
+ path.moveTo(0, 0);
+ path.addOval(rect);
+ REPORTER_ASSERT(reporter, path.isOval(nullptr));
+
+ // copy path
+ path.reset();
+ tmp.reset();
+ tmp.addOval(rect);
+ path = tmp;
+ REPORTER_ASSERT(reporter, path.isOval(nullptr, &dir, &start));
+ REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir);
+ REPORTER_ASSERT(reporter, 1 == start);
+}
+
+static void test_empty(skiatest::Reporter* reporter, const SkPath& p) {
+ SkPath empty;
+
+ REPORTER_ASSERT(reporter, p.isEmpty());
+ REPORTER_ASSERT(reporter, 0 == p.countPoints());
+ REPORTER_ASSERT(reporter, 0 == p.countVerbs());
+ REPORTER_ASSERT(reporter, 0 == p.getSegmentMasks());
+ REPORTER_ASSERT(reporter, p.isConvex());
+ REPORTER_ASSERT(reporter, p.getFillType() == SkPath::kWinding_FillType);
+ REPORTER_ASSERT(reporter, !p.isInverseFillType());
+ REPORTER_ASSERT(reporter, p == empty);
+ REPORTER_ASSERT(reporter, !(p != empty));
+}
+
+static void test_rrect_is_convex(skiatest::Reporter* reporter, SkPath* path,
+ SkPath::Direction dir) {
+ REPORTER_ASSERT(reporter, path->isConvex());
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(*path, SkPathPriv::AsFirstDirection(dir)));
+ path->setConvexity(SkPath::kUnknown_Convexity);
+ REPORTER_ASSERT(reporter, path->isConvex());
+ path->reset();
+}
+
+static void test_rrect_convexity_is_unknown(skiatest::Reporter* reporter, SkPath* path,
+ SkPath::Direction dir) {
+ REPORTER_ASSERT(reporter, path->isConvex());
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(*path, SkPathPriv::AsFirstDirection(dir)));
+ path->setConvexity(SkPath::kUnknown_Convexity);
+ REPORTER_ASSERT(reporter, path->getConvexity() == SkPath::kUnknown_Convexity);
+ path->reset();
+}
+
+static void test_rrect(skiatest::Reporter* reporter) {
+ SkPath p;
+ SkRRect rr;
+ SkVector radii[] = {{1, 2}, {3, 4}, {5, 6}, {7, 8}};
+ SkRect r = {10, 20, 30, 40};
+ rr.setRectRadii(r, radii);
+ p.addRRect(rr);
+ test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
+ p.addRRect(rr, SkPath::kCCW_Direction);
+ test_rrect_is_convex(reporter, &p, SkPath::kCCW_Direction);
+ p.addRoundRect(r, &radii[0].fX);
+ test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
+ p.addRoundRect(r, &radii[0].fX, SkPath::kCCW_Direction);
+ test_rrect_is_convex(reporter, &p, SkPath::kCCW_Direction);
+ p.addRoundRect(r, radii[1].fX, radii[1].fY);
+ test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
+ p.addRoundRect(r, radii[1].fX, radii[1].fY, SkPath::kCCW_Direction);
+ test_rrect_is_convex(reporter, &p, SkPath::kCCW_Direction);
+ for (size_t i = 0; i < SK_ARRAY_COUNT(radii); ++i) {
+ SkVector save = radii[i];
+ radii[i].set(0, 0);
+ rr.setRectRadii(r, radii);
+ p.addRRect(rr);
+ test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
+ radii[i] = save;
+ }
+ p.addRoundRect(r, 0, 0);
+ SkRect returnedRect;
+ REPORTER_ASSERT(reporter, p.isRect(&returnedRect));
+ REPORTER_ASSERT(reporter, returnedRect == r);
+ test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
+ SkVector zeroRadii[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
+ rr.setRectRadii(r, zeroRadii);
+ p.addRRect(rr);
+ bool closed;
+ SkPath::Direction dir;
+ REPORTER_ASSERT(reporter, p.isRect(nullptr, &closed, &dir));
+ REPORTER_ASSERT(reporter, closed);
+ REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir);
+ test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
+ p.addRRect(rr, SkPath::kCW_Direction);
+ p.addRRect(rr, SkPath::kCW_Direction);
+ REPORTER_ASSERT(reporter, !p.isConvex());
+ p.reset();
+ p.addRRect(rr, SkPath::kCCW_Direction);
+ p.addRRect(rr, SkPath::kCCW_Direction);
+ REPORTER_ASSERT(reporter, !p.isConvex());
+ p.reset();
+ SkRect emptyR = {10, 20, 10, 30};
+ rr.setRectRadii(emptyR, radii);
+ p.addRRect(rr);
+ REPORTER_ASSERT(reporter, p.isEmpty());
+ SkRect largeR = {0, 0, SK_ScalarMax, SK_ScalarMax};
+ rr.setRectRadii(largeR, radii);
+ p.addRRect(rr);
+ test_rrect_convexity_is_unknown(reporter, &p, SkPath::kCW_Direction);
+
+ // we check for non-finites
+ SkRect infR = {0, 0, SK_ScalarMax, SK_ScalarInfinity};
+ rr.setRectRadii(infR, radii);
+ REPORTER_ASSERT(reporter, rr.isEmpty());
+
+ SkRect tinyR = {0, 0, 1e-9f, 1e-9f};
+ p.addRoundRect(tinyR, 5e-11f, 5e-11f);
+ test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
+}
+
+static void test_arc(skiatest::Reporter* reporter) {
+ SkPath p;
+ SkRect emptyOval = {10, 20, 30, 20};
+ REPORTER_ASSERT(reporter, emptyOval.isEmpty());
+ p.addArc(emptyOval, 1, 2);
+ REPORTER_ASSERT(reporter, p.isEmpty());
+ p.reset();
+ SkRect oval = {10, 20, 30, 40};
+ p.addArc(oval, 1, 0);
+ REPORTER_ASSERT(reporter, p.isEmpty());
+ p.reset();
+ SkPath cwOval;
+ cwOval.addOval(oval);
+ p.addArc(oval, 0, 360);
+ REPORTER_ASSERT(reporter, p == cwOval);
+ p.reset();
+ SkPath ccwOval;
+ ccwOval.addOval(oval, SkPath::kCCW_Direction);
+ p.addArc(oval, 0, -360);
+ REPORTER_ASSERT(reporter, p == ccwOval);
+ p.reset();
+ p.addArc(oval, 1, 180);
+ REPORTER_ASSERT(reporter, p.isConvex());
+ REPORTER_ASSERT(reporter, SkPathPriv::CheapIsFirstDirection(p, SkPathPriv::kCW_FirstDirection));
+ p.setConvexity(SkPath::kUnknown_Convexity);
+ REPORTER_ASSERT(reporter, p.isConvex());
+}
+
+static inline SkScalar oval_start_index_to_angle(unsigned start) {
+ switch (start) {
+ case 0:
+ return 270.f;
+ case 1:
+ return 0.f;
+ case 2:
+ return 90.f;
+ case 3:
+ return 180.f;
+ default:
+ return -1.f;
+ }
+}
+
+static inline SkScalar canonical_start_angle(float angle) {
+ while (angle < 0.f) {
+ angle += 360.f;
+ }
+ while (angle >= 360.f) {
+ angle -= 360.f;
+ }
+ return angle;
+}
+
+static void check_oval_arc(skiatest::Reporter* reporter, SkScalar start, SkScalar sweep,
+ const SkPath& path) {
+ SkRect r = SkRect::MakeEmpty();
+ SkPath::Direction d = SkPath::kCCW_Direction;
+ unsigned s = ~0U;
+ bool isOval = path.isOval(&r, &d, &s);
+ REPORTER_ASSERT(reporter, isOval);
+ SkPath recreatedPath;
+ recreatedPath.addOval(r, d, s);
+ REPORTER_ASSERT(reporter, path == recreatedPath);
+ REPORTER_ASSERT(reporter, oval_start_index_to_angle(s) == canonical_start_angle(start));
+ REPORTER_ASSERT(reporter, (SkPath::kCW_Direction == d) == (sweep > 0.f));
+}
+
+static void test_arc_ovals(skiatest::Reporter* reporter) {
+ SkRect oval = SkRect::MakeWH(10, 20);
+ for (SkScalar sweep : {-720.f, -540.f, -360.f, 360.f, 432.f, 720.f}) {
+ for (SkScalar start = -360.f; start <= 360.f; start += 1.f) {
+ SkPath path;
+ path.addArc(oval, start, sweep);
+ // SkPath's interfaces for inserting and extracting ovals only allow contours
+ // to start at multiples of 90 degrees.
+ if (std::fmod(start, 90.f) == 0) {
+ check_oval_arc(reporter, start, sweep, path);
+ } else {
+ REPORTER_ASSERT(reporter, !path.isOval(nullptr));
+ }
+ }
+ // Test start angles that are nearly at valid oval start angles.
+ for (float start : {-180.f, -90.f, 90.f, 180.f}) {
+ for (float delta : {-SK_ScalarNearlyZero, SK_ScalarNearlyZero}) {
+ SkPath path;
+ path.addArc(oval, start + delta, sweep);
+ check_oval_arc(reporter, start, sweep, path);
+ }
+ }
+ }
+}
+
+static void check_move(skiatest::Reporter* reporter, SkPath::RawIter* iter,
+ SkScalar x0, SkScalar y0) {
+ SkPoint pts[4];
+ SkPath::Verb v = iter->next(pts);
+ REPORTER_ASSERT(reporter, v == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, pts[0].fX == x0);
+ REPORTER_ASSERT(reporter, pts[0].fY == y0);
+}
+
+static void check_line(skiatest::Reporter* reporter, SkPath::RawIter* iter,
+ SkScalar x1, SkScalar y1) {
+ SkPoint pts[4];
+ SkPath::Verb v = iter->next(pts);
+ REPORTER_ASSERT(reporter, v == SkPath::kLine_Verb);
+ REPORTER_ASSERT(reporter, pts[1].fX == x1);
+ REPORTER_ASSERT(reporter, pts[1].fY == y1);
+}
+
+static void check_quad(skiatest::Reporter* reporter, SkPath::RawIter* iter,
+ SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
+ SkPoint pts[4];
+ SkPath::Verb v = iter->next(pts);
+ REPORTER_ASSERT(reporter, v == SkPath::kQuad_Verb);
+ REPORTER_ASSERT(reporter, pts[1].fX == x1);
+ REPORTER_ASSERT(reporter, pts[1].fY == y1);
+ REPORTER_ASSERT(reporter, pts[2].fX == x2);
+ REPORTER_ASSERT(reporter, pts[2].fY == y2);
+}
+
+static void check_done(skiatest::Reporter* reporter, SkPath* p, SkPath::RawIter* iter) {
+ SkPoint pts[4];
+ SkPath::Verb v = iter->next(pts);
+ REPORTER_ASSERT(reporter, v == SkPath::kDone_Verb);
+}
+
+static void check_done_and_reset(skiatest::Reporter* reporter, SkPath* p, SkPath::RawIter* iter) {
+ check_done(reporter, p, iter);
+ p->reset();
+}
+
+static void check_path_is_move_and_reset(skiatest::Reporter* reporter, SkPath* p,
+ SkScalar x0, SkScalar y0) {
+ SkPath::RawIter iter(*p);
+ check_move(reporter, &iter, x0, y0);
+ check_done_and_reset(reporter, p, &iter);
+}
+
+static void check_path_is_line_and_reset(skiatest::Reporter* reporter, SkPath* p,
+ SkScalar x1, SkScalar y1) {
+ SkPath::RawIter iter(*p);
+ check_move(reporter, &iter, 0, 0);
+ check_line(reporter, &iter, x1, y1);
+ check_done_and_reset(reporter, p, &iter);
+}
+
+static void check_path_is_line(skiatest::Reporter* reporter, SkPath* p,
+ SkScalar x1, SkScalar y1) {
+ SkPath::RawIter iter(*p);
+ check_move(reporter, &iter, 0, 0);
+ check_line(reporter, &iter, x1, y1);
+ check_done(reporter, p, &iter);
+}
+
+static void check_path_is_line_pair_and_reset(skiatest::Reporter* reporter, SkPath* p,
+ SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
+ SkPath::RawIter iter(*p);
+ check_move(reporter, &iter, 0, 0);
+ check_line(reporter, &iter, x1, y1);
+ check_line(reporter, &iter, x2, y2);
+ check_done_and_reset(reporter, p, &iter);
+}
+
+static void check_path_is_quad_and_reset(skiatest::Reporter* reporter, SkPath* p,
+ SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
+ SkPath::RawIter iter(*p);
+ check_move(reporter, &iter, 0, 0);
+ check_quad(reporter, &iter, x1, y1, x2, y2);
+ check_done_and_reset(reporter, p, &iter);
+}
+
+static bool nearly_equal(const SkRect& a, const SkRect& b) {
+ return SkScalarNearlyEqual(a.fLeft, b.fLeft) &&
+ SkScalarNearlyEqual(a.fTop, b.fTop) &&
+ SkScalarNearlyEqual(a.fRight, b.fRight) &&
+ SkScalarNearlyEqual(a.fBottom, b.fBottom);
+}
+
+static void test_arcTo(skiatest::Reporter* reporter) {
+ SkPath p;
+ p.arcTo(0, 0, 1, 2, 1);
+ check_path_is_line_and_reset(reporter, &p, 0, 0);
+ p.arcTo(1, 2, 1, 2, 1);
+ check_path_is_line_and_reset(reporter, &p, 1, 2);
+ p.arcTo(1, 2, 3, 4, 0);
+ check_path_is_line_and_reset(reporter, &p, 1, 2);
+ p.arcTo(1, 2, 0, 0, 1);
+ check_path_is_line_and_reset(reporter, &p, 1, 2);
+ p.arcTo(1, 0, 1, 1, 1);
+ SkPoint pt;
+ REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt.fX == 1 && pt.fY == 1);
+ p.reset();
+ p.arcTo(1, 0, 1, -1, 1);
+ REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt.fX == 1 && pt.fY == -1);
+ p.reset();
+ SkRect oval = {1, 2, 3, 4};
+ p.arcTo(oval, 0, 0, true);
+ check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY());
+ p.arcTo(oval, 0, 0, false);
+ check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY());
+ p.arcTo(oval, 360, 0, true);
+ check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY());
+ p.arcTo(oval, 360, 0, false);
+ check_path_is_move_and_reset(reporter, &p, oval.fRight, oval.centerY());
+
+ for (float sweep = 359, delta = 0.5f; sweep != (float) (sweep + delta); ) {
+ p.arcTo(oval, 0, sweep, false);
+ REPORTER_ASSERT(reporter, nearly_equal(p.getBounds(), oval));
+ sweep += delta;
+ delta /= 2;
+ }
+ for (float sweep = 361, delta = 0.5f; sweep != (float) (sweep - delta);) {
+ p.arcTo(oval, 0, sweep, false);
+ REPORTER_ASSERT(reporter, nearly_equal(p.getBounds(), oval));
+ sweep -= delta;
+ delta /= 2;
+ }
+ SkRect noOvalWidth = {1, 2, 0, 3};
+ p.reset();
+ p.arcTo(noOvalWidth, 0, 360, false);
+ REPORTER_ASSERT(reporter, p.isEmpty());
+
+ SkRect noOvalHeight = {1, 2, 3, 1};
+ p.reset();
+ p.arcTo(noOvalHeight, 0, 360, false);
+ REPORTER_ASSERT(reporter, p.isEmpty());
+}
+
+static void test_addPath(skiatest::Reporter* reporter) {
+ SkPath p, q;
+ p.lineTo(1, 2);
+ q.moveTo(4, 4);
+ q.lineTo(7, 8);
+ q.conicTo(8, 7, 6, 5, 0.5f);
+ q.quadTo(6, 7, 8, 6);
+ q.cubicTo(5, 6, 7, 8, 7, 5);
+ q.close();
+ p.addPath(q, -4, -4);
+ SkRect expected = {0, 0, 4, 4};
+ REPORTER_ASSERT(reporter, p.getBounds() == expected);
+ p.reset();
+ p.reverseAddPath(q);
+ SkRect reverseExpected = {4, 4, 8, 8};
+ REPORTER_ASSERT(reporter, p.getBounds() == reverseExpected);
+}
+
+static void test_addPathMode(skiatest::Reporter* reporter, bool explicitMoveTo, bool extend) {
+ SkPath p, q;
+ if (explicitMoveTo) {
+ p.moveTo(1, 1);
+ }
+ p.lineTo(1, 2);
+ if (explicitMoveTo) {
+ q.moveTo(2, 1);
+ }
+ q.lineTo(2, 2);
+ p.addPath(q, extend ? SkPath::kExtend_AddPathMode : SkPath::kAppend_AddPathMode);
+ uint8_t verbs[4];
+ int verbcount = p.getVerbs(verbs, 4);
+ REPORTER_ASSERT(reporter, verbcount == 4);
+ REPORTER_ASSERT(reporter, verbs[0] == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, verbs[1] == SkPath::kLine_Verb);
+ REPORTER_ASSERT(reporter, verbs[2] == (extend ? SkPath::kLine_Verb : SkPath::kMove_Verb));
+ REPORTER_ASSERT(reporter, verbs[3] == SkPath::kLine_Verb);
+}
+
+static void test_extendClosedPath(skiatest::Reporter* reporter) {
+ SkPath p, q;
+ p.moveTo(1, 1);
+ p.lineTo(1, 2);
+ p.lineTo(2, 2);
+ p.close();
+ q.moveTo(2, 1);
+ q.lineTo(2, 3);
+ p.addPath(q, SkPath::kExtend_AddPathMode);
+ uint8_t verbs[7];
+ int verbcount = p.getVerbs(verbs, 7);
+ REPORTER_ASSERT(reporter, verbcount == 7);
+ REPORTER_ASSERT(reporter, verbs[0] == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, verbs[1] == SkPath::kLine_Verb);
+ REPORTER_ASSERT(reporter, verbs[2] == SkPath::kLine_Verb);
+ REPORTER_ASSERT(reporter, verbs[3] == SkPath::kClose_Verb);
+ REPORTER_ASSERT(reporter, verbs[4] == SkPath::kMove_Verb);
+ REPORTER_ASSERT(reporter, verbs[5] == SkPath::kLine_Verb);
+ REPORTER_ASSERT(reporter, verbs[6] == SkPath::kLine_Verb);
+
+ SkPoint pt;
+ REPORTER_ASSERT(reporter, p.getLastPt(&pt));
+ REPORTER_ASSERT(reporter, pt == SkPoint::Make(2, 3));
+ REPORTER_ASSERT(reporter, p.getPoint(3) == SkPoint::Make(1, 1));
+}
+
+static void test_addEmptyPath(skiatest::Reporter* reporter, SkPath::AddPathMode mode) {
+ SkPath p, q, r;
+ // case 1: dst is empty
+ p.moveTo(2, 1);
+ p.lineTo(2, 3);
+ q.addPath(p, mode);
+ REPORTER_ASSERT(reporter, q == p);
+ // case 2: src is empty
+ p.addPath(r, mode);
+ REPORTER_ASSERT(reporter, q == p);
+ // case 3: src and dst are empty
+ q.reset();
+ q.addPath(r, mode);
+ REPORTER_ASSERT(reporter, q.isEmpty());
+}
+
+static void test_conicTo_special_case(skiatest::Reporter* reporter) {
+ SkPath p;
+ p.conicTo(1, 2, 3, 4, -1);
+ check_path_is_line_and_reset(reporter, &p, 3, 4);
+ p.conicTo(1, 2, 3, 4, SK_ScalarInfinity);
+ check_path_is_line_pair_and_reset(reporter, &p, 1, 2, 3, 4);
+ p.conicTo(1, 2, 3, 4, 1);
+ check_path_is_quad_and_reset(reporter, &p, 1, 2, 3, 4);
+}
+
+static void test_get_point(skiatest::Reporter* reporter) {
+ SkPath p;
+ SkPoint pt = p.getPoint(0);
+ REPORTER_ASSERT(reporter, pt == SkPoint::Make(0, 0));
+ REPORTER_ASSERT(reporter, !p.getLastPt(nullptr));
+ REPORTER_ASSERT(reporter, !p.getLastPt(&pt) && pt == SkPoint::Make(0, 0));
+ p.setLastPt(10, 10);
+ pt = p.getPoint(0);
+ REPORTER_ASSERT(reporter, pt == SkPoint::Make(10, 10));
+ REPORTER_ASSERT(reporter, p.getLastPt(nullptr));
+ p.rMoveTo(10, 10);
+ REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt == SkPoint::Make(20, 20));
+}
+
+static void test_contains(skiatest::Reporter* reporter) {
+ SkPath p;
+ p.moveTo(SkBits2Float(0xe085e7b1), SkBits2Float(0x5f512c00)); // -7.7191e+19f, 1.50724e+19f
+ p.conicTo(SkBits2Float(0xdfdaa221), SkBits2Float(0x5eaac338), SkBits2Float(0x60342f13), SkBits2Float(0xdf0cbb58), SkBits2Float(0x3f3504f3)); // -3.15084e+19f, 6.15237e+18f, 5.19345e+19f, -1.01408e+19f, 0.707107f
+ p.conicTo(SkBits2Float(0x60ead799), SkBits2Float(0xdfb76c24), SkBits2Float(0x609b9872), SkBits2Float(0xdf730de8), SkBits2Float(0x3f3504f4)); // 1.35377e+20f, -2.6434e+19f, 8.96947e+19f, -1.75139e+19f, 0.707107f
+ p.lineTo(SkBits2Float(0x609b9872), SkBits2Float(0xdf730de8)); // 8.96947e+19f, -1.75139e+19f
+ p.conicTo(SkBits2Float(0x6018b296), SkBits2Float(0xdeee870d), SkBits2Float(0xe008cd8e), SkBits2Float(0x5ed5b2db), SkBits2Float(0x3f3504f3)); // 4.40121e+19f, -8.59386e+18f, -3.94308e+19f, 7.69931e+18f, 0.707107f
+ p.conicTo(SkBits2Float(0xe0d526d9), SkBits2Float(0x5fa67b31), SkBits2Float(0xe085e7b2), SkBits2Float(0x5f512c01), SkBits2Float(0x3f3504f3)); // -1.22874e+20f, 2.39925e+19f, -7.7191e+19f, 1.50724e+19f, 0.707107f
+ // this may return true or false, depending on the platform's numerics, but it should not crash
+ (void) p.contains(-77.2027664f, 15.3066053f);
+
+ p.reset();
+ p.setFillType(SkPath::kInverseWinding_FillType);
+ REPORTER_ASSERT(reporter, p.contains(0, 0));
+ p.setFillType(SkPath::kWinding_FillType);
+ REPORTER_ASSERT(reporter, !p.contains(0, 0));
+ p.moveTo(4, 4);
+ p.lineTo(6, 8);
+ p.lineTo(8, 4);
+ // test on edge
+ REPORTER_ASSERT(reporter, p.contains(6, 4));
+ REPORTER_ASSERT(reporter, p.contains(5, 6));
+ REPORTER_ASSERT(reporter, p.contains(7, 6));
+ // test quick reject
+ REPORTER_ASSERT(reporter, !p.contains(4, 0));
+ REPORTER_ASSERT(reporter, !p.contains(0, 4));
+ REPORTER_ASSERT(reporter, !p.contains(4, 10));
+ REPORTER_ASSERT(reporter, !p.contains(10, 4));
+ // test various crossings in x
+ REPORTER_ASSERT(reporter, !p.contains(5, 7));
+ REPORTER_ASSERT(reporter, p.contains(6, 7));
+ REPORTER_ASSERT(reporter, !p.contains(7, 7));
+ p.reset();
+ p.moveTo(4, 4);
+ p.lineTo(8, 6);
+ p.lineTo(4, 8);
+ // test on edge
+ REPORTER_ASSERT(reporter, p.contains(4, 6));
+ REPORTER_ASSERT(reporter, p.contains(6, 5));
+ REPORTER_ASSERT(reporter, p.contains(6, 7));
+ // test various crossings in y
+ REPORTER_ASSERT(reporter, !p.contains(7, 5));
+ REPORTER_ASSERT(reporter, p.contains(7, 6));
+ REPORTER_ASSERT(reporter, !p.contains(7, 7));
+ p.reset();
+ p.moveTo(4, 4);
+ p.lineTo(8, 4);
+ p.lineTo(8, 8);
+ p.lineTo(4, 8);
+ // test on vertices
+ REPORTER_ASSERT(reporter, p.contains(4, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 8));
+ REPORTER_ASSERT(reporter, p.contains(4, 8));
+ p.reset();
+ p.moveTo(4, 4);
+ p.lineTo(6, 8);
+ p.lineTo(2, 8);
+ // test on edge
+ REPORTER_ASSERT(reporter, p.contains(5, 6));
+ REPORTER_ASSERT(reporter, p.contains(4, 8));
+ REPORTER_ASSERT(reporter, p.contains(3, 6));
+ p.reset();
+ p.moveTo(4, 4);
+ p.lineTo(0, 6);
+ p.lineTo(4, 8);
+ // test on edge
+ REPORTER_ASSERT(reporter, p.contains(2, 5));
+ REPORTER_ASSERT(reporter, p.contains(2, 7));
+ REPORTER_ASSERT(reporter, p.contains(4, 6));
+ // test canceling coincident edge (a smaller triangle is coincident with a larger one)
+ p.reset();
+ p.moveTo(4, 0);
+ p.lineTo(6, 4);
+ p.lineTo(2, 4);
+ p.moveTo(4, 0);
+ p.lineTo(0, 8);
+ p.lineTo(8, 8);
+ REPORTER_ASSERT(reporter, !p.contains(1, 2));
+ REPORTER_ASSERT(reporter, !p.contains(3, 2));
+ REPORTER_ASSERT(reporter, !p.contains(4, 0));
+ REPORTER_ASSERT(reporter, p.contains(4, 4));
+
+ // test quads
+ p.reset();
+ p.moveTo(4, 4);
+ p.quadTo(6, 6, 8, 8);
+ p.quadTo(6, 8, 4, 8);
+ p.quadTo(4, 6, 4, 4);
+ REPORTER_ASSERT(reporter, p.contains(5, 6));
+ REPORTER_ASSERT(reporter, !p.contains(6, 5));
+ // test quad edge
+ REPORTER_ASSERT(reporter, p.contains(5, 5));
+ REPORTER_ASSERT(reporter, p.contains(5, 8));
+ REPORTER_ASSERT(reporter, p.contains(4, 5));
+ // test quad endpoints
+ REPORTER_ASSERT(reporter, p.contains(4, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 8));
+ REPORTER_ASSERT(reporter, p.contains(4, 8));
+
+ p.reset();
+ const SkPoint qPts[] = {{6, 6}, {8, 8}, {6, 8}, {4, 8}, {4, 6}, {4, 4}, {6, 6}};
+ p.moveTo(qPts[0]);
+ for (int index = 1; index < (int) SK_ARRAY_COUNT(qPts); index += 2) {
+ p.quadTo(qPts[index], qPts[index + 1]);
+ }
+ REPORTER_ASSERT(reporter, p.contains(5, 6));
+ REPORTER_ASSERT(reporter, !p.contains(6, 5));
+ // test quad edge
+ SkPoint halfway;
+ for (int index = 0; index < (int) SK_ARRAY_COUNT(qPts) - 2; index += 2) {
+ SkEvalQuadAt(&qPts[index], 0.5f, &halfway, nullptr);
+ REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY));
+ }
+
+ // test conics
+ p.reset();
+ const SkPoint kPts[] = {{4, 4}, {6, 6}, {8, 8}, {6, 8}, {4, 8}, {4, 6}, {4, 4}};
+ p.moveTo(kPts[0]);
+ for (int index = 1; index < (int) SK_ARRAY_COUNT(kPts); index += 2) {
+ p.conicTo(kPts[index], kPts[index + 1], 0.5f);
+ }
+ REPORTER_ASSERT(reporter, p.contains(5, 6));
+ REPORTER_ASSERT(reporter, !p.contains(6, 5));
+ // test conic edge
+ for (int index = 0; index < (int) SK_ARRAY_COUNT(kPts) - 2; index += 2) {
+ SkConic conic(&kPts[index], 0.5f);
+ halfway = conic.evalAt(0.5f);
+ REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY));
+ }
+ // test conic end points
+ REPORTER_ASSERT(reporter, p.contains(4, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 8));
+ REPORTER_ASSERT(reporter, p.contains(4, 8));
+
+ // test cubics
+ SkPoint pts[] = {{5, 4}, {6, 5}, {7, 6}, {6, 6}, {4, 6}, {5, 7}, {5, 5}, {5, 4}, {6, 5}, {7, 6}};
+ for (int i = 0; i < 3; ++i) {
+ p.reset();
+ p.setFillType(SkPath::kEvenOdd_FillType);
+ p.moveTo(pts[i].fX, pts[i].fY);
+ p.cubicTo(pts[i + 1].fX, pts[i + 1].fY, pts[i + 2].fX, pts[i + 2].fY, pts[i + 3].fX, pts[i + 3].fY);
+ p.cubicTo(pts[i + 4].fX, pts[i + 4].fY, pts[i + 5].fX, pts[i + 5].fY, pts[i + 6].fX, pts[i + 6].fY);
+ p.close();
+ REPORTER_ASSERT(reporter, p.contains(5.5f, 5.5f));
+ REPORTER_ASSERT(reporter, !p.contains(4.5f, 5.5f));
+ // test cubic edge
+ SkEvalCubicAt(&pts[i], 0.5f, &halfway, nullptr, nullptr);
+ REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY));
+ SkEvalCubicAt(&pts[i + 3], 0.5f, &halfway, nullptr, nullptr);
+ REPORTER_ASSERT(reporter, p.contains(halfway.fX, halfway.fY));
+ // test cubic end points
+ REPORTER_ASSERT(reporter, p.contains(pts[i].fX, pts[i].fY));
+ REPORTER_ASSERT(reporter, p.contains(pts[i + 3].fX, pts[i + 3].fY));
+ REPORTER_ASSERT(reporter, p.contains(pts[i + 6].fX, pts[i + 6].fY));
+ }
+}
+
+class PathRefTest_Private {
+public:
+ static void TestPathRef(skiatest::Reporter* reporter) {
+ static const int kRepeatCnt = 10;
+
+ sk_sp<SkPathRef> pathRef(new SkPathRef);
+
+ SkPathRef::Editor ed(&pathRef);
+
+ {
+ ed.growForRepeatedVerb(SkPath::kMove_Verb, kRepeatCnt);
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs());
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints());
+ REPORTER_ASSERT(reporter, 0 == pathRef->getSegmentMasks());
+ for (int i = 0; i < kRepeatCnt; ++i) {
+ REPORTER_ASSERT(reporter, SkPath::kMove_Verb == pathRef->atVerb(i));
+ }
+ ed.resetToSize(0, 0, 0);
+ }
+
+ {
+ ed.growForRepeatedVerb(SkPath::kLine_Verb, kRepeatCnt);
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs());
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints());
+ REPORTER_ASSERT(reporter, SkPath::kLine_SegmentMask == pathRef->getSegmentMasks());
+ for (int i = 0; i < kRepeatCnt; ++i) {
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == pathRef->atVerb(i));
+ }
+ ed.resetToSize(0, 0, 0);
+ }
+
+ {
+ ed.growForRepeatedVerb(SkPath::kQuad_Verb, kRepeatCnt);
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs());
+ REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints());
+ REPORTER_ASSERT(reporter, SkPath::kQuad_SegmentMask == pathRef->getSegmentMasks());
+ for (int i = 0; i < kRepeatCnt; ++i) {
+ REPORTER_ASSERT(reporter, SkPath::kQuad_Verb == pathRef->atVerb(i));
+ }
+ ed.resetToSize(0, 0, 0);
+ }
+
+ {
+ SkScalar* weights = nullptr;
+ ed.growForRepeatedVerb(SkPath::kConic_Verb, kRepeatCnt, &weights);
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs());
+ REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints());
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countWeights());
+ REPORTER_ASSERT(reporter, SkPath::kConic_SegmentMask == pathRef->getSegmentMasks());
+ REPORTER_ASSERT(reporter, weights);
+ for (int i = 0; i < kRepeatCnt; ++i) {
+ REPORTER_ASSERT(reporter, SkPath::kConic_Verb == pathRef->atVerb(i));
+ }
+ ed.resetToSize(0, 0, 0);
+ }
+
+ {
+ ed.growForRepeatedVerb(SkPath::kCubic_Verb, kRepeatCnt);
+ REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs());
+ REPORTER_ASSERT(reporter, 3*kRepeatCnt == pathRef->countPoints());
+ REPORTER_ASSERT(reporter, SkPath::kCubic_SegmentMask == pathRef->getSegmentMasks());
+ for (int i = 0; i < kRepeatCnt; ++i) {
+ REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == pathRef->atVerb(i));
+ }
+ ed.resetToSize(0, 0, 0);
+ }
+ }
+};
+
+static void test_operatorEqual(skiatest::Reporter* reporter) {
+ SkPath a;
+ SkPath b;
+ REPORTER_ASSERT(reporter, a == a);
+ REPORTER_ASSERT(reporter, a == b);
+ a.setFillType(SkPath::kInverseWinding_FillType);
+ REPORTER_ASSERT(reporter, a != b);
+ a.reset();
+ REPORTER_ASSERT(reporter, a == b);
+ a.lineTo(1, 1);
+ REPORTER_ASSERT(reporter, a != b);
+ a.reset();
+ REPORTER_ASSERT(reporter, a == b);
+ a.lineTo(1, 1);
+ b.lineTo(1, 2);
+ REPORTER_ASSERT(reporter, a != b);
+ a.reset();
+ a.lineTo(1, 2);
+ REPORTER_ASSERT(reporter, a == b);
+}
+
+static void compare_dump(skiatest::Reporter* reporter, const SkPath& path, bool force,
+ bool dumpAsHex, const char* str) {
+ SkDynamicMemoryWStream wStream;
+ path.dump(&wStream, force, dumpAsHex);
+ sk_sp<SkData> data = wStream.detachAsData();
+ REPORTER_ASSERT(reporter, data->size() == strlen(str));
+ if (strlen(str) > 0) {
+ REPORTER_ASSERT(reporter, !memcmp(data->data(), str, strlen(str)));
+ } else {
+ REPORTER_ASSERT(reporter, data->data() == nullptr || !memcmp(data->data(), str, strlen(str)));
+ }
+}
+
+static void test_dump(skiatest::Reporter* reporter) {
+ SkPath p;
+ compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kWinding_FillType);\n");
+ compare_dump(reporter, p, true, false, "path.setFillType(SkPath::kWinding_FillType);\n");
+ p.moveTo(1, 2);
+ p.lineTo(3, 4);
+ compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kWinding_FillType);\n"
+ "path.moveTo(1, 2);\n"
+ "path.lineTo(3, 4);\n");
+ compare_dump(reporter, p, true, false, "path.setFillType(SkPath::kWinding_FillType);\n"
+ "path.moveTo(1, 2);\n"
+ "path.lineTo(3, 4);\n"
+ "path.lineTo(1, 2);\n"
+ "path.close();\n");
+ p.reset();
+ p.setFillType(SkPath::kEvenOdd_FillType);
+ p.moveTo(1, 2);
+ p.quadTo(3, 4, 5, 6);
+ compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kEvenOdd_FillType);\n"
+ "path.moveTo(1, 2);\n"
+ "path.quadTo(3, 4, 5, 6);\n");
+ p.reset();
+ p.setFillType(SkPath::kInverseWinding_FillType);
+ p.moveTo(1, 2);
+ p.conicTo(3, 4, 5, 6, 0.5f);
+ compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kInverseWinding_FillType);\n"
+ "path.moveTo(1, 2);\n"
+ "path.conicTo(3, 4, 5, 6, 0.5f);\n");
+ p.reset();
+ p.setFillType(SkPath::kInverseEvenOdd_FillType);
+ p.moveTo(1, 2);
+ p.cubicTo(3, 4, 5, 6, 7, 8);
+ compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kInverseEvenOdd_FillType);\n"
+ "path.moveTo(1, 2);\n"
+ "path.cubicTo(3, 4, 5, 6, 7, 8);\n");
+ p.reset();
+ p.setFillType(SkPath::kWinding_FillType);
+ p.moveTo(1, 2);
+ p.lineTo(3, 4);
+ compare_dump(reporter, p, false, true,
+ "path.setFillType(SkPath::kWinding_FillType);\n"
+ "path.moveTo(SkBits2Float(0x3f800000), SkBits2Float(0x40000000)); // 1, 2\n"
+ "path.lineTo(SkBits2Float(0x40400000), SkBits2Float(0x40800000)); // 3, 4\n");
+ p.reset();
+ p.moveTo(SkBits2Float(0x3f800000), SkBits2Float(0x40000000));
+ p.lineTo(SkBits2Float(0x40400000), SkBits2Float(0x40800000));
+ compare_dump(reporter, p, false, false, "path.setFillType(SkPath::kWinding_FillType);\n"
+ "path.moveTo(1, 2);\n"
+ "path.lineTo(3, 4);\n");
+}
+
+namespace {
+
+class ChangeListener : public SkPathRef::GenIDChangeListener {
+public:
+ ChangeListener(bool *changed) : fChanged(changed) { *fChanged = false; }
+ ~ChangeListener() override {}
+ void onChange() override {
+ *fChanged = true;
+ }
+private:
+ bool* fChanged;
+};
+
+}
+
+class PathTest_Private {
+public:
+ static void TestPathTo(skiatest::Reporter* reporter) {
+ SkPath p, q;
+ p.lineTo(4, 4);
+ p.reversePathTo(q);
+ check_path_is_line(reporter, &p, 4, 4);
+ q.moveTo(-4, -4);
+ p.reversePathTo(q);
+ check_path_is_line(reporter, &p, 4, 4);
+ q.lineTo(7, 8);
+ q.conicTo(8, 7, 6, 5, 0.5f);
+ q.quadTo(6, 7, 8, 6);
+ q.cubicTo(5, 6, 7, 8, 7, 5);
+ q.close();
+ p.reversePathTo(q);
+ SkRect reverseExpected = {-4, -4, 8, 8};
+ REPORTER_ASSERT(reporter, p.getBounds() == reverseExpected);
+ }
+
+ static void TestPathrefListeners(skiatest::Reporter* reporter) {
+ SkPath p;
+
+ bool changed = false;
+ p.moveTo(0, 0);
+
+ // Check that listener is notified on moveTo().
+
+ SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed));
+ REPORTER_ASSERT(reporter, !changed);
+ p.moveTo(10, 0);
+ REPORTER_ASSERT(reporter, changed);
+
+ // Check that listener is notified on lineTo().
+ SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed));
+ REPORTER_ASSERT(reporter, !changed);
+ p.lineTo(20, 0);
+ REPORTER_ASSERT(reporter, changed);
+
+ // Check that listener is notified on reset().
+ SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed));
+ REPORTER_ASSERT(reporter, !changed);
+ p.reset();
+ REPORTER_ASSERT(reporter, changed);
+
+ p.moveTo(0, 0);
+
+ // Check that listener is notified on rewind().
+ SkPathPriv::AddGenIDChangeListener(p, new ChangeListener(&changed));
+ REPORTER_ASSERT(reporter, !changed);
+ p.rewind();
+ REPORTER_ASSERT(reporter, changed);
+
+ // Check that listener is notified when pathref is deleted.
+ {
+ SkPath q;
+ q.moveTo(10, 10);
+ SkPathPriv::AddGenIDChangeListener(q, new ChangeListener(&changed));
+ REPORTER_ASSERT(reporter, !changed);
+ }
+ // q went out of scope.
+ REPORTER_ASSERT(reporter, changed);
+ }
+};
+
+static void test_crbug_629455(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.cubicTo(SkBits2Float(0xcdcdcd00), SkBits2Float(0xcdcdcdcd),
+ SkBits2Float(0xcdcdcdcd), SkBits2Float(0xcdcdcdcd),
+ SkBits2Float(0x423fcdcd), SkBits2Float(0x40ed9341));
+// AKA: cubicTo(-4.31596e+08f, -4.31602e+08f, -4.31602e+08f, -4.31602e+08f, 47.951f, 7.42423f);
+ path.lineTo(0, 0);
+
+ auto surface = SkSurface::MakeRasterN32Premul(100, 100);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ surface->getCanvas()->drawPath(path, paint);
+}
+
+static void test_fuzz_crbug_662952(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f
+ path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411c0000)); // 8.65f, 9.75f
+ path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411e6666)); // 8.65f, 9.9f
+ path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411e6666)); // 8.6f, 9.9f
+ path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f
+ path.close();
+
+ auto surface = SkSurface::MakeRasterN32Premul(100, 100);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ surface->getCanvas()->clipPath(path, true);
+ surface->getCanvas()->drawRect(SkRect::MakeWH(100, 100), paint);
+}
+
+static void test_path_crbugskia6003() {
+ auto surface(SkSurface::MakeRasterN32Premul(500, 500));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(SkBits2Float(0x4325e666), SkBits2Float(0x42a1999a)); // 165.9f, 80.8f
+ path.lineTo(SkBits2Float(0x4325e666), SkBits2Float(0x42a2999a)); // 165.9f, 81.3f
+ path.lineTo(SkBits2Float(0x4325b333), SkBits2Float(0x42a2999a)); // 165.7f, 81.3f
+ path.lineTo(SkBits2Float(0x4325b333), SkBits2Float(0x42a16666)); // 165.7f, 80.7f
+ path.lineTo(SkBits2Float(0x4325b333), SkBits2Float(0x429f6666)); // 165.7f, 79.7f
+ // 165.7f, 79.7f, 165.8f, 79.7f, 165.8f, 79.7f
+ path.cubicTo(SkBits2Float(0x4325b333), SkBits2Float(0x429f6666), SkBits2Float(0x4325cccc),
+ SkBits2Float(0x429f6666), SkBits2Float(0x4325cccc), SkBits2Float(0x429f6666));
+ // 165.8f, 79.7f, 165.8f, 79.7f, 165.9f, 79.7f
+ path.cubicTo(SkBits2Float(0x4325cccc), SkBits2Float(0x429f6666), SkBits2Float(0x4325cccc),
+ SkBits2Float(0x429f6666), SkBits2Float(0x4325e666), SkBits2Float(0x429f6666));
+ path.lineTo(SkBits2Float(0x4325e666), SkBits2Float(0x42a1999a)); // 165.9f, 80.8f
+ path.close();
+ canvas->clipPath(path, true);
+ canvas->drawRect(SkRect::MakeWH(500, 500), paint);
+}
+
+static void test_fuzz_crbug_662730(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.lineTo(SkBits2Float(0xd5394437), SkBits2Float(0x37373737)); // -1.2731e+13f, 1.09205e-05f
+ path.lineTo(SkBits2Float(0x37373737), SkBits2Float(0x37373737)); // 1.09205e-05f, 1.09205e-05f
+ path.lineTo(SkBits2Float(0x37373745), SkBits2Float(0x0001b800)); // 1.09205e-05f, 1.57842e-40f
+ path.close();
+
+ auto surface = SkSurface::MakeRasterN32Premul(100, 100);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ surface->getCanvas()->drawPath(path, paint);
+}
+
+#if !defined(SK_SUPPORT_LEGACY_DELTA_AA)
+static void test_skbug_6947() {
+ SkPath path;
+ SkPoint points[] =
+ {{125.126022f, -0.499872506f}, {125.288895f, -0.499338806f},
+ {125.299316f, -0.499290764f}, {126.294594f, 0.505449712f},
+ {125.999992f, 62.5047531f}, {124.0f, 62.4980202f},
+ {124.122749f, 0.498142242f}, {125.126022f, -0.499872506f},
+ {125.119476f, 1.50011659f}, {125.122749f, 0.50012207f},
+ {126.122749f, 0.502101898f}, {126.0f, 62.5019798f},
+ {125.0f, 62.5f}, {124.000008f, 62.4952469f},
+ {124.294609f, 0.495946467f}, {125.294601f, 0.50069809f},
+ {125.289886f, 1.50068688f}, {125.282349f, 1.50065041f},
+ {125.119476f, 1.50011659f}};
+ constexpr SkPath::Verb kMove = SkPath::kMove_Verb;
+ constexpr SkPath::Verb kLine = SkPath::kLine_Verb;
+ constexpr SkPath::Verb kClose = SkPath::kClose_Verb;
+ SkPath::Verb verbs[] = {kMove, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kClose,
+ kMove, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kLine, kClose};
+ int pointIndex = 0;
+ for(auto verb : verbs) {
+ switch (verb) {
+ case kMove:
+ path.moveTo(points[pointIndex++]);
+ break;
+ case kLine:
+ path.lineTo(points[pointIndex++]);
+ break;
+ case kClose:
+ default:
+ path.close();
+ break;
+ }
+ }
+
+ auto surface = SkSurface::MakeRasterN32Premul(250, 125);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ surface->getCanvas()->drawPath(path, paint);
+}
+#endif
+
+static void test_interp(skiatest::Reporter* reporter) {
+ SkPath p1, p2, out;
+ REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));
+ REPORTER_ASSERT(reporter, p1.interpolate(p2, 0, &out));
+ REPORTER_ASSERT(reporter, p1 == out);
+ REPORTER_ASSERT(reporter, p1.interpolate(p2, 1, &out));
+ REPORTER_ASSERT(reporter, p1 == out);
+ p1.moveTo(0, 2);
+ p1.lineTo(0, 4);
+ REPORTER_ASSERT(reporter, !p1.isInterpolatable(p2));
+ REPORTER_ASSERT(reporter, !p1.interpolate(p2, 1, &out));
+ p2.moveTo(6, 0);
+ p2.lineTo(8, 0);
+ REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));
+ REPORTER_ASSERT(reporter, p1.interpolate(p2, 0, &out));
+ REPORTER_ASSERT(reporter, p2 == out);
+ REPORTER_ASSERT(reporter, p1.interpolate(p2, 1, &out));
+ REPORTER_ASSERT(reporter, p1 == out);
+ REPORTER_ASSERT(reporter, p1.interpolate(p2, 0.5f, &out));
+ REPORTER_ASSERT(reporter, out.getBounds() == SkRect::MakeLTRB(3, 1, 4, 2));
+ p1.reset();
+ p1.moveTo(4, 4);
+ p1.conicTo(5, 4, 5, 5, 1 / SkScalarSqrt(2));
+ p2.reset();
+ p2.moveTo(4, 2);
+ p2.conicTo(7, 2, 7, 5, 1 / SkScalarSqrt(2));
+ REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));
+ REPORTER_ASSERT(reporter, p1.interpolate(p2, 0.5f, &out));
+ REPORTER_ASSERT(reporter, out.getBounds() == SkRect::MakeLTRB(4, 3, 6, 5));
+ p2.reset();
+ p2.moveTo(4, 2);
+ p2.conicTo(6, 3, 6, 5, 1);
+ REPORTER_ASSERT(reporter, !p1.isInterpolatable(p2));
+ p2.reset();
+ p2.moveTo(4, 4);
+ p2.conicTo(5, 4, 5, 5, 0.5f);
+ REPORTER_ASSERT(reporter, !p1.isInterpolatable(p2));
+}
+
+DEF_TEST(PathInterp, reporter) {
+ test_interp(reporter);
+}
+
+#include "SkSurface.h"
+DEF_TEST(PathBigCubic, reporter) {
+ SkPath path;
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.moveTo(SkBits2Float(0x44000000), SkBits2Float(0x373938b8)); // 512, 1.10401e-05f
+ path.cubicTo(SkBits2Float(0x00000001), SkBits2Float(0xdf000052), SkBits2Float(0x00000100), SkBits2Float(0x00000000), SkBits2Float(0x00000100), SkBits2Float(0x00000000)); // 1.4013e-45f, -9.22346e+18f, 3.58732e-43f, 0, 3.58732e-43f, 0
+ path.moveTo(0, 512);
+
+ // this call should not assert
+ SkSurface::MakeRasterN32Premul(255, 255, nullptr)->getCanvas()->drawPath(path, SkPaint());
+}
+
+DEF_TEST(PathContains, reporter) {
+ test_contains(reporter);
+}
+
+DEF_TEST(Paths, reporter) {
+ test_fuzz_crbug_647922();
+ test_fuzz_crbug_643933();
+ test_sect_with_horizontal_needs_pinning();
+ test_crbug_629455(reporter);
+ test_fuzz_crbug_627414(reporter);
+ test_path_crbug364224();
+ test_fuzz_crbug_662952(reporter);
+ test_fuzz_crbug_662730(reporter);
+ test_fuzz_crbug_662780();
+ test_mask_overflow();
+ test_path_crbugskia6003();
+ test_fuzz_crbug_668907();
+#if !defined(SK_SUPPORT_LEGACY_DELTA_AA)
+ test_skbug_6947();
+#endif
+
+ SkSize::Make(3, 4);
+
+ SkPath p, empty;
+ SkRect bounds, bounds2;
+ test_empty(reporter, p);
+
+ REPORTER_ASSERT(reporter, p.getBounds().isEmpty());
+
+ // this triggers a code path in SkPath::operator= which is otherwise unexercised
+ SkPath& self = p;
+ p = self;
+
+ // this triggers a code path in SkPath::swap which is otherwise unexercised
+ p.swap(self);
+
+ bounds.set(0, 0, SK_Scalar1, SK_Scalar1);
+
+ p.addRoundRect(bounds, SK_Scalar1, SK_Scalar1);
+ check_convex_bounds(reporter, p, bounds);
+ // we have quads or cubics
+ REPORTER_ASSERT(reporter,
+ p.getSegmentMasks() & (kCurveSegmentMask | SkPath::kConic_SegmentMask));
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+
+ p.reset();
+ test_empty(reporter, p);
+
+ p.addOval(bounds);
+ check_convex_bounds(reporter, p, bounds);
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+
+ p.rewind();
+ test_empty(reporter, p);
+
+ p.addRect(bounds);
+ check_convex_bounds(reporter, p, bounds);
+ // we have only lines
+ REPORTER_ASSERT(reporter, SkPath::kLine_SegmentMask == p.getSegmentMasks());
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+
+ REPORTER_ASSERT(reporter, p != empty);
+ REPORTER_ASSERT(reporter, !(p == empty));
+
+ // do getPoints and getVerbs return the right result
+ REPORTER_ASSERT(reporter, p.getPoints(nullptr, 0) == 4);
+ REPORTER_ASSERT(reporter, p.getVerbs(nullptr, 0) == 5);
+ SkPoint pts[4];
+ int count = p.getPoints(pts, 4);
+ REPORTER_ASSERT(reporter, count == 4);
+ uint8_t verbs[6];
+ verbs[5] = 0xff;
+ p.getVerbs(verbs, 5);
+ REPORTER_ASSERT(reporter, SkPath::kMove_Verb == verbs[0]);
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[1]);
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[2]);
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[3]);
+ REPORTER_ASSERT(reporter, SkPath::kClose_Verb == verbs[4]);
+ REPORTER_ASSERT(reporter, 0xff == verbs[5]);
+ bounds2.set(pts, 4);
+ REPORTER_ASSERT(reporter, bounds == bounds2);
+
+ bounds.offset(SK_Scalar1*3, SK_Scalar1*4);
+ p.offset(SK_Scalar1*3, SK_Scalar1*4);
+ REPORTER_ASSERT(reporter, bounds == p.getBounds());
+
+ REPORTER_ASSERT(reporter, p.isRect(nullptr));
+ bounds2.setEmpty();
+ REPORTER_ASSERT(reporter, p.isRect(&bounds2));
+ REPORTER_ASSERT(reporter, bounds == bounds2);
+
+ // now force p to not be a rect
+ bounds.set(0, 0, SK_Scalar1/2, SK_Scalar1/2);
+ p.addRect(bounds);
+ REPORTER_ASSERT(reporter, !p.isRect(nullptr));
+
+ // Test an edge case w.r.t. the bound returned by isRect (i.e., the
+ // path has a trailing moveTo. Please see crbug.com\445368)
+ {
+ SkRect r;
+ p.reset();
+ p.addRect(bounds);
+ REPORTER_ASSERT(reporter, p.isRect(&r));
+ REPORTER_ASSERT(reporter, r == bounds);
+ // add a moveTo outside of our bounds
+ p.moveTo(bounds.fLeft + 10, bounds.fBottom + 10);
+ REPORTER_ASSERT(reporter, p.isRect(&r));
+ REPORTER_ASSERT(reporter, r == bounds);
+ }
+
+ test_operatorEqual(reporter);
+ test_isLine(reporter);
+ test_isRect(reporter);
+ test_is_simple_closed_rect(reporter);
+ test_isNestedFillRects(reporter);
+ test_zero_length_paths(reporter);
+ test_direction(reporter);
+ test_convexity(reporter);
+ test_convexity2(reporter);
+ test_conservativelyContains(reporter);
+ test_close(reporter);
+ test_segment_masks(reporter);
+ test_flattening(reporter);
+ test_transform(reporter);
+ test_bounds(reporter);
+ test_iter(reporter);
+ test_raw_iter(reporter);
+ test_circle(reporter);
+ test_oval(reporter);
+ test_strokerec(reporter);
+ test_addPoly(reporter);
+ test_isfinite(reporter);
+ test_isfinite_after_transform(reporter);
+ test_islastcontourclosed(reporter);
+ test_arb_round_rect_is_convex(reporter);
+ test_arb_zero_rad_round_rect_is_rect(reporter);
+ test_addrect(reporter);
+ test_addrect_isfinite(reporter);
+ test_tricky_cubic();
+ test_clipped_cubic();
+ test_crbug_170666();
+ test_crbug_493450(reporter);
+ test_crbug_495894(reporter);
+ test_crbug_613918();
+ test_bad_cubic_crbug229478();
+ test_bad_cubic_crbug234190();
+ test_gen_id(reporter);
+ test_path_close_issue1474(reporter);
+ test_path_to_region(reporter);
+ test_rrect(reporter);
+ test_arc(reporter);
+ test_arc_ovals(reporter);
+ test_arcTo(reporter);
+ test_addPath(reporter);
+ test_addPathMode(reporter, false, false);
+ test_addPathMode(reporter, true, false);
+ test_addPathMode(reporter, false, true);
+ test_addPathMode(reporter, true, true);
+ test_extendClosedPath(reporter);
+ test_addEmptyPath(reporter, SkPath::kExtend_AddPathMode);
+ test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode);
+ test_conicTo_special_case(reporter);
+ test_get_point(reporter);
+ test_contains(reporter);
+ PathTest_Private::TestPathTo(reporter);
+ PathRefTest_Private::TestPathRef(reporter);
+ PathTest_Private::TestPathrefListeners(reporter);
+ test_dump(reporter);
+ test_path_crbug389050(reporter);
+ test_path_crbugskia2820(reporter);
+ test_path_crbugskia5995();
+ test_skbug_3469(reporter);
+ test_skbug_3239(reporter);
+ test_bounds_crbug_513799(reporter);
+ test_fuzz_crbug_638223();
+}
+
+DEF_TEST(conservatively_contains_rect, reporter) {
+ SkPath path;
+
+ path.moveTo(SkBits2Float(0x44000000), SkBits2Float(0x373938b8)); // 512, 1.10401e-05f
+ // 1.4013e-45f, -9.22346e+18f, 3.58732e-43f, 0, 3.58732e-43f, 0
+ path.cubicTo(SkBits2Float(0x00000001), SkBits2Float(0xdf000052),
+ SkBits2Float(0x00000100), SkBits2Float(0x00000000),
+ SkBits2Float(0x00000100), SkBits2Float(0x00000000));
+ path.moveTo(0, 0);
+
+ // this guy should not assert
+ path.conservativelyContainsRect({ -211747, 12.1115f, -197893, 25.0321f });
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void rand_path(SkPath* path, SkRandom& rand, SkPath::Verb verb, int n) {
+ for (int i = 0; i < n; ++i) {
+ switch (verb) {
+ case SkPath::kLine_Verb:
+ path->lineTo(rand.nextF()*100, rand.nextF()*100);
+ break;
+ case SkPath::kQuad_Verb:
+ path->quadTo(rand.nextF()*100, rand.nextF()*100,
+ rand.nextF()*100, rand.nextF()*100);
+ break;
+ case SkPath::kConic_Verb:
+ path->conicTo(rand.nextF()*100, rand.nextF()*100,
+ rand.nextF()*100, rand.nextF()*100, rand.nextF()*10);
+ break;
+ case SkPath::kCubic_Verb:
+ path->cubicTo(rand.nextF()*100, rand.nextF()*100,
+ rand.nextF()*100, rand.nextF()*100,
+ rand.nextF()*100, rand.nextF()*100);
+ break;
+ default:
+ SkASSERT(false);
+ }
+ }
+}
+
+#include "SkPathOps.h"
+DEF_TEST(path_tight_bounds, reporter) {
+ SkRandom rand;
+
+ const SkPath::Verb verbs[] = {
+ SkPath::kLine_Verb, SkPath::kQuad_Verb, SkPath::kConic_Verb, SkPath::kCubic_Verb,
+ };
+ for (int i = 0; i < 1000; ++i) {
+ for (int n = 1; n <= 10; n += 9) {
+ for (SkPath::Verb verb : verbs) {
+ SkPath path;
+ rand_path(&path, rand, verb, n);
+ SkRect bounds = path.getBounds();
+ SkRect tight = path.computeTightBounds();
+ REPORTER_ASSERT(reporter, bounds.contains(tight));
+
+ SkRect tight2;
+ TightBounds(path, &tight2);
+ REPORTER_ASSERT(reporter, nearly_equal(tight, tight2));
+ }
+ }
+ }
+}
+
+DEF_TEST(skbug_6450, r) {
+ SkRect ri = { 0.18554693f, 195.26283f, 0.185784385f, 752.644409f };
+ SkVector rdi[4] = {
+ { 1.81159976e-09f, 7.58768801e-05f },
+ { 0.000118725002f, 0.000118725002f },
+ { 0.000118725002f, 0.000118725002f },
+ { 0.000118725002f, 0.486297607f }
+ };
+ SkRRect irr;
+ irr.setRectRadii(ri, rdi);
+ SkRect ro = { 9.18354821e-39f, 2.1710848e+9f, 2.16945843e+9f, 3.47808128e+9f };
+ SkVector rdo[4] = {
+ { 0, 0 },
+ { 0.0103298295f, 0.185887396f },
+ { 2.52999727e-29f, 169.001938f },
+ { 195.262741f, 195.161255f }
+ };
+ SkRRect orr;
+ orr.setRectRadii(ro, rdo);
+ SkMakeNullCanvas()->drawDRRect(orr, irr, SkPaint());
+}
+
+DEF_TEST(PathRefSerialization, reporter) {
+ SkPath path;
+ const size_t numMoves = 5;
+ const size_t numConics = 7;
+ const size_t numPoints = numMoves + 2 * numConics;
+ const size_t numVerbs = numMoves + numConics;
+ for (size_t i = 0; i < numMoves; ++i) path.moveTo(1, 2);
+ for (size_t i = 0; i < numConics; ++i) path.conicTo(1, 2, 3, 4, 5);
+ REPORTER_ASSERT(reporter, path.countPoints() == numPoints);
+ REPORTER_ASSERT(reporter, path.countVerbs() == numVerbs);
+
+ // Verify that path serializes/deserializes properly.
+ sk_sp<SkData> data = path.serialize();
+ size_t bytesWritten = data->size();
+
+ {
+ SkPath readBack;
+ REPORTER_ASSERT(reporter, readBack != path);
+ size_t bytesRead = readBack.readFromMemory(data->data(), bytesWritten);
+ REPORTER_ASSERT(reporter, bytesRead == bytesWritten);
+ REPORTER_ASSERT(reporter, readBack == path);
+ }
+
+ // uint32_t[] offset into serialized path.
+ const size_t verbCountOffset = 4;
+ const size_t pointCountOffset = 5;
+ const size_t conicCountOffset = 6;
+
+ // Verify that this test is changing the right values.
+ const int* writtenValues = static_cast<const int*>(data->data());
+ REPORTER_ASSERT(reporter, writtenValues[verbCountOffset] == numVerbs);
+ REPORTER_ASSERT(reporter, writtenValues[pointCountOffset] == numPoints);
+ REPORTER_ASSERT(reporter, writtenValues[conicCountOffset] == numConics);
+
+ // Too many verbs, points, or conics fails to deserialize silently.
+ const int tooManyObjects = INT_MAX;
+ size_t offsets[] = {verbCountOffset, pointCountOffset, conicCountOffset};
+ for (size_t i = 0; i < 3; ++i) {
+ SkAutoMalloc storage_copy(bytesWritten);
+ memcpy(storage_copy.get(), data->data(), bytesWritten);
+ static_cast<int*>(storage_copy.get())[offsets[i]] = tooManyObjects;
+ SkPath readBack;
+ size_t bytesRead = readBack.readFromMemory(storage_copy.get(), bytesWritten);
+ REPORTER_ASSERT(reporter, !bytesRead);
+ }
+
+ // One less byte (rounded down to alignment) than was written will also
+ // fail to be deserialized.
+ {
+ SkPath readBack;
+ size_t bytesRead = readBack.readFromMemory(data->data(), bytesWritten - 4);
+ REPORTER_ASSERT(reporter, !bytesRead);
+ }
+}
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index 799405e558..19032a1537 100644 --- a/tests/PictureTest.cpp +++ b/tests/PictureTest.cpp @@ -942,7 +942,7 @@ DEF_TEST(DontOptimizeSaveLayerDrawDrawRestore, reporter) { SkCanvas* canvas = recorder.beginRecording(100, 100); canvas->drawColor(0); - canvas->saveLayer(0, &semiTransparent); + canvas->saveLayer(nullptr, &semiTransparent); canvas->drawBitmap(blueBM, 25, 25); canvas->drawBitmap(redBM, 50, 50); canvas->restore(); diff --git a/tests/RecordDrawTest.cpp b/tests/RecordDrawTest.cpp index 1dbd945c0e..f50081fd29 100644 --- a/tests/RecordDrawTest.cpp +++ b/tests/RecordDrawTest.cpp @@ -291,7 +291,7 @@ DEF_TEST(RecordDraw_drawImage, r){ SkRecord record; SkRecorder recorder(&record, 10, 10); recorder.drawImage(image, 0, 0); - SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, 0); + SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, nullptr); } REPORTER_ASSERT(r, canvas.fDrawImageCalled); canvas.resetTestValues(); @@ -300,7 +300,7 @@ DEF_TEST(RecordDraw_drawImage, r){ SkRecord record; SkRecorder recorder(&record, 10, 10); recorder.drawImageRect(image, SkRect::MakeWH(10, 10), nullptr); - SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, 0); + SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, nullptr); } REPORTER_ASSERT(r, canvas.fDrawImageRectCalled); diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp index 5f8770dda6..02b75dd8c9 100644 --- a/tests/SkResourceCacheTest.cpp +++ b/tests/SkResourceCacheTest.cpp @@ -108,7 +108,7 @@ static void test_mipmap_notify(skiatest::Reporter* reporter, SkResourceCache* ca #include "SkDiscardableMemoryPool.h" -static SkDiscardableMemoryPool* gPool = 0; +static SkDiscardableMemoryPool* gPool = nullptr; static SkDiscardableMemory* pool_factory(size_t bytes) { SkASSERT(gPool); return gPool->create(bytes); diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp index 1da94bb8a6..f7660bd2f0 100644 --- a/tests/TypefaceTest.cpp +++ b/tests/TypefaceTest.cpp @@ -172,10 +172,10 @@ DEF_TEST(Typeface, reporter) { sk_sp<SkTypeface> t2(SkTypeface::MakeDefault(SkTypeface::kNormal)); REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), t2.get())); - REPORTER_ASSERT(reporter, SkTypeface::Equal(0, t1.get())); - REPORTER_ASSERT(reporter, SkTypeface::Equal(0, t2.get())); - REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), 0)); - REPORTER_ASSERT(reporter, SkTypeface::Equal(t2.get(), 0)); + REPORTER_ASSERT(reporter, SkTypeface::Equal(nullptr, t1.get())); + REPORTER_ASSERT(reporter, SkTypeface::Equal(nullptr, t2.get())); + REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), nullptr)); + REPORTER_ASSERT(reporter, SkTypeface::Equal(t2.get(), nullptr)); #ifdef SK_BUILD_FOR_ANDROID sk_sp<SkTypeface> t3(SkTypeface::MakeFromName("non-existent-font", SkFontStyle())); diff --git a/third_party/gif/SkGifImageReader.h b/third_party/gif/SkGifImageReader.h index 69045dd6d1..ebb805e5c5 100644 --- a/third_party/gif/SkGifImageReader.h +++ b/third_party/gif/SkGifImageReader.h @@ -104,7 +104,7 @@ public: , ipass(0) , irow(0) , rowsRemaining(0) - , rowIter(0) + , rowIter(nullptr) , m_client(client) , m_frameContext(frameContext) { } @@ -348,7 +348,7 @@ public: const SkGIFFrameContext* frameContext(int index) const { return index >= 0 && index < static_cast<int>(m_frames.size()) - ? m_frames[index].get() : 0; + ? m_frames[index].get() : nullptr; } void clearDecodeState() { diff --git a/tools/SkShaper_harfbuzz.cpp b/tools/SkShaper_harfbuzz.cpp index 9c7d69e92d..34fc712829 100644 --- a/tools/SkShaper_harfbuzz.cpp +++ b/tools/SkShaper_harfbuzz.cpp @@ -101,9 +101,9 @@ SkScalar SkShaper::shape(SkTextBlobBuilder* builder, return 0; } - hb_glyph_info_t* info = hb_buffer_get_glyph_infos(buffer, NULL); + hb_glyph_info_t* info = hb_buffer_get_glyph_infos(buffer, nullptr); hb_glyph_position_t* pos = - hb_buffer_get_glyph_positions(buffer, NULL); + hb_buffer_get_glyph_positions(buffer, nullptr); auto runBuffer = builder->allocRunTextPos( paint, SkToInt(len), SkToInt(textBytes), SkString()); memcpy(runBuffer.utf8text, utf8text, textBytes); diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp index 251604e1d9..8cee07f783 100644 --- a/tools/debugger/SkDrawCommand.cpp +++ b/tools/debugger/SkDrawCommand.cpp @@ -740,14 +740,14 @@ static void write_png_callback(png_structp png_ptr, png_bytep data, png_size_t l void SkDrawCommand::WritePNG(const uint8_t* rgba, unsigned width, unsigned height, SkWStream& out, bool isOpaque) { - png_structp png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + png_structp png = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); SkASSERT(png != nullptr); png_infop info_ptr = png_create_info_struct(png); SkASSERT(info_ptr != nullptr); if (setjmp(png_jmpbuf(png))) { SK_ABORT("png encode error"); } - png_set_write_fn(png, &out, write_png_callback, NULL); + png_set_write_fn(png, &out, write_png_callback, nullptr); int colorType = isOpaque ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_RGBA; png_set_IHDR(png, info_ptr, width, height, 8, colorType, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); @@ -770,7 +770,7 @@ void SkDrawCommand::WritePNG(const uint8_t* rgba, unsigned width, unsigned heigh } png_set_filter(png, 0, PNG_NO_FILTERS); png_write_image(png, &rows[0]); - png_destroy_write_struct(&png, NULL); + png_destroy_write_struct(&png, nullptr); sk_free(rows); sk_free(pixels); } diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp index 69382b412e..b4bcf68906 100644 --- a/tools/flags/SkCommandLineFlags.cpp +++ b/tools/flags/SkCommandLineFlags.cpp @@ -395,7 +395,7 @@ bool ShouldSkipImpl(const Strings& strings, const char* name) { && strncmp(name, matchName, matchLen) == 0 : matchEnd ? matchLen <= testLen && strncmp(name + testLen - matchLen, matchName, matchLen) == 0 - : strstr(name, matchName) != 0) { + : strstr(name, matchName) != nullptr) { return matchExclude; } } diff --git a/tools/gpu/gl/GLTestContext.h b/tools/gpu/gl/GLTestContext.h index fb63ac3140..b5dd9acf8a 100644 --- a/tools/gpu/gl/GLTestContext.h +++ b/tools/gpu/gl/GLTestContext.h @@ -30,7 +30,7 @@ public: const GrGLInterface *gl() const { return fGL.get(); } /** Used for testing EGLImage integration. Take a GL_TEXTURE_2D and wraps it in an EGL Image */ - virtual GrEGLImage texture2DToEGLImage(GrGLuint /*texID*/) const { return 0; } + virtual GrEGLImage texture2DToEGLImage(GrGLuint /*texID*/) const { return nullptr; } virtual void destroyEGLImage(GrEGLImage) const { } diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp index 29dd1b4996..f5c0bc002e 100644 --- a/tools/skiaserve/skiaserve.cpp +++ b/tools/skiaserve/skiaserve.cpp @@ -110,7 +110,7 @@ int skiaserve_main() { &answer_to_connection, &request, MHD_OPTION_SOCK_ADDR, &address, MHD_OPTION_END); - if (NULL == daemon) { + if (nullptr == daemon) { SkDebugf("Could not initialize daemon\n"); return 1; } diff --git a/tools/viewer/sk_app/unix/main_unix.cpp b/tools/viewer/sk_app/unix/main_unix.cpp index beb3eda10e..2837c0332e 100644 --- a/tools/viewer/sk_app/unix/main_unix.cpp +++ b/tools/viewer/sk_app/unix/main_unix.cpp @@ -44,7 +44,7 @@ int main(int argc, char**argv) { while (!XPending(display)) { // Wait for an event on the file descriptor or for timer expiration - (void) select(count, &in_fds, NULL, NULL, &tv); + (void) select(count, &in_fds, nullptr, nullptr, &tv); } // Handle XEvents (if any) and flush the input |