Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12101 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-11-02 07:02:02 +00:00
parent 585744a7db
commit f54ad6f488
11 changed files with 248 additions and 248 deletions

View File

@ -28,7 +28,7 @@ enum SkColorType {
kRGB_565_SkColorType,
kRGBA_8888_SkColorType,
kBGRA_8888_SkColorType,
#if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
kPMColor_SkColorType = kBGRA_8888_SkColorType,
#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)

View File

@ -46,6 +46,6 @@ bool SkDTriangle::contains(const SkDPoint& pt) const {
if (v <= 0) {
return false;
}
return u + v < w * wSign;
return u + v < w * wSign;
#endif
}

View File

@ -17,9 +17,9 @@ static struct lineCubic {
int answerCount;
SkDPoint answers[2];
} quadCubicTests[] = {
{{{{778, 14089}, {778, 14091.208984375}, {776.20916748046875, 14093}, {774, 14093}}},
{{{778, 14089}, {777.99957275390625, 14090.65625}, {776.82843017578125, 14091.828125}}}, 2,
{{778, 14089}, {776.82855609581270,14091.828250841330}}},
{{{{778, 14089}, {778, 14091.208984375}, {776.20916748046875, 14093}, {774, 14093}}},
{{{778, 14089}, {777.99957275390625, 14090.65625}, {776.82843017578125, 14091.828125}}}, 2,
{{778, 14089}, {776.82855609581270,14091.828250841330}}},
{{{{1110, 817}, {1110.55225f, 817}, {1111, 817.447693f}, {1111, 818}}},
{{{1110.70715f, 817.292908f}, {1110.41406f, 817.000122f}, {1110, 817}}}, 2,

View File

@ -45,31 +45,31 @@ static void PathOpsTriangleUtilitiesTest(skiatest::Reporter* reporter) {
}
}
static const SkDTriangle oneOff[] = {
{{{271.03291625750461, 5.0402503630087025e-05}, {275.21652430019037, 3.6997300650817753},
{279.25839233398438, 7.7416000366210938}}},
{{{271.03291625750461, 5.0402503617874572e-05}, {275.21652430019037, 3.6997300650817877},
{279.25839233398438, 7.7416000366210938}}}
};
static const size_t oneOff_count = SK_ARRAY_COUNT(oneOff);
static void PathOpsTriangleOneOffTest(skiatest::Reporter* reporter) {
for (size_t index = 0; index < oneOff_count; ++index) {
const SkDTriangle& triangle = oneOff[index];
SkASSERT(ValidTriangle(triangle));
for (int inner = 0; inner < 3; ++inner) {
bool result = triangle.contains(triangle.fPts[inner]);
if (result) {
SkDebugf("%s [%d][%d] point on triangle is not in\n", __FUNCTION__, index, inner);
REPORTER_ASSERT(reporter, 0);
}
}
}
}
#include "TestClassDef.h"
DEFINE_TESTCLASS_SHORT(PathOpsTriangleUtilitiesTest)
DEFINE_TESTCLASS_SHORT(PathOpsTriangleOneOffTest)
static const SkDTriangle oneOff[] = {
{{{271.03291625750461, 5.0402503630087025e-05}, {275.21652430019037, 3.6997300650817753},
{279.25839233398438, 7.7416000366210938}}},
{{{271.03291625750461, 5.0402503617874572e-05}, {275.21652430019037, 3.6997300650817877},
{279.25839233398438, 7.7416000366210938}}}
};
static const size_t oneOff_count = SK_ARRAY_COUNT(oneOff);
static void PathOpsTriangleOneOffTest(skiatest::Reporter* reporter) {
for (size_t index = 0; index < oneOff_count; ++index) {
const SkDTriangle& triangle = oneOff[index];
SkASSERT(ValidTriangle(triangle));
for (int inner = 0; inner < 3; ++inner) {
bool result = triangle.contains(triangle.fPts[inner]);
if (result) {
SkDebugf("%s [%d][%d] point on triangle is not in\n", __FUNCTION__, index, inner);
REPORTER_ASSERT(reporter, 0);
}
}
}
}
#include "TestClassDef.h"
DEFINE_TESTCLASS_SHORT(PathOpsTriangleUtilitiesTest)
DEFINE_TESTCLASS_SHORT(PathOpsTriangleOneOffTest)

View File

@ -3010,30 +3010,30 @@ static void cubicOp96d(skiatest::Reporter* reporter) {
testPathOp(reporter, path, pathB, kDifference_PathOp);
}
static void cubicOp97x(skiatest::Reporter* reporter) {
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_PathOp);
static void cubicOp97x(skiatest::Reporter* reporter) {
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_PathOp);
}
static void cubicOp98x(skiatest::Reporter* reporter) {
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_PathOp);
static void cubicOp98x(skiatest::Reporter* reporter) {
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_PathOp);
}
static void (*firstTest)(skiatest::Reporter* ) = bufferOverflow;

