Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@14196 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
4bd8fdc04c
commit
a1ed7aec95
@ -55,7 +55,7 @@ public:
|
||||
fsCoordName.c_str(),
|
||||
kVec2f_GrSLType);
|
||||
builder->fsCodeAppend(";\n");
|
||||
builder->fsCodeAppend("\tfloat distance = "
|
||||
builder->fsCodeAppend("\tfloat distance = "
|
||||
SK_DistanceFieldMultiplier "*(texColor.r - " SK_DistanceFieldThreshold ");\n");
|
||||
|
||||
// we adjust for the effect of the transformation on the distance by using
|
||||
@ -237,21 +237,21 @@ public:
|
||||
builder->fsAppendTextureLookup(samplers[0], "uv", kVec2f_GrSLType);
|
||||
builder->fsCodeAppend(";\n");
|
||||
builder->fsCodeAppend("\tvec3 distance;\n");
|
||||
builder->fsCodeAppend("\tdistance.y = "
|
||||
builder->fsCodeAppend("\tdistance.y = "
|
||||
SK_DistanceFieldMultiplier "*(texColor.r - " SK_DistanceFieldThreshold ");\n");
|
||||
// red is distance to left offset
|
||||
builder->fsCodeAppend("\tvec2 uv_adjusted = uv - offset;\n");
|
||||
builder->fsCodeAppend("\ttexColor = ");
|
||||
builder->fsAppendTextureLookup(samplers[0], "uv_adjusted", kVec2f_GrSLType);
|
||||
builder->fsCodeAppend(";\n");
|
||||
builder->fsCodeAppend("\tdistance.x = "
|
||||
builder->fsCodeAppend("\tdistance.x = "
|
||||
SK_DistanceFieldMultiplier "*(texColor.r - " SK_DistanceFieldThreshold ");\n");
|
||||
// blue is distance to right offset
|
||||
builder->fsCodeAppend("\tuv_adjusted = uv + offset;\n");
|
||||
builder->fsCodeAppend("\ttexColor = ");
|
||||
builder->fsAppendTextureLookup(samplers[0], "uv_adjusted", kVec2f_GrSLType);
|
||||
builder->fsCodeAppend(";\n");
|
||||
builder->fsCodeAppend("\tdistance.z = "
|
||||
builder->fsCodeAppend("\tdistance.z = "
|
||||
SK_DistanceFieldMultiplier "*(texColor.r - " SK_DistanceFieldThreshold ");\n");
|
||||
// we adjust for the effect of the transformation on the distance by using
|
||||
// the length of the gradient of the texture coordinates. We use st coordinates
|
||||
|
@ -553,7 +553,7 @@ const SkOpAngle* SkOpAngle::findFirst() const {
|
||||
}
|
||||
int angleStart = SkTMin(angle->fSectorStart, angle->fSectorEnd);
|
||||
// angles that are smaller by one aren't necessary better, since the larger may be a line
|
||||
// and the smaller may be a curve that curls to the other side of the line.
|
||||
// and the smaller may be a curve that curls to the other side of the line.
|
||||
if (bestEnd + 1 < angleStart) {
|
||||
return best;
|
||||
}
|
||||
@ -720,7 +720,7 @@ void SkOpAngle::markStops() {
|
||||
angle = angle->fNext;
|
||||
int angleStart = SkTMin(angle->fSectorStart, angle->fSectorEnd);
|
||||
// angles that are smaller by one aren't necessary better, since the larger may be a line
|
||||
// and the smaller may be a curve that curls to the other side of the line.
|
||||
// and the smaller may be a curve that curls to the other side of the line.
|
||||
if (lastEnd + 1 < angleStart) {
|
||||
angle->fStop = true;
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ void SkOpSegment::addCoinOutsides(const SkPoint& startPt, const SkPoint& endPt,
|
||||
const SkOpSpan& span = fTs[ttIndex];
|
||||
if (startPt != span.fPt) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (span.fOther == other && span.fPt == startPt) {
|
||||
checkOtherTMatch = true;
|
||||
break;
|
||||
@ -329,7 +329,7 @@ void SkOpSegment::addCoinOutsides(const SkPoint& startPt, const SkPoint& endPt,
|
||||
const SkOpSpan& oSpan = other->fTs[ooIndex];
|
||||
if (startPt != oSpan.fPt) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (oSpan.fT == fTs[ttIndex].fOtherT) {
|
||||
skipAdd = true;
|
||||
break;
|
||||
@ -2039,7 +2039,7 @@ void SkOpSegment::checkSmallCoincidence(const SkOpSpan& span,
|
||||
if (!SkDPoint::ApproximatelyEqual(mid, oMid)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if DEBUG_CONCIDENT
|
||||
SkDebugf("%s coincident found=%d %1.9g %1.9g\n", __FUNCTION__, testOther->fID,
|
||||
oTest->fOtherT, tTest->fT);
|
||||
|
@ -600,7 +600,7 @@ static IntersectData intersectDataSet15[] = { // pathops_visualizer.htm:6580
|
||||
{ {{{490.435,879.407}, {405.593,909.436}}}, 2, 0.500554405, 1, {} }, // pathops_visualizer.htm:6538
|
||||
{ {{{447.967,894.438}, {448.007,894.424}, {448.014,894.422}}}, 3, 0, 1, {} }, // pathops_visualizer.htm:6538
|
||||
{ {{{490.435,879.407}, {405.593,909.436}}}, 2, 0.500554405, 0.500000273, {} }, // pathops_visualizer.htm:6538
|
||||
}; //
|
||||
}; //
|
||||
|
||||
static IntersectData intersectDataSet16[] = { // pathops_visualizer.htm:7419
|
||||
{ {{{1.000,4.000}, {4.000,5.000}, {3.000,2.000}, {6.000,3.000}}}, 4, 0.5, 0, {} }, // pathops_visualizer.htm:7377
|
||||
|
@ -232,11 +232,11 @@ DEF_TEST(PathOpsCubicQuadSlop, reporter) {
|
||||
SkDebugf("cubic={{{%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}}}"
|
||||
" quad={{{%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}}}"
|
||||
" {{{%1.9g,%1.9g}, {%1.9g,%1.9g}}}"
|
||||
" qT=%1.9g cT=%1.9g dist=%1.9g cross=%1.9g\n",
|
||||
" qT=%1.9g cT=%1.9g dist=%1.9g cross=%1.9g\n",
|
||||
cubic[0].fX, cubic[0].fY, cubic[1].fX, cubic[1].fY,
|
||||
cubic[2].fX, cubic[2].fY, cubic[3].fX, cubic[3].fY,
|
||||
nearby[0].fX, nearby[0].fY, nearby[1].fX, nearby[1].fY,
|
||||
nearby[2].fX, nearby[2].fY,
|
||||
nearby[2].fX, nearby[2].fY,
|
||||
liner.pt(0).fX, liner.pt(0).fY,
|
||||
locals.pt(0).fX, locals.pt(0).fY, quadT, cubicT, dist.length(), qxc);
|
||||
#else
|
||||
@ -249,7 +249,7 @@ DEF_TEST(PathOpsCubicQuadSlop, reporter) {
|
||||
cubic[0].fX, cubic[0].fY, cubic[1].fX, cubic[1].fY,
|
||||
cubic[2].fX, cubic[2].fY, cubic[3].fX, cubic[3].fY,
|
||||
nearby[0].fX, nearby[0].fY, nearby[1].fX, nearby[1].fY,
|
||||
nearby[2].fX, nearby[2].fY,
|
||||
nearby[2].fX, nearby[2].fY,
|
||||
liner.pt(0).fX, liner.pt(0).fY,
|
||||
locals.pt(0).fX, locals.pt(0).fY);
|
||||
SkDebugf("</div>\n\n");
|
||||
|
@ -87,7 +87,7 @@ static void dontFailOne(skiatest::Reporter* reporter, int index) {
|
||||
result.setFillType(SkPath::kWinding_FillType);
|
||||
bool success = Simplify(path, &result);
|
||||
// linux 32 debug fails test 13 because the quad is not treated as linear
|
||||
// there's no error in the math that I can find -- it looks like a processor
|
||||
// there's no error in the math that I can find -- it looks like a processor
|
||||
// or compiler bug -- so for now, allow either to work
|
||||
REPORTER_ASSERT(reporter, success || index == 13);
|
||||
REPORTER_ASSERT(reporter, result.getFillType() != SkPath::kWinding_FillType);
|
||||
|
@ -4142,8 +4142,8 @@ static void testQuads21(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(3, 0, 2, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads22(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4155,8 +4155,8 @@ static void testQuads22(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(0, 1, 3, 2);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads23(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4168,8 +4168,8 @@ static void testQuads23(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(0, 1, 3, 2);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads24(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4181,8 +4181,8 @@ static void testQuads24(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 1);
|
||||
path.lineTo(0, 1);
|
||||
path.quadTo(0, 2, 3, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads25(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4194,8 +4194,8 @@ static void testQuads25(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(3, 0, 2, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads26(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4207,8 +4207,8 @@ static void testQuads26(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(0, 1, 3, 2);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads27(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4220,8 +4220,8 @@ static void testQuads27(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(2, 0);
|
||||
path.lineTo(2, 0);
|
||||
path.quadTo(3, 0, 1, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads28(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4233,8 +4233,8 @@ static void testQuads28(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(3, 0, 2, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads29(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4246,8 +4246,8 @@ static void testQuads29(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(3, 0);
|
||||
path.lineTo(3, 0);
|
||||
path.quadTo(3, 1, 0, 2);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads30(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4260,8 +4260,8 @@ static void testQuads30(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(2, 0);
|
||||
path.lineTo(2, 0);
|
||||
path.quadTo(3, 2, 1, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads31(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4274,8 +4274,8 @@ static void testQuads31(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.lineTo(0, 1);
|
||||
|
||||
path.quadTo(2, 1, 1, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads32(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4287,8 +4287,8 @@ static void testQuads32(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(1, 1);
|
||||
path.lineTo(1, 1);
|
||||
path.quadTo(3, 1, 0, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads33(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4300,8 +4300,8 @@ static void testQuads33(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(3, 0, 2, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads34(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4313,8 +4313,8 @@ static void testQuads34(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.moveTo(1, 0);
|
||||
path.lineTo(1, 0);
|
||||
path.quadTo(2, 0, 3, 3);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
path.close();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
static void testQuads35(skiatest::Reporter* reporter, const char* filename) {
|
||||
@ -4507,7 +4507,7 @@ static void testQuads47(skiatest::Reporter* reporter, const char* filename) {
|
||||
}
|
||||
|
||||
// this fails because there is a short unorderable segment and the unordered state isn't handled
|
||||
// correctly later on.
|
||||
// correctly later on.
|
||||
static void testQuads46x(skiatest::Reporter* reporter, const char* filename) {
|
||||
SkPath path;
|
||||
path.setFillType(SkPath::kEvenOdd_FillType);
|
||||
|
Loading…
Reference in New Issue
Block a user