Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@10299 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-07-24 07:01:12 +00:00
parent a7aa810894
commit 7f1af501f2
15 changed files with 203 additions and 206 deletions

View File

@ -99,4 +99,3 @@ static BenchRegistry gReg0(Fact0);
static BenchRegistry gReg1(Fact1); static BenchRegistry gReg1(Fact1);
static BenchRegistry gReg2(Fact2); static BenchRegistry gReg2(Fact2);
static BenchRegistry gReg3(Fact3); static BenchRegistry gReg3(Fact3);

View File

@ -9,4 +9,3 @@ PdfContext::PdfContext(SkNativeParsedPDF* doc)
PdfContext::~PdfContext() { PdfContext::~PdfContext() {
delete fTmpPageAllocator; delete fTmpPageAllocator;
} }

View File

@ -93,7 +93,7 @@ static void test_surface(SkCanvas* canvas, SkSurface* surf, bool usePaint) {
SkRect src1, src2, src3; SkRect src1, src2, src3;
src1.iset(0, 0, surf->width(), surf->height()); src1.iset(0, 0, surf->width(), surf->height());
src2.iset(-surf->width() / 2, -surf->height() / 2, src2.iset(-surf->width() / 2, -surf->height() / 2,
surf->width(), surf->height()); surf->width(), surf->height());
src3.iset(0, 0, surf->width() / 2, surf->height() / 2); src3.iset(0, 0, surf->width() / 2, surf->height() / 2);

View File

@ -84,14 +84,14 @@ public:
void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*);
/** /**
* Draw the image, cropped to the src rect, to the dst rect of a canvas. * Draw the image, cropped to the src rect, to the dst rect of a canvas.
* If src is larger than the bounds of the image, the rest of the image is * If src is larger than the bounds of the image, the rest of the image is
* filled with transparent black pixels. * filled with transparent black pixels.
* *
* See SkCanvas::drawBitmapRectToRect for similar behavior. * See SkCanvas::drawBitmapRectToRect for similar behavior.
*/ */
void draw(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*); void draw(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*);
/** /**
* Encode the image's pixels and return the result as a new SkData, which * Encode the image's pixels and return the result as a new SkData, which
* the caller must manage (i.e. call unref() when they are done). * the caller must manage (i.e. call unref() when they are done).

View File

@ -145,7 +145,7 @@ void SkBitmapProcState::possiblyScaleImage() {
SkScalar invScaleX = fInvMatrix.getScaleX(); SkScalar invScaleX = fInvMatrix.getScaleX();
SkScalar invScaleY = fInvMatrix.getScaleY(); SkScalar invScaleY = fInvMatrix.getScaleY();
SkASSERT(NULL == fScaledCacheID); SkASSERT(NULL == fScaledCacheID);
fScaledCacheID = SkScaledImageCache::FindAndLock(fOrigBitmap, fScaledCacheID = SkScaledImageCache::FindAndLock(fOrigBitmap,
invScaleX, invScaleY, invScaleX, invScaleY,
@ -250,7 +250,7 @@ void SkBitmapProcState::endContext() {
SkDELETE(fBitmapFilter); SkDELETE(fBitmapFilter);
fBitmapFilter = NULL; fBitmapFilter = NULL;
fScaledBitmap.reset(); fScaledBitmap.reset();
if (fScaledCacheID) { if (fScaledCacheID) {
SkScaledImageCache::Unlock(fScaledCacheID); SkScaledImageCache::Unlock(fScaledCacheID);
fScaledCacheID = NULL; fScaledCacheID = NULL;

View File

@ -17,26 +17,26 @@
// Implemented from en.wikipedia.org/wiki/MurmurHash. // Implemented from en.wikipedia.org/wiki/MurmurHash.
static uint32_t compute_hash(const uint32_t data[], int count) { static uint32_t compute_hash(const uint32_t data[], int count) {
uint32_t hash = 0; uint32_t hash = 0;
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
uint32_t k = data[i]; uint32_t k = data[i];
k *= 0xcc9e2d51; k *= 0xcc9e2d51;
k = (k << 15) | (k >> 17); k = (k << 15) | (k >> 17);
k *= 0x1b873593; k *= 0x1b873593;
hash ^= k; hash ^= k;
hash = (hash << 13) | (hash >> 19); hash = (hash << 13) | (hash >> 19);
hash *= 5; hash *= 5;
hash += 0xe6546b64; hash += 0xe6546b64;
} }
// hash ^= size; // hash ^= size;
hash ^= hash >> 16; hash ^= hash >> 16;
hash *= 0x85ebca6b; hash *= 0x85ebca6b;
hash ^= hash >> 13; hash ^= hash >> 13;
hash *= 0xc2b2ae35; hash *= 0xc2b2ae35;
hash ^= hash >> 16; hash ^= hash >> 16;
return hash; return hash;
} }
#else #else
@ -46,7 +46,7 @@ static uint32_t mix(uint32_t a, uint32_t b) {
static uint32_t compute_hash(const uint32_t data[], int count) { static uint32_t compute_hash(const uint32_t data[], int count) {
uint32_t hash = 0; uint32_t hash = 0;
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
hash = mix(hash, data[i]); hash = mix(hash, data[i]);
} }
@ -219,7 +219,7 @@ void SkScaledImageCache::unlock(SkScaledImageCache::ID* id) {
void SkScaledImageCache::purgeAsNeeded() { void SkScaledImageCache::purgeAsNeeded() {
size_t byteLimit = fByteLimit; size_t byteLimit = fByteLimit;
size_t bytesUsed = fBytesUsed; size_t bytesUsed = fBytesUsed;
Rec* rec = fTail; Rec* rec = fTail;
while (rec) { while (rec) {
if (bytesUsed < byteLimit) { if (bytesUsed < byteLimit) {
@ -254,20 +254,20 @@ size_t SkScaledImageCache::setByteLimit(size_t newLimit) {
void SkScaledImageCache::detach(Rec* rec) { void SkScaledImageCache::detach(Rec* rec) {
Rec* prev = rec->fPrev; Rec* prev = rec->fPrev;
Rec* next = rec->fNext; Rec* next = rec->fNext;
if (!prev) { if (!prev) {
SkASSERT(fHead == rec); SkASSERT(fHead == rec);
fHead = next; fHead = next;
} else { } else {
prev->fNext = next; prev->fNext = next;
} }
if (!next) { if (!next) {
fTail = prev; fTail = prev;
} else { } else {
next->fPrev = prev; next->fPrev = prev;
} }
rec->fNext = rec->fPrev = NULL; rec->fNext = rec->fPrev = NULL;
} }
@ -286,7 +286,7 @@ void SkScaledImageCache::moveToHead(Rec* rec) {
fHead->fPrev = rec; fHead->fPrev = rec;
rec->fNext = fHead; rec->fNext = fHead;
fHead = rec; fHead = rec;
this->validate(); this->validate();
} }
@ -347,7 +347,7 @@ void SkScaledImageCache::validate() const {
used -= rec->bytesUsed(); used -= rec->bytesUsed();
rec = rec->fPrev; rec = rec->fPrev;
} }
SkASSERT(0 == count); SkASSERT(0 == count);
SkASSERT(0 == used); SkASSERT(0 == used);
} }
@ -418,4 +418,3 @@ size_t SkGraphics::GetImageCacheByteLimit() {
size_t SkGraphics::SetImageCacheByteLimit(size_t newLimit) { size_t SkGraphics::SetImageCacheByteLimit(size_t newLimit) {
return SkScaledImageCache::SetByteLimit(newLimit); return SkScaledImageCache::SetByteLimit(newLimit);
} }

View File

@ -45,7 +45,7 @@ public:
SkScaledImageCache(size_t byteLimit); SkScaledImageCache(size_t byteLimit);
~SkScaledImageCache(); ~SkScaledImageCache();
/** /**
* Search the cache for a scaled version of original. If found, return it * Search the cache for a scaled version of original. If found, return it
* in scaled, and return its ID pointer. Use the returned ptr to unlock * in scaled, and return its ID pointer. Use the returned ptr to unlock
@ -74,7 +74,7 @@ public:
size_t getBytesUsed() const { return fBytesUsed; } size_t getBytesUsed() const { return fBytesUsed; }
size_t getByteLimit() const { return fByteLimit; } size_t getByteLimit() const { return fByteLimit; }
/** /**
* Set the maximum number of bytes available to this cache. If the current * Set the maximum number of bytes available to this cache. If the current
* cache exceeds this new value, it will be purged to try to fit within * cache exceeds this new value, it will be purged to try to fit within

View File

@ -143,8 +143,8 @@ void SkImagePrivDrawPicture(SkCanvas* canvas, SkPicture* picture,
} }
void SkImagePrivDrawPicture(SkCanvas* canvas, SkPicture* picture, void SkImagePrivDrawPicture(SkCanvas* canvas, SkPicture* picture,
const SkRect* src, const SkRect& dst, const SkPaint* paint) { const SkRect* src, const SkRect& dst, const SkPaint* paint) {
int saveCount = canvas->getSaveCount(); int saveCount = canvas->getSaveCount();
SkMatrix matrix; SkMatrix matrix;
SkRect tmpSrc; SkRect tmpSrc;
@ -167,7 +167,7 @@ void SkImagePrivDrawPicture(SkCanvas* canvas, SkPicture* picture,
if (!paint || !needs_layer(*paint)) { if (!paint || !needs_layer(*paint)) {
canvas->clipRect(tmpSrc); canvas->clipRect(tmpSrc);
} }
canvas->drawPicture(*picture); canvas->drawPicture(*picture);
canvas->restoreToCount(saveCount); canvas->restoreToCount(saveCount);
} }

View File

@ -15,7 +15,7 @@ public:
SkImage_Base(int width, int height) : INHERITED(width, height) {} SkImage_Base(int width, int height) : INHERITED(width, height) {}
virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) = 0; virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) = 0;
virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, virtual void onDrawRectToRect(SkCanvas*, const SkRect* src,
const SkRect& dst, const SkPaint*) = 0; const SkRect& dst, const SkPaint*) = 0;
virtual GrTexture* onGetTexture() { return NULL; } virtual GrTexture* onGetTexture() { return NULL; }

View File

@ -49,7 +49,7 @@ void SkImage_Codec::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPai
canvas->drawBitmap(fBitmap, x, y, paint); canvas->drawBitmap(fBitmap, x, y, paint);
} }
void SkImage_Codec::onDrawRectToRect(SkCanvas* canvas, const SkRect* src, void SkImage_Codec::onDrawRectToRect(SkCanvas* canvas, const SkRect* src,
const SkRect& dst, const SkPaint* paint) { const SkRect& dst, const SkPaint* paint) {
if (!fBitmap.pixelRef()) { if (!fBitmap.pixelRef()) {
if (!SkImageDecoder::DecodeMemory(fEncodedData->bytes(), fEncodedData->size(), if (!SkImageDecoder::DecodeMemory(fEncodedData->bytes(), fEncodedData->size(),

View File

@ -21,7 +21,7 @@ static void TestImageCache(skiatest::Reporter* reporter) {
SkScaledImageCache::ID* id; SkScaledImageCache::ID* id;
SkBitmap bm[COUNT]; SkBitmap bm[COUNT];
SkScalar scale = 2; SkScalar scale = 2;
for (int i = 0; i < COUNT; ++i) { for (int i = 0; i < COUNT; ++i) {
SkBitmap tmp; SkBitmap tmp;
@ -49,12 +49,12 @@ static void TestImageCache(skiatest::Reporter* reporter) {
// stress test, should trigger purges // stress test, should trigger purges
for (size_t i = 0; i < COUNT * 100; ++i) { for (size_t i = 0; i < COUNT * 100; ++i) {
SkBitmap tmp; SkBitmap tmp;
make_bm(&tmp, DIM, DIM); make_bm(&tmp, DIM, DIM);
id = cache.addAndLock(bm[0], scale, scale, tmp); id = cache.addAndLock(bm[0], scale, scale, tmp);
REPORTER_ASSERT(reporter, NULL != id); REPORTER_ASSERT(reporter, NULL != id);
cache.unlock(id); cache.unlock(id);
scale += 1; scale += 1;
} }

View File

@ -23,7 +23,7 @@ class FakeDevice : public SkDevice {
public: public:
FakeDevice() : SkDevice(SkBitmap::kARGB_8888_Config, 100, 100) { } FakeDevice() : SkDevice(SkBitmap::kARGB_8888_Config, 100, 100) { }
virtual void drawRect(const SkDraw& draw, const SkRect& r, virtual void drawRect(const SkDraw& draw, const SkRect& r,
const SkPaint& paint) SK_OVERRIDE { const SkPaint& paint) SK_OVERRIDE {
fLastMatrix = *draw.fMatrix; fLastMatrix = *draw.fMatrix;
SkDevice::drawRect(draw, r, paint); SkDevice::drawRect(draw, r, paint);

View File

@ -163,17 +163,17 @@ static const SkDCubic testSet[] = {
const size_t testSetCount = SK_ARRAY_COUNT(testSet); const size_t testSetCount = SK_ARRAY_COUNT(testSet);
static const SkDCubic newTestSet[] = { static const SkDCubic newTestSet[] = {
{{{3, 4}, {1, 5}, {4, 3}, {6, 4}}}, {{{3, 4}, {1, 5}, {4, 3}, {6, 4}}},
{{{3, 4}, {4, 6}, {4, 3}, {5, 1}}}, {{{3, 4}, {4, 6}, {4, 3}, {5, 1}}},
{{{130.04275512695312, 11417.413085937500 }, {{{130.04275512695312, 11417.413085937500 },
{130.23312377929687, 11418.319335937500 }, {130.23312377929687, 11418.319335937500 },
{131.03707885742187, 11419.000000000000 }, {131.03707885742187, 11419.000000000000 },
{132.00000000000000, 11419.000000000000 }}}, {132.00000000000000, 11419.000000000000 }}},
{{{132.00000000000000, 11419.000000000000 }, {{{132.00000000000000, 11419.000000000000 },
{130.89543151855469, 11419.000000000000 }, {130.89543151855469, 11419.000000000000 },
{130.00000000000000, 11418.104492187500 }, {130.00000000000000, 11418.104492187500 },
{130.00000000000000, 11417.000000000000 }}}, {130.00000000000000, 11417.000000000000 }}},
{{{1.0516976506771041, 2.9684399028541346 }, {{{1.0516976506771041, 2.9684399028541346 },

View File

@ -11,7 +11,7 @@
// FIXME: add tests for intersecting, non-intersecting, degenerate, coincident // FIXME: add tests for intersecting, non-intersecting, degenerate, coincident
static const SkDLine tests[][2] = { static const SkDLine tests[][2] = {
{{{{181.1764678955078125f, 120}, {186.3661956787109375f, 134.7042236328125f}}}, {{{{181.1764678955078125f, 120}, {186.3661956787109375f, 134.7042236328125f}}},
{{{175.8309783935546875f, 141.5211334228515625f}, {187.8782806396484375f, 133.7258148193359375f}}}}, {{{175.8309783935546875f, 141.5211334228515625f}, {187.8782806396484375f, 133.7258148193359375f}}}},
#if 0 // FIXME: these fail because one line is too short and appears quasi-coincident #if 0 // FIXME: these fail because one line is too short and appears quasi-coincident
{{{{158.000000, 926.000000}, {1108.00000, 926.000000}}}, {{{{158.000000, 926.000000}, {1108.00000, 926.000000}}},
@ -43,7 +43,7 @@ static const SkDLine noIntersect[][2] = {
static const size_t noIntersect_count = SK_ARRAY_COUNT(noIntersect); static const size_t noIntersect_count = SK_ARRAY_COUNT(noIntersect);
static const SkDLine coincidentTests[][2] = { static const SkDLine coincidentTests[][2] = {
{{{{186.3661956787109375f, 134.7042236328125f}, {187.8782806396484375f, 133.7258148193359375f}}}, {{{{186.3661956787109375f, 134.7042236328125f}, {187.8782806396484375f, 133.7258148193359375f}}},
{{{175.8309783935546875f, 141.5211334228515625f}, {187.8782806396484375f, 133.7258148193359375f}}}}, {{{175.8309783935546875f, 141.5211334228515625f}, {187.8782806396484375f, 133.7258148193359375f}}}},
{{{{235.681549, 531.000000}, {280.318420, 321.000000}}}, {{{{235.681549, 531.000000}, {280.318420, 321.000000}}},

View File

@ -1836,181 +1836,181 @@ static void skpkkiste_to98(skiatest::Reporter* reporter) {
#if 01 #if 01
static void issue1417(skiatest::Reporter* reporter) { static void issue1417(skiatest::Reporter* reporter) {
SkPath path1; SkPath path1;
path1.moveTo(122.58908843994140625f, 82.2836456298828125f); path1.moveTo(122.58908843994140625f, 82.2836456298828125f);
path1.quadTo(129.8215789794921875f, 80, 138, 80); path1.quadTo(129.8215789794921875f, 80, 138, 80);
path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f); path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f);
path1.lineTo(161.1764678955078125f, 100); path1.lineTo(161.1764678955078125f, 100);
path1.lineTo(161.1764678955078125f, 100); path1.lineTo(161.1764678955078125f, 100);
path1.lineTo(115.29412078857421875f, 100); path1.lineTo(115.29412078857421875f, 100);
path1.lineTo(115.29412078857421875f, 100); path1.lineTo(115.29412078857421875f, 100);
path1.lineTo(122.58908843994140625f, 82.2836456298828125f); path1.lineTo(122.58908843994140625f, 82.2836456298828125f);
path1.lineTo(122.58908843994140625f, 82.2836456298828125f); path1.lineTo(122.58908843994140625f, 82.2836456298828125f);
path1.close(); path1.close();
path1.moveTo(98.68194580078125f, 140.343841552734375f); path1.moveTo(98.68194580078125f, 140.343841552734375f);
path1.lineTo(115.29412078857421875f, 100); path1.lineTo(115.29412078857421875f, 100);
path1.lineTo(115.29412078857421875f, 100); path1.lineTo(115.29412078857421875f, 100);
path1.lineTo(97.9337615966796875f, 100); path1.lineTo(97.9337615966796875f, 100);
path1.lineTo(97.9337615966796875f, 100); path1.lineTo(97.9337615966796875f, 100);
path1.quadTo(88, 112.94264984130859375f, 88, 130); path1.quadTo(88, 112.94264984130859375f, 88, 130);
path1.quadTo(88, 131.544830322265625f, 88.08148956298828125f, 133.0560302734375f); path1.quadTo(88, 131.544830322265625f, 88.08148956298828125f, 133.0560302734375f);
path1.lineTo(98.68194580078125f, 140.343841552734375f); path1.lineTo(98.68194580078125f, 140.343841552734375f);
path1.lineTo(98.68194580078125f, 140.343841552734375f); path1.lineTo(98.68194580078125f, 140.343841552734375f);
path1.close(); path1.close();
path1.moveTo(136.969696044921875f, 166.6666717529296875f); path1.moveTo(136.969696044921875f, 166.6666717529296875f);
path1.lineTo(98.68194580078125f, 140.343841552734375f); path1.lineTo(98.68194580078125f, 140.343841552734375f);
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.lineTo(93.45894622802734375f, 153.02825927734375f); path1.lineTo(93.45894622802734375f, 153.02825927734375f);
path1.quadTo(96.94116973876953125f, 159.65185546875f, 102.64466094970703125f, 165.3553466796875f); path1.quadTo(96.94116973876953125f, 159.65185546875f, 102.64466094970703125f, 165.3553466796875f);
path1.quadTo(110.7924652099609375f, 173.503143310546875f, 120.8179779052734375f, 177.1177825927734375f); path1.quadTo(110.7924652099609375f, 173.503143310546875f, 120.8179779052734375f, 177.1177825927734375f);
path1.lineTo(136.969696044921875f, 166.6666717529296875f); path1.lineTo(136.969696044921875f, 166.6666717529296875f);
path1.lineTo(136.969696044921875f, 166.6666717529296875f); path1.lineTo(136.969696044921875f, 166.6666717529296875f);
path1.close(); path1.close();
path1.moveTo(175.8309783935546875f, 141.5211334228515625f); path1.moveTo(175.8309783935546875f, 141.5211334228515625f);
path1.lineTo(136.969696044921875f, 166.6666717529296875f); path1.lineTo(136.969696044921875f, 166.6666717529296875f);
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.lineTo(153.15728759765625f, 177.7956390380859375f); path1.lineTo(153.15728759765625f, 177.7956390380859375f);
path1.quadTo(164.392425537109375f, 174.318267822265625f, 173.3553466796875f, 165.3553466796875f); path1.quadTo(164.392425537109375f, 174.318267822265625f, 173.3553466796875f, 165.3553466796875f);
path1.quadTo(177.805816650390625f, 160.9048614501953125f, 180.90380859375f, 155.8941650390625f); path1.quadTo(177.805816650390625f, 160.9048614501953125f, 180.90380859375f, 155.8941650390625f);
path1.lineTo(175.8309783935546875f, 141.5211334228515625f); path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
path1.lineTo(175.8309783935546875f, 141.5211334228515625f); path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
path1.close(); path1.close();
path1.moveTo(175.8309783935546875f, 141.5211334228515625f); path1.moveTo(175.8309783935546875f, 141.5211334228515625f);
path1.lineTo(187.8782806396484375f, 133.7258148193359375f); path1.lineTo(187.8782806396484375f, 133.7258148193359375f);
path1.lineTo(187.8782806396484375f, 133.7258148193359375f); path1.lineTo(187.8782806396484375f, 133.7258148193359375f);
path1.quadTo(188, 131.8880615234375f, 188, 130); path1.quadTo(188, 131.8880615234375f, 188, 130);
path1.quadTo(188, 112.942657470703125f, 178.0662384033203125f, 100); path1.quadTo(188, 112.942657470703125f, 178.0662384033203125f, 100);
path1.lineTo(161.1764678955078125f, 100); path1.lineTo(161.1764678955078125f, 100);
path1.lineTo(161.1764678955078125f, 100); path1.lineTo(161.1764678955078125f, 100);
path1.lineTo(175.8309783935546875f, 141.5211334228515625f); path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
path1.lineTo(175.8309783935546875f, 141.5211334228515625f); path1.lineTo(175.8309783935546875f, 141.5211334228515625f);
path1.close(); path1.close();
SkPath path2; SkPath path2;
path2.moveTo(174.117645263671875f, 100); path2.moveTo(174.117645263671875f, 100);
path2.lineTo(161.1764678955078125f, 100); path2.lineTo(161.1764678955078125f, 100);
path2.lineTo(161.1764678955078125f, 100); path2.lineTo(161.1764678955078125f, 100);
path2.lineTo(155.1280364990234375f, 82.86279296875f); path2.lineTo(155.1280364990234375f, 82.86279296875f);
path2.lineTo(155.1280364990234375f, 82.86279296875f); path2.lineTo(155.1280364990234375f, 82.86279296875f);
path2.quadTo(153.14971923828125f, 82.15229034423828125f, 151.098419189453125f, 81.618133544921875f); path2.quadTo(153.14971923828125f, 82.15229034423828125f, 151.098419189453125f, 81.618133544921875f);
path2.lineTo(143.5294189453125f, 100); path2.lineTo(143.5294189453125f, 100);
path2.lineTo(143.5294189453125f, 100); path2.lineTo(143.5294189453125f, 100);
path2.lineTo(161.1764678955078125f, 100); path2.lineTo(161.1764678955078125f, 100);
path2.lineTo(161.1764678955078125f, 100); path2.lineTo(161.1764678955078125f, 100);
path2.lineTo(168.23529052734375f, 120); path2.lineTo(168.23529052734375f, 120);
path2.lineTo(168.23529052734375f, 120); path2.lineTo(168.23529052734375f, 120);
path2.lineTo(181.1764678955078125f, 120); path2.lineTo(181.1764678955078125f, 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(186.3661956787109375f, 134.7042236328125f); path2.lineTo(186.3661956787109375f, 134.7042236328125f);
path2.lineTo(187.8782806396484375f, 133.7258148193359375f); path2.lineTo(187.8782806396484375f, 133.7258148193359375f);
path2.lineTo(187.8782806396484375f, 133.7258148193359375f); path2.lineTo(187.8782806396484375f, 133.7258148193359375f);
path2.quadTo(188, 131.8880615234375f, 188, 130); path2.quadTo(188, 131.8880615234375f, 188, 130);
path2.quadTo(188, 124.80947113037109375f, 187.080169677734375f, 120); path2.quadTo(188, 124.80947113037109375f, 187.080169677734375f, 120);
path2.lineTo(181.1764678955078125f, 120); path2.lineTo(181.1764678955078125f, 120);
path2.lineTo(181.1764678955078125f, 120); path2.lineTo(181.1764678955078125f, 120);
path2.lineTo(174.117645263671875f, 100); path2.lineTo(174.117645263671875f, 100);
path2.lineTo(174.117645263671875f, 100); path2.lineTo(174.117645263671875f, 100);
path2.close(); path2.close();
path2.moveTo(88.91983795166015625f, 120); path2.moveTo(88.91983795166015625f, 120);
path2.lineTo(107.0588226318359375f, 120); path2.lineTo(107.0588226318359375f, 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(98.68194580078125f, 140.343841552734375f); path2.lineTo(98.68194580078125f, 140.343841552734375f);
path2.lineTo(88.08148956298828125f, 133.0560302734375f); path2.lineTo(88.08148956298828125f, 133.0560302734375f);
path2.lineTo(88.08148956298828125f, 133.0560302734375f); path2.lineTo(88.08148956298828125f, 133.0560302734375f);
path2.quadTo(88, 131.544830322265625f, 88, 130); path2.quadTo(88, 131.544830322265625f, 88, 130);
path2.quadTo(88, 124.80951690673828125f, 88.91983795166015625f, 120); path2.quadTo(88, 124.80951690673828125f, 88.91983795166015625f, 120);
path2.close(); path2.close();
path2.moveTo(96.67621612548828125f, 145.21490478515625f); path2.moveTo(96.67621612548828125f, 145.21490478515625f);
path2.lineTo(98.68194580078125f, 140.343841552734375f); path2.lineTo(98.68194580078125f, 140.343841552734375f);
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(120.68767547607421875f, 155.4727783203125f); path2.lineTo(120.68767547607421875f, 155.4727783203125f);
path2.lineTo(118.68194580078125f, 160.343841552734375f); path2.lineTo(118.68194580078125f, 160.343841552734375f);
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.lineTo(96.67621612548828125f, 145.21490478515625f); path2.lineTo(96.67621612548828125f, 145.21490478515625f);
path2.close(); path2.close();
path2.moveTo(113.232177734375f, 173.5789947509765625f); path2.moveTo(113.232177734375f, 173.5789947509765625f);
path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.8179779052734375f, 177.1177825927734375f); path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.8179779052734375f, 177.1177825927734375f);
path2.lineTo(132.2864990234375f, 169.6969757080078125f); path2.lineTo(132.2864990234375f, 169.6969757080078125f);
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(118.68194580078125f, 160.343841552734375f); path2.lineTo(118.68194580078125f, 160.343841552734375f);
path2.lineTo(113.232177734375f, 173.5789947509765625f); path2.lineTo(113.232177734375f, 173.5789947509765625f);
path2.lineTo(113.232177734375f, 173.5789947509765625f); path2.lineTo(113.232177734375f, 173.5789947509765625f);
path2.close(); path2.close();
testPathOp(reporter, path1, path2, kUnion_PathOp); testPathOp(reporter, path1, path2, kUnion_PathOp);
} }
#endif #endif
static void issue1418(skiatest::Reporter* reporter) { static void issue1418(skiatest::Reporter* reporter) {
SkPath path1; SkPath path1;
path1.moveTo(0, 0); path1.moveTo(0, 0);
path1.lineTo(1, 0); path1.lineTo(1, 0);
path1.lineTo(1, 0); path1.lineTo(1, 0);
path1.lineTo(1, 1); path1.lineTo(1, 1);
path1.lineTo(1, 1); path1.lineTo(1, 1);
path1.lineTo(0, 1); path1.lineTo(0, 1);
path1.lineTo(0, 1); path1.lineTo(0, 1);
path1.lineTo(0, 0); path1.lineTo(0, 0);
path1.lineTo(0, 0); path1.lineTo(0, 0);
path1.close(); path1.close();
SkPath path2; SkPath path2;
path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f); path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f);
path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192092895508f, -0.50000005960464477539f); path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192092895508f, -0.50000005960464477539f);
path2.quadTo(1.2071068286895751953f, -0.50000005960464477539f, 1.3535535335540771484f, -0.35355341434478759766f); 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.5000001192092895508f, 0);
path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.3535535335540771484f, 0.35355341434478759766f); path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.3535535335540771484f, 0.35355341434478759766f);
path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.0000001192092895508f, 0.50000005960464477539f); path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.0000001192092895508f, 0.50000005960464477539f);
path2.quadTo(0.79289329051971435547f, 0.50000005960464477539f, 0.64644664525985717773f, 0.35355341434478759766f); 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.50000005960464477539f, 0);
path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.64644664525985717773f, -0.35355341434478759766f); path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.64644664525985717773f, -0.35355341434478759766f);
testPathOp(reporter, path1, path2, kIntersect_PathOp); testPathOp(reporter, path1, path2, kIntersect_PathOp);
} }
static void cubicOp85i(skiatest::Reporter* reporter) { static void cubicOp85i(skiatest::Reporter* reporter) {
SkPath path, pathB; SkPath path, pathB;
path.setFillType(SkPath::kWinding_FillType); path.setFillType(SkPath::kWinding_FillType);
path.moveTo(3, 4); path.moveTo(3, 4);
path.cubicTo(1, 5, 4, 3, 6, 4); path.cubicTo(1, 5, 4, 3, 6, 4);
path.close(); path.close();
pathB.setFillType(SkPath::kWinding_FillType); pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(3, 4); pathB.moveTo(3, 4);
pathB.cubicTo(4, 6, 4, 3, 5, 1); pathB.cubicTo(4, 6, 4, 3, 5, 1);
pathB.close(); pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp); testPathOp(reporter, path, pathB, kIntersect_PathOp);
} }
#if 0 #if 0
static void skpkkiste_to716(skiatest::Reporter* reporter) { static void skpkkiste_to716(skiatest::Reporter* reporter) {
SkPath path; SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType); path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(1173, 284); path.moveTo(1173, 284);
path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f); path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f);
path.lineTo(1174, 123.999496f); path.lineTo(1174, 123.999496f);
path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127); path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127);
path.lineTo(1173, 284); path.lineTo(1173, 284);
path.close(); path.close();
SkPath pathB; SkPath pathB;
pathB.setFillType(SkPath::kWinding_FillType); pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(1340, 122); pathB.moveTo(1340, 122);
pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127); pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127);
pathB.lineTo(1345, 284); pathB.lineTo(1345, 284);
pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289); pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289);
pathB.lineTo(1178, 289); pathB.lineTo(1178, 289);
pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284); pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284);
pathB.lineTo(1173, 127); pathB.lineTo(1173, 127);
pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122); pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122);
pathB.lineTo(1340, 122); pathB.lineTo(1340, 122);
pathB.close(); pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp); testPathOp(reporter, path, pathB, kIntersect_PathOp);
} }
#endif #endif
static void (*firstTest)(skiatest::Reporter* ) = 0; static void (*firstTest)(skiatest::Reporter* ) = 0;