View File

@ -53,8 +53,8 @@ static void standardTestCases(skiatest::Reporter* reporter) {
}
static const SkDQuad testSet[] = {
{{{164, -40}, {231.51681518554687, -40}, {279.25839233398438, 7.7416000366210938}}},
{{{279.25839233398438, 7.7416000366210938}, {275.2164306640625, 3.6996400356292725}, {271.03286743164062, -5.3290705182007514e-015}}},
{{{164, -40}, {231.51681518554687, -40}, {279.25839233398438, 7.7416000366210938}}},
{{{279.25839233398438, 7.7416000366210938}, {275.2164306640625, 3.6996400356292725}, {271.03286743164062, -5.3290705182007514e-015}}},
{{{2.9999997378517067, 1.9737872594345709}, {2.9999997432230918, 1.9739647181863822}, {1.2414155459263587e-163, 5.2957833941332142e-315}}},
{{{2.9999047485265304, 1.9739164225694723}, {3.0000947268526112, 1.9738379076623633}, {0.61149411077591886, 0.0028382324376270418}}},

View File

@ -59,8 +59,8 @@ static struct oneLineQuad {
SkDQuad quad;
SkDLine line;
} oneOffs[] = {
{{{{447.96701049804687, 894.4381103515625}, {448.007080078125, 894.4239501953125},
{448.0140380859375, 894.4215087890625}}},
{{{{447.96701049804687, 894.4381103515625}, {448.007080078125, 894.4239501953125},
{448.0140380859375, 894.4215087890625}}},
{{{490.43548583984375, 879.40740966796875}, {405.59262084960937, 909.435546875}}}},
{{{{142.589081, 102.283646}, {149.821579, 100}, {158, 100}}},
{{{90, 230}, {160, 60}}}},

View File

@ -323,7 +323,7 @@ static SkMSec timePict(SkPicture* pic, SkCanvas* canvas) {
const int slices = 3;
int xInterval = SkTMax(pWidth - maxDimension, 0) / (slices - 1);
int yInterval = SkTMax(pHeight - maxDimension, 0) / (slices - 1);
SkRect rect = {0, 0, SkIntToScalar(SkTMin(maxDimension, pWidth)),
SkRect rect = {0, 0, SkIntToScalar(SkTMin(maxDimension, pWidth)),
SkIntToScalar(SkTMin(maxDimension, pHeight))};
canvas->clipRect(rect);
SkMSec start = SkTime::GetMSecs();

View File

@ -906,12 +906,12 @@ static void skpsd_graphic_net104(skiatest::Reporter* reporter) {
only intersect at the shared point (430,280)
they sort backwards because the tangent from pt[0] to control pt[1]
c' = (0.00000000000000000, -1.1045837402343750)
q' = (0.0097961425781250000, -2.8988037109375000)
suggests that the quad is counterclockwise of the cubic, when the reverse is true
the angle code is fooled because the control pt[1] of both the quad and cubic
is far away from cubic cntl [2] and quad pt [2].
Maybe in angle setup, this instability can be detected to suppress sorting on the initial tangent
Or the error term can be passed to NearRay that is magnified by the distance from the next ctrl?
q' = (0.0097961425781250000, -2.8988037109375000)
suggests that the quad is counterclockwise of the cubic, when the reverse is true
the angle code is fooled because the control pt[1] of both the quad and cubic
is far away from cubic cntl [2] and quad pt [2].
Maybe in angle setup, this instability can be detected to suppress sorting on the initial tangent
Or the error term can be passed to NearRay that is magnified by the distance from the next ctrl?
*/
static void skpnaoxrane_ru23(skiatest::Reporter* reporter) {
SkPath path;
@ -1371,183 +1371,183 @@ static void skpwww_briian_com_34(skiatest::Reporter* reporter) {
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpwww_sciality_com_100(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(162, 468);
path.cubicTo(159.790863f, 468, 158, 469.790863f, 158, 472);
path.lineTo(158, 528);
path.cubicTo(158, 530.209106f, 159.790863f, 532, 162, 532);
path.lineTo(275, 532);
path.cubicTo(277.209137f, 532, 279, 530.209106f, 279, 528);
path.lineTo(279, 472);
path.cubicTo(279, 469.790863f, 277.209137f, 468, 275, 468);
path.lineTo(162, 468);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(275, 468);
pathB.cubicTo(276.65686f, 468, 278, 469.34314f, 278, 471);
pathB.lineTo(278, 529);
pathB.cubicTo(278, 530.65686f, 276.65686f, 532, 275, 532);
pathB.lineTo(161, 532);
pathB.cubicTo(159.34314f, 532, 158, 530.65686f, 158, 529);
pathB.lineTo(158, 471);
pathB.cubicTo(158, 469.34314f, 159.34314f, 468, 161, 468);
pathB.lineTo(275, 468);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpwww_sciality_com_100(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(162, 468);
path.cubicTo(159.790863f, 468, 158, 469.790863f, 158, 472);
path.lineTo(158, 528);
path.cubicTo(158, 530.209106f, 159.790863f, 532, 162, 532);
path.lineTo(275, 532);
path.cubicTo(277.209137f, 532, 279, 530.209106f, 279, 528);
path.lineTo(279, 472);
path.cubicTo(279, 469.790863f, 277.209137f, 468, 275, 468);
path.lineTo(162, 468);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(275, 468);
pathB.cubicTo(276.65686f, 468, 278, 469.34314f, 278, 471);
pathB.lineTo(278, 529);
pathB.cubicTo(278, 530.65686f, 276.65686f, 532, 275, 532);
pathB.lineTo(161, 532);
pathB.cubicTo(159.34314f, 532, 158, 530.65686f, 158, 529);
pathB.lineTo(158, 471);
pathB.cubicTo(158, 469.34314f, 159.34314f, 468, 161, 468);
pathB.lineTo(275, 468);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
#if TRY_SEPT_BROKEN_TESTS
static void skpwww_sciality_com_101(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(162, 468);
path.cubicTo(159.790863f, 468, 158, 469.790863f, 158, 472);
path.lineTo(158, 528);
path.cubicTo(158, 530.209106f, 159.790863f, 532, 162, 532);
path.lineTo(275.009186f, 532);
path.cubicTo(276.661774f, 531.994995f, 278, 530.653748f, 278, 529);
path.lineTo(278, 471);
path.cubicTo(278, 469.346375f, 276.662079f, 468.005249f, 275.009705f, 468);
path.lineTo(162, 468);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kInverseWinding_FillType);
pathB.moveTo(161, 469);
pathB.lineTo(275, 469);
pathB.cubicTo(276.65686f, 469, 278, 469.895416f, 278, 471);
pathB.lineTo(278, 529);
pathB.cubicTo(278, 530.65686f, 276.65686f, 532, 275, 532);
pathB.lineTo(161, 532);
pathB.cubicTo(159.34314f, 532, 158, 530.65686f, 158, 529);
pathB.lineTo(158, 471);
pathB.cubicTo(158, 469.895416f, 159.34314f, 469, 161, 469);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpwww_sciality_com_101(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(162, 468);
path.cubicTo(159.790863f, 468, 158, 469.790863f, 158, 472);
path.lineTo(158, 528);
path.cubicTo(158, 530.209106f, 159.790863f, 532, 162, 532);
path.lineTo(275.009186f, 532);
path.cubicTo(276.661774f, 531.994995f, 278, 530.653748f, 278, 529);
path.lineTo(278, 471);
path.cubicTo(278, 469.346375f, 276.662079f, 468.005249f, 275.009705f, 468);
path.lineTo(162, 468);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kInverseWinding_FillType);
pathB.moveTo(161, 469);
pathB.lineTo(275, 469);
pathB.cubicTo(276.65686f, 469, 278, 469.895416f, 278, 471);
pathB.lineTo(278, 529);
pathB.cubicTo(278, 530.65686f, 276.65686f, 532, 275, 532);
pathB.lineTo(161, 532);
pathB.cubicTo(159.34314f, 532, 158, 530.65686f, 158, 529);
pathB.lineTo(158, 471);
pathB.cubicTo(158, 469.895416f, 159.34314f, 469, 161, 469);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
#endif
static void skpwww_meb_gov_tr_5(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(137.34314f, 145.34314f);
path.quadTo(139.687088f, 143.000793f, 143, 143);
path.lineTo(242, 143);
path.quadTo(245.312912f, 143.000793f, 247.65686f, 145.34314f);
path.quadTo(249.999207f, 147.687088f, 250, 151);
path.lineTo(250, 177);
path.lineTo(135, 177);
path.lineTo(135, 151);
path.quadTo(135.000793f, 147.687088f, 137.34314f, 145.34314f);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(135, 143);
pathB.lineTo(250, 143);
pathB.lineTo(250, 177);
pathB.lineTo(135, 177);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpwww_meb_gov_tr_5(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(137.34314f, 145.34314f);
path.quadTo(139.687088f, 143.000793f, 143, 143);
path.lineTo(242, 143);
path.quadTo(245.312912f, 143.000793f, 247.65686f, 145.34314f);
path.quadTo(249.999207f, 147.687088f, 250, 151);
path.lineTo(250, 177);
path.lineTo(135, 177);
path.lineTo(135, 151);
path.quadTo(135.000793f, 147.687088f, 137.34314f, 145.34314f);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(135, 143);
pathB.lineTo(250, 143);
pathB.lineTo(250, 177);
pathB.lineTo(135, 177);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
#if TRY_SEPT_BROKEN_TESTS
static void skpwww_meb_gov_tr_6(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(143, 143);
path.quadTo(139.687088f, 143.000793f, 137.34314f, 145.34314f);
path.quadTo(135.000793f, 147.687088f, 135, 151);
path.lineTo(135, 177);
path.lineTo(250, 177);
path.lineTo(250, 151);
path.quadTo(249.999207f, 147.687088f, 247.65686f, 145.34314f);
path.quadTo(245.312912f, 143.000793f, 242, 143);
path.lineTo(143, 143);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kInverseWinding_FillType);
pathB.moveTo(143, 143);
pathB.lineTo(242, 143);
pathB.cubicTo(245.865997f, 143, 249, 146.581726f, 249, 151);
pathB.lineTo(249, 177);
pathB.lineTo(135, 177);
pathB.lineTo(135, 151);
pathB.cubicTo(135, 146.581726f, 138.581726f, 143, 143, 143);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpwww_meb_gov_tr_6(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(143, 143);
path.quadTo(139.687088f, 143.000793f, 137.34314f, 145.34314f);
path.quadTo(135.000793f, 147.687088f, 135, 151);
path.lineTo(135, 177);
path.lineTo(250, 177);
path.lineTo(250, 151);
path.quadTo(249.999207f, 147.687088f, 247.65686f, 145.34314f);
path.quadTo(245.312912f, 143.000793f, 242, 143);
path.lineTo(143, 143);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kInverseWinding_FillType);
pathB.moveTo(143, 143);
pathB.lineTo(242, 143);
pathB.cubicTo(245.865997f, 143, 249, 146.581726f, 249, 151);
pathB.lineTo(249, 177);
pathB.lineTo(135, 177);
pathB.lineTo(135, 151);
pathB.cubicTo(135, 146.581726f, 138.581726f, 143, 143, 143);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
#endif
static void skpgithub_io_25(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(1001.87866f, 14.8786793f);
path.quadTo(1002.75745f, 14.0001001f, 1004, 14);
path.lineTo(1105, 14);
path.quadTo(1106.24255f, 14.0001001f, 1107.12134f, 14.8786793f);
path.quadTo(1107.99988f, 15.7574596f, 1108, 17);
path.lineTo(1108, 41);
path.quadTo(1107.99988f, 42.2425423f, 1107.12134f, 43.1213188f);
path.quadTo(1106.24255f, 43.9999008f, 1105, 44);
path.lineTo(1004, 44);
path.quadTo(1002.75745f, 43.9999008f, 1001.87866f, 43.1213188f);
path.quadTo(1001.00012f, 42.2425423f, 1001, 41);
path.lineTo(1001, 17);
path.quadTo(1001.00012f, 15.7574596f, 1001.87866f, 14.8786793f);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kInverseWinding_FillType);
pathB.moveTo(1005, 16);
pathB.lineTo(1104, 16);
pathB.cubicTo(1105.10461f, 16, 1106, 16.8954296f, 1106, 18);
pathB.lineTo(1106, 40);
pathB.cubicTo(1106, 41.1045685f, 1105.10461f, 42, 1104, 42);
pathB.lineTo(1005, 42);
pathB.cubicTo(1003.89545f, 42, 1003, 41.1045685f, 1003, 40);
pathB.lineTo(1003, 18);
pathB.cubicTo(1003, 16.8954296f, 1003.89545f, 16, 1005, 16);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpgithub_io_26(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(1001.87866f, 14.8786793f);
path.quadTo(1002.75745f, 14.0001001f, 1004, 14);
path.lineTo(1105, 14);
path.quadTo(1106.24255f, 14.0001001f, 1107.12134f, 14.8786793f);
path.quadTo(1107.99988f, 15.7574596f, 1108, 17);
path.lineTo(1108, 41);
path.quadTo(1107.99988f, 42.2425423f, 1107.12134f, 43.1213188f);
path.quadTo(1106.24255f, 43.9999008f, 1105, 44);
path.lineTo(1004, 44);
path.quadTo(1002.75745f, 43.9999008f, 1001.87866f, 43.1213188f);
path.quadTo(1001.00012f, 42.2425423f, 1001, 41);
path.lineTo(1001, 17);
path.quadTo(1001.00012f, 15.7574596f, 1001.87866f, 14.8786793f);
path.close();
path.moveTo(1003, 18);
path.cubicTo(1003, 16.8954296f, 1003.89545f, 16, 1005, 16);
path.lineTo(1104, 16);
path.cubicTo(1105.10461f, 16, 1106, 16.8954296f, 1106, 18);
path.lineTo(1106, 40);
path.cubicTo(1106, 41.1045685f, 1105.10461f, 42, 1104, 42);
path.lineTo(1005, 42);
path.cubicTo(1003.89545f, 42, 1003, 41.1045685f, 1003, 40);
path.lineTo(1003, 18);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(1108, 14);
pathB.lineTo(1106, 16);
pathB.lineTo(1105.97998f, 46.0200005f);
pathB.lineTo(1108, 44);
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpgithub_io_25(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(1001.87866f, 14.8786793f);
path.quadTo(1002.75745f, 14.0001001f, 1004, 14);
path.lineTo(1105, 14);
path.quadTo(1106.24255f, 14.0001001f, 1107.12134f, 14.8786793f);
path.quadTo(1107.99988f, 15.7574596f, 1108, 17);
path.lineTo(1108, 41);
path.quadTo(1107.99988f, 42.2425423f, 1107.12134f, 43.1213188f);
path.quadTo(1106.24255f, 43.9999008f, 1105, 44);
path.lineTo(1004, 44);
path.quadTo(1002.75745f, 43.9999008f, 1001.87866f, 43.1213188f);
path.quadTo(1001.00012f, 42.2425423f, 1001, 41);
path.lineTo(1001, 17);
path.quadTo(1001.00012f, 15.7574596f, 1001.87866f, 14.8786793f);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kInverseWinding_FillType);
pathB.moveTo(1005, 16);
pathB.lineTo(1104, 16);
pathB.cubicTo(1105.10461f, 16, 1106, 16.8954296f, 1106, 18);
pathB.lineTo(1106, 40);
pathB.cubicTo(1106, 41.1045685f, 1105.10461f, 42, 1104, 42);
pathB.lineTo(1005, 42);
pathB.cubicTo(1003.89545f, 42, 1003, 41.1045685f, 1003, 40);
pathB.lineTo(1003, 18);
pathB.cubicTo(1003, 16.8954296f, 1003.89545f, 16, 1005, 16);
pathB.close();
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void skpgithub_io_26(skiatest::Reporter* reporter) {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.moveTo(1001.87866f, 14.8786793f);
path.quadTo(1002.75745f, 14.0001001f, 1004, 14);
path.lineTo(1105, 14);
path.quadTo(1106.24255f, 14.0001001f, 1107.12134f, 14.8786793f);
path.quadTo(1107.99988f, 15.7574596f, 1108, 17);
path.lineTo(1108, 41);
path.quadTo(1107.99988f, 42.2425423f, 1107.12134f, 43.1213188f);
path.quadTo(1106.24255f, 43.9999008f, 1105, 44);
path.lineTo(1004, 44);
path.quadTo(1002.75745f, 43.9999008f, 1001.87866f, 43.1213188f);
path.quadTo(1001.00012f, 42.2425423f, 1001, 41);
path.lineTo(1001, 17);
path.quadTo(1001.00012f, 15.7574596f, 1001.87866f, 14.8786793f);
path.close();
path.moveTo(1003, 18);
path.cubicTo(1003, 16.8954296f, 1003.89545f, 16, 1005, 16);
path.lineTo(1104, 16);
path.cubicTo(1105.10461f, 16, 1106, 16.8954296f, 1106, 18);
path.lineTo(1106, 40);
path.cubicTo(1106, 41.1045685f, 1105.10461f, 42, 1104, 42);
path.lineTo(1005, 42);
path.cubicTo(1003.89545f, 42, 1003, 41.1045685f, 1003, 40);
path.lineTo(1003, 18);
path.close();
SkPath pathB;
pathB.setFillType(SkPath::kWinding_FillType);
pathB.moveTo(1108, 14);
pathB.lineTo(1106, 16);
pathB.lineTo(1105.97998f, 46.0200005f);
pathB.lineTo(1108, 44);
testPathOp(reporter, path, pathB, kIntersect_PathOp);
}
static void (*firstTest)(skiatest::Reporter* ) = 0;

View File

@ -6,19 +6,19 @@
*/
#include "PathOpsTestCommon.h"
#include "Test.h"
static const double roughlyTests[][2] = {
{5.0402503619650929e-005, 4.3178054475078825e-005}
};
static const double roughlyTests[][2] = {
{5.0402503619650929e-005, 4.3178054475078825e-005}
};
static const size_t roughlyTestsCount = SK_ARRAY_COUNT(roughlyTests);
static void PathOpsRoughlyTest(skiatest::Reporter* reporter) {
for (size_t index = 0; index < roughlyTestsCount; ++index) {
bool equal = RoughlyEqualUlps(roughlyTests[index][0], roughlyTests[index][1]);
REPORTER_ASSERT(reporter, equal);
}
}
}
#include "TestClassDef.h"
DEFINE_TESTCLASS_SHORT(PathOpsRoughlyTest)

View File

@ -96,7 +96,7 @@ struct TestResult {
}
void testOne();
char fFilename[kMaxLength];
TestStep fTestStep;
int fDirNo;
@ -114,7 +114,7 @@ struct SkpSkGrThreadState {
sk_bzero(fDirsFound, sizeof(fDirsFound));
sk_bzero(fError, sizeof(fError));
}
char fFilesFound[kMaxFiles][kMaxLength];
int fDirsFound[kMaxFiles];
int fError[kMaxFiles];
@ -338,7 +338,7 @@ static SkMSec timePict(SkPicture* pic, SkCanvas* canvas) {
const int slices = 3;
int xInterval = SkTMax(pWidth - maxDimension, 0) / (slices - 1);
int yInterval = SkTMax(pHeight - maxDimension, 0) / (slices - 1);
SkRect rect = {0, 0, SkIntToScalar(SkTMin(maxDimension, pWidth)),
SkRect rect = {0, 0, SkIntToScalar(SkTMin(maxDimension, pWidth)),
SkIntToScalar(SkTMin(maxDimension, pHeight))};
canvas->clipRect(rect);
SkMSec start = SkTime::GetMSecs();