/external/skia/tests/ |
PathOpsDCubicTest.cpp | 19 const SkDCubic& cubic = hullTests[index]; local 21 cubic.convexHull(order);
|
PathOpsDRectTest.cpp | 37 static void setRawBounds(const SkDCubic& cubic, SkDRect* rect) { 38 rect->set(cubic[0]); 39 rect->add(cubic[1]); 40 rect->add(cubic[2]); 41 rect->add(cubic[3]); 60 const SkDCubic& cubic = cubicTests[index]; local 61 SkASSERT(ValidCubic(cubic)); 62 setRawBounds(cubic, &rect); 63 rect2.setBounds(cubic);
|
PathOpsLineParametetersTest.cpp | 43 const SkDCubic& cubic = tests[index]; local 44 SkASSERT(ValidCubic(cubic)); 45 lineParameters.cubicEndPoints(cubic, 0, 3); 47 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1); 48 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2); 67 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1); 68 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
|
PathOpsCubicQuadIntersectionTest.cpp | 16 SkDCubic cubic; member in struct:quadCubic 56 const SkDCubic& cubic = quadCubicTests[index].cubic; local 57 SkASSERT(ValidCubic(cubic)); 62 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics); 65 SkDebugf("[%d] cubic order=%d\n", iIndex, order1); 73 int roots = i.intersect(cubic, quad); 76 SkDPoint xy1 = cubic.ptAtT(tt1);
|
GeometryTest.cpp | 122 const SkPoint cubic[] = { local 126 REPORTER_ASSERT(reporter, nearly_equal(cubic[i], dst[i]));
|
StrokerTest.cpp | 187 SkDebugf("\n%s tan=%d cubic=%d width=%1.9g\n", __FUNCTION__, gMaxRecursion[0], 203 SkDebugf("\n%s max tan=%d cubic=%d\n", __FUNCTION__, bestTan, bestCubic); 271 SkPoint cubic[4]; local 272 cubic[0].fX = r.nextRangeF(0, 500); 273 cubic[0].fY = r.nextRangeF(0, 500); 276 cubic[1].fX = r.nextRangeF(0, 500); 277 cubic[1].fY = r.nextRangeF(0, 500); 278 } while (cubic[0].distanceToSqd(cubic[1]) < halfSquared); 280 cubic[2].fX = r.nextRangeF(0, 500) [all...] |
PathOpsCubicLineIntersectionTest.cpp | 15 SkDCubic cubic; member in struct:lineCubic 28 const SkDCubic& cubic = failLineCubicTests[iIndex].cubic; local 29 SkASSERT(ValidCubic(cubic)); 34 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics); 37 SkDebugf("[%d] cubic order=%d\n", iIndex, order1); 46 int roots = i.intersect(cubic, line); 99 static int doIntersect(SkIntersections& intersections, const SkDCubic& cubic, const SkDLine& line) { 109 result = intersections.vertical(cubic, top, bottom, line[0].fX, flipped); 117 result = intersections.horizontal(cubic, left, right, line[0].fY, flipped) 126 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local 193 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local [all...] |
PathOpsCubicReduceOrderTest.cpp | 16 static bool controls_inside(const SkDCubic& cubic) { 17 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX) 18 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX) 19 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY 108 const SkDCubic& cubic = pointDegenerates[index]; local 117 const SkDCubic& cubic = notPointDegenerates[index]; local 127 const SkDCubic& cubic = lines[index]; local 136 const SkDCubic& cubic = notLines[index]; local 145 const SkDCubic& cubic = modEpsilonLines[index]; local 154 const SkDCubic& cubic = lessEpsilonLines[index]; local 164 const SkDCubic& cubic = negEpsilonLines[index]; local 175 SkDCubic cubic = quad.debugToCubic(); local 185 SkDCubic cubic = quad.debugToCubic(); local 195 SkDCubic cubic = quad.debugToCubic(); local [all...] |
PathOpsCubicLineIntersectionIdeas.cpp | 54 static double binary_search(const SkDCubic& cubic, double step, const SkDPoint& pt, double t, 59 SkDPoint cubicAtT = cubic.ptAtT(t); 67 SkDebugf("binary search failed: step=%1.9g cubic=", firstStep); 68 cubic.dump(); 76 SkDPoint lessPt = cubic.ptAtT(t - lastStep); 85 SkDPoint morePt = cubic.ptAtT(t + lastStep); 148 SkDCubic cubic = {{origin, local 155 SkDPoint pt = cubic.ptAtT(t); 157 // see if the line / cubic has a fun range of roots 159 SkDCubic::Coefficients(&cubic[0].fY, &A, &B, &C, &D) [all...] |
PathOpsTestCommon.cpp | 16 static double calc_t_div(const SkDCubic& cubic, double precision, double start) { 21 cPtr = &cubic; 24 sub = cubic.subDivide(start, 1); 39 static bool add_simple_ts(const SkDCubic& cubic, double precision, SkTArray<double, true>* ts) { 40 double tDiv = calc_t_div(cubic, precision, 0); 51 static void addTs(const SkDCubic& cubic, double precision, double start, double end, 53 double tDiv = calc_t_div(cubic, precision, 0); 63 static void toQuadraticTs(const SkDCubic* cubic, double precision, SkTArray<double, true>* ts) { 65 int order = reducer.reduce(*cubic, SkReduceOrder::kAllow_Quadratics); 70 int inflections = cubic->findInflections(inflectT) 165 SkDCubic cubic; local 205 SkDCubic cubic; local [all...] |
PathOpsCubicIntersectionTest.cpp | 620 const SkDCubic& cubic = selfSet[index]; local 623 c[i] = cubic[i].asSkPoint();
|
PathOpsDebug.cpp | 366 SkDCubic cubic; local 373 SkTSect<SkDCubic, SkDQuad> c1q2(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 374 SkTSect<SkDCubic, SkDConic> c1k2(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 375 SkTSect<SkDCubic, SkDCubic> c1c2(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 396 SkDCubic cubic; local 403 SkTSect<SkDCubic, SkDQuad> c1q2(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 404 SkTSect<SkDCubic, SkDConic> c1k2(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 405 SkTSect<SkDCubic, SkDCubic> c1c2(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 426 SkDCubic cubic; local 433 SkTSect<SkDCubic, SkDQuad> c1q2(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1)) 456 SkDCubic cubic; local 486 SkDCubic cubic; local 516 SkDCubic cubic; local 546 SkDCubic cubic; local 576 SkDCubic cubic; local 606 SkDCubic cubic; local [all...] |
PathTest.cpp | 187 // This test checks that r{Line,Quad,Conic,Cubic}To following a close() 316 // because we would keep trying to subdivide a degenerate cubic segment. 406 // too-few interations in our cubic-line intersection code. That code now runs 494 // This path used to assert, because our cubic-chopping code incorrectly 510 // which triggered an assert, from a tricky cubic. This test replicates that 754 REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected cubic verb"); 1032 SkPath cubic; local [all...] |
/external/skia/src/pathops/ |
SkPathOpsCubic.h | 60 static void Coefficients(const double* cubic, double* A, double* B, double* C, double* D); 77 SkDCubic cubic; local 78 return cubic.set(a).findInflections(tValues); 98 * Return the number of valid roots (0 < root < 1) for this cubic intersecting the 103 * Return the number of valid roots (0 < root < 1) for this cubic intersecting the 119 SkDCubic cubic; local 120 return cubic.set(a).subDivide(t1, t2); 127 SkDCubic cubic; local 128 cubic.set(pts).subDivide(a, d, t1, t2, p);
|
SkReduceOrder.cpp | 60 // note that three points in a line doesn't simplify a cubic 109 static int coincident_line(const SkDCubic& cubic, SkDCubic& reduction) { 110 reduction[0] = reduction[1] = cubic[0]; 118 static int vertical_line(const SkDCubic& cubic, SkDCubic& reduction) { 119 reduction[0] = cubic[0]; 120 reduction[1] = cubic[3]; 124 static int horizontal_line(const SkDCubic& cubic, SkDCubic& reduction) { 125 reduction[0] = cubic[0]; 126 reduction[1] = cubic[3]; 131 static int check_quadratic(const SkDCubic& cubic, SkDCubic& reduction) 288 SkDCubic cubic; local [all...] |
SkIntersections.h | 80 SkDCubic cubic; local 81 cubic.set(a); 83 return horizontal(cubic, left, right, y, flipped); 87 SkDCubic cubic; local 88 cubic.set(a); 90 return vertical(cubic, top, bottom, x, flipped); 94 SkDCubic cubic; local 95 cubic.set(a); 99 return intersect(cubic, line);
|
SkPathOpsCurve.h | 38 void set(const SkDCubic& cubic) { 40 fPts[index] = cubic[index].asSkPoint(); 105 SkDCubic cubic; local 106 cubic.set(a); 107 return cubic.ptAtT(t); 161 SkDCubic cubic; local 162 cubic.set(a); 163 return cubic.dxdyAtT(t); 220 SkDCubic cubic; local 221 cubic.set(a) 258 SkDCubic cubic; local 305 SkDCubic cubic; local 310 SkDCubic cubic; local [all...] |
SkPathOpsDebug.cpp | 28 const char* SkPathOpsDebug::kLVerbStr[] = {"", "line", "quad", "cubic"}; 142 SkDCubic cubic; local 143 cubic[0] = fPts[0]; 144 cubic[2] = fPts[1]; 145 cubic[3] = fPts[2]; 146 cubic[1].fX = (cubic[0].fX + cubic[2].fX * 2) / 3; 147 cubic[1].fY = (cubic[0].fY + cubic[2].fY * 2) / 3 [all...] |
SkPathOpsCubic.cpp | 146 // a pair of one cubic's points. If the 2nd cubic's points 147 // are on the line or on the opposite side from the 1st cubic's 'odd man', the 149 /* if returning true, check contains true if cubic's hull collapsed, making the cubic linear 150 if returning false, check contains true if the the cubic pair have only the end point in common 253 SkDCubic cubic; local 254 cubic.set(pointsPtr); 256 int infTCount = cubic.findInflections(inflectionTs); 259 int roots = cubic.findMaxCurvature(maxCurvature) [all...] |
/external/skia/src/utils/win/ |
SkDWriteGeometrySink.cpp | 88 } Cubic[4], Quadratic[3]; 90 static bool check_quadratic(const Cubic& cubic, Quadratic& reduction) { 91 float dx10 = cubic[1].x - cubic[0].x; 92 float dx23 = cubic[2].x - cubic[3].x; 93 float midX = cubic[0].x + dx10 * 3 / 2; 94 //NOTE: !approximately_equal(midX - cubic[3].x, dx23 * 3 / 2) 96 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) 118 Cubic cubic = { { prevPt.x, prevPt.y }, local [all...] |
/external/skia/src/pdf/ |
SkPDFUtils.cpp | 98 SkPoint cubic[4]; local 99 SkConvertQuadToCubic(quad, cubic); 100 SkPDFUtils::AppendCubic(cubic[1].fX, cubic[1].fY, cubic[2].fX, cubic[2].fY, 101 cubic[3].fX, cubic[3].fY, content);
|
/external/skia/src/gpu/ |
GrPathUtils.cpp | 358 // a is the first control point of the cubic. 363 // this assumes that the cubic doesn't inflect and is simple 427 // likely to hit the max subdivision count. However, in this case the cubic is approaching a 428 // line and the accuracy of the quad point isn't so important. We check if the two middle cubic 559 SkPoint* cubic = chopped + 3*i; local 560 convert_noninflect_cubic_to_quads(cubic, tolSqd, constrainWithinTangents, dir, quads); 679 // For the case when a cubic is actually a quadratic 755 // Set klm_rev to to match the sub_section of cubic that needs to have its orientation
|