/external/skqp/tests/ |
D | PathOpsConicLineIntersectionTest.cpp | 19 ConicPts conic; member 34 static int doIntersect(SkIntersections& intersections, const SkDConic& conic, const SkDLine& line, in doIntersect() argument 46 result = intersections.vertical(conic, top, bottom, line[0].fX, flipped); in doIntersect() 55 result = intersections.horizontal(conic, left, right, line[0].fY, flipped); in doIntersect() 57 intersections.intersect(conic, line); in doIntersect() 64 ConicPts conic; member 76 const ConicPts& c = oneOffs[index].conic; in testOneOffs() 77 SkDConic conic; in testOneOffs() local 78 conic.debugSet(c.fPts.fPts, c.fWeight); in testOneOffs() 79 SkASSERT(ValidConic(conic)); in testOneOffs() [all …]
|
D | PathOpsCubicConicIntersectionTest.cpp | 16 ConicPts conic; member 50 const ConicPts& co = cubicConicTests[index].conic; in cubicConicIntersection() 51 SkDConic conic; in cubicConicIntersection() local 52 conic.debugSet(co.fPts.fPts, co.fWeight); in cubicConicIntersection() 53 SkASSERT(ValidConic(conic)); in cubicConicIntersection() 57 int order2 = reduce2.reduce(conic.fPts); in cubicConicIntersection() 67 int roots = i.intersect(cubic, conic); in cubicConicIntersection() 72 SkDPoint xy2 = conic.ptAtT(tt2); in cubicConicIntersection()
|
D | PathOpsConicQuadIntersectionTest.cpp | 15 ConicPts conic; member 35 const ConicPts& c = conicQuadTests[index].conic; in conicQuadIntersection() 36 SkDConic conic; in conicQuadIntersection() local 37 conic.debugSet(c.fPts.fPts, c.fWeight); in conicQuadIntersection() 38 SkASSERT(ValidConic(conic)); in conicQuadIntersection() 45 int order1 = reduce2.reduce(conic.fPts); in conicQuadIntersection() 56 int roots = i.intersect(conic, quad); in conicQuadIntersection() 59 SkDPoint xy1 = conic.ptAtT(tt1); in conicQuadIntersection()
|
D | PathOpsConicIntersectionTest.cpp | 75 SkConic conic, chopped[2]; in writePng() local 77 conic.fPts[index].fX = c.fPts[index].fX * scale; in writePng() 78 conic.fPts[index].fY = c.fPts[index].fY * scale; in writePng() 84 conic.fW = c.fW; in writePng() 89 conic.computeTightBounds(&bounds); in writePng() 100 path.moveTo(conic.fPts[0]); in writePng() 101 path.conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in writePng() 161 SkConic conic; in chopBothWays() local 163 conic.fPts[index] = dConic.fPts[index].asSkPoint(); in chopBothWays() 165 conic.fW = dConic.fWeight; in chopBothWays() [all …]
|
D | GeometryTest.cpp | 86 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_pos() argument 88 conic.evalAt(t, &p0, nullptr); in test_conic_eval_pos() 89 p1 = conic.evalAt(t); in test_conic_eval_pos() 93 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_tan() argument 95 conic.evalAt(t, nullptr, &v0); in test_conic_eval_tan() 96 v1 = conic.evalTangentAt(t); in test_conic_eval_tan() 109 SkConic conic(pts, w); in test_conic() local 114 test_conic_eval_pos(reporter, conic, t); in test_conic() 115 test_conic_eval_tan(reporter, conic, t); in test_conic() 130 SkConic conic(&pts[index * 3], 0.707f); in test_quad_tangents() local [all …]
|
/external/skia/tests/ |
D | PathOpsConicLineIntersectionTest.cpp | 19 ConicPts conic; member 34 static int doIntersect(SkIntersections& intersections, const SkDConic& conic, const SkDLine& line, in doIntersect() argument 46 result = intersections.vertical(conic, top, bottom, line[0].fX, flipped); in doIntersect() 55 result = intersections.horizontal(conic, left, right, line[0].fY, flipped); in doIntersect() 57 intersections.intersect(conic, line); in doIntersect() 64 ConicPts conic; member 76 const ConicPts& c = oneOffs[index].conic; in testOneOffs() 77 SkDConic conic; in testOneOffs() local 78 conic.debugSet(c.fPts.fPts, c.fWeight); in testOneOffs() 79 SkASSERT(ValidConic(conic)); in testOneOffs() [all …]
|
D | PathOpsCubicConicIntersectionTest.cpp | 16 ConicPts conic; member 50 const ConicPts& co = cubicConicTests[index].conic; in cubicConicIntersection() 51 SkDConic conic; in cubicConicIntersection() local 52 conic.debugSet(co.fPts.fPts, co.fWeight); in cubicConicIntersection() 53 SkASSERT(ValidConic(conic)); in cubicConicIntersection() 57 int order2 = reduce2.reduce(conic.fPts); in cubicConicIntersection() 67 int roots = i.intersect(cubic, conic); in cubicConicIntersection() 72 SkDPoint xy2 = conic.ptAtT(tt2); in cubicConicIntersection()
|
D | PathOpsConicQuadIntersectionTest.cpp | 15 ConicPts conic; member 35 const ConicPts& c = conicQuadTests[index].conic; in conicQuadIntersection() 36 SkDConic conic; in conicQuadIntersection() local 37 conic.debugSet(c.fPts.fPts, c.fWeight); in conicQuadIntersection() 38 SkASSERT(ValidConic(conic)); in conicQuadIntersection() 45 int order1 = reduce2.reduce(conic.fPts); in conicQuadIntersection() 56 int roots = i.intersect(conic, quad); in conicQuadIntersection() 59 SkDPoint xy1 = conic.ptAtT(tt1); in conicQuadIntersection()
|
D | PathOpsConicIntersectionTest.cpp | 75 SkConic conic, chopped[2]; in writePng() local 77 conic.fPts[index].fX = c.fPts[index].fX * scale; in writePng() 78 conic.fPts[index].fY = c.fPts[index].fY * scale; in writePng() 84 conic.fW = c.fW; in writePng() 89 conic.computeTightBounds(&bounds); in writePng() 100 path.moveTo(conic.fPts[0]); in writePng() 101 path.conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in writePng() 161 SkConic conic; in chopBothWays() local 163 conic.fPts[index] = dConic.fPts[index].asSkPoint(); in chopBothWays() 165 conic.fW = dConic.fWeight; in chopBothWays() [all …]
|
D | GeometryTest.cpp | 86 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_pos() argument 88 conic.evalAt(t, &p0, nullptr); in test_conic_eval_pos() 89 p1 = conic.evalAt(t); in test_conic_eval_pos() 93 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_tan() argument 95 conic.evalAt(t, nullptr, &v0); in test_conic_eval_tan() 96 v1 = conic.evalTangentAt(t); in test_conic_eval_tan() 109 SkConic conic(pts, w); in test_conic() local 114 test_conic_eval_pos(reporter, conic, t); in test_conic() 115 test_conic_eval_tan(reporter, conic, t); in test_conic() 130 SkConic conic(&pts[index * 3], 0.707f); in test_quad_tangents() local [all …]
|
/external/skia/src/pathops/ |
D | SkPathOpsConic.h | 73 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { in hullIntersects() 74 return fPts.hullIntersects(conic.fPts, isLinear); in hullIntersects() 113 SkDConic conic; in SubDivide() local 114 conic.set(a, weight); in SubDivide() 115 return conic.subDivide(t1, t2); in SubDivide() 124 SkDConic conic; in SubDivide() local 125 conic.set(pts, weight); in SubDivide() 126 return conic.subDivide(a, c, t1, t2, newWeight); in SubDivide() 163 bool hullIntersects(const SkDConic& conic, bool* isLinear) const override { in hullIntersects() argument 164 return conic.hullIntersects(fConic, isLinear); in hullIntersects()
|
D | SkPathOpsCurve.h | 115 SkDConic conic; in dconic_xy_at_t() local 116 conic.set(a, weight); in dconic_xy_at_t() 117 return conic.ptAtT(t); in dconic_xy_at_t() 195 SkDConic conic; in dconic_dxdy_at_t() local 196 conic.set(a, weight); in dconic_dxdy_at_t() 197 return conic.dxdyAtT(t); in dconic_dxdy_at_t() 277 SkDConic conic; in conic_is_vertical() local 278 conic.set(a, weight); in conic_is_vertical() 279 SkDConic dst = conic.subDivide(startT, endT); in conic_is_vertical() 315 SkDConic conic; in conic_intersect_ray() local [all …]
|
D | SkIntersections.h | 59 SkDConic conic; in conicHorizontal() local 60 conic.set(a, weight); in conicHorizontal() 62 return horizontal(conic, left, right, y, flipped); in conicHorizontal() 67 SkDConic conic; in conicVertical() local 68 conic.set(a, weight); in conicVertical() 70 return vertical(conic, top, bottom, x, flipped); in conicVertical() 74 SkDConic conic; in conicLine() local 75 conic.set(a, weight); in conicLine() 79 return intersect(conic, line); in conicLine() 252 static int HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots); [all …]
|
D | SkDConicLineIntersection.cpp | 347 int SkIntersections::horizontal(const SkDConic& conic, double left, double right, double y, in horizontal() argument 350 LineConicIntersections c(conic, line, this); in horizontal() 354 int SkIntersections::vertical(const SkDConic& conic, double top, double bottom, double x, in vertical() argument 357 LineConicIntersections c(conic, line, this); in vertical() 361 int SkIntersections::intersect(const SkDConic& conic, const SkDLine& line) { in intersect() argument 362 LineConicIntersections c(conic, line, this); in intersect() 367 int SkIntersections::intersectRay(const SkDConic& conic, const SkDLine& line) { in intersectRay() argument 368 LineConicIntersections c(conic, line, this); in intersectRay() 371 fPt[index] = conic.ptAtT(fT[0][index]); in intersectRay() 376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots) { in HorizontalIntercept() argument [all …]
|
D | SkPathOpsAsWinding.cpp | 127 SkDConic conic; in left_edge() local 128 conic.set(pts, weight); in left_edge() 129 if (!conic.monotonicInX()) { in left_edge() 130 roots = SkDConic::FindExtrema(&conic[0].fX, weight, &t); in left_edge() 133 result = conic.ptAtT(t).asSkPoint(); in left_edge() 138 dy = conic.dxdyAtT(t).fY; in left_edge()
|
/external/skqp/src/pathops/ |
D | SkPathOpsConic.h | 73 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { in hullIntersects() 74 return fPts.hullIntersects(conic.fPts, isLinear); in hullIntersects() 113 SkDConic conic; in SubDivide() local 114 conic.set(a, weight); in SubDivide() 115 return conic.subDivide(t1, t2); in SubDivide() 124 SkDConic conic; in SubDivide() local 125 conic.set(pts, weight); in SubDivide() 126 return conic.subDivide(a, c, t1, t2, newWeight); in SubDivide() 163 bool hullIntersects(const SkDConic& conic, bool* isLinear) const override { in hullIntersects() argument 164 return conic.hullIntersects(fConic, isLinear); in hullIntersects()
|
D | SkPathOpsCurve.h | 115 SkDConic conic; in dconic_xy_at_t() local 116 conic.set(a, weight); in dconic_xy_at_t() 117 return conic.ptAtT(t); in dconic_xy_at_t() 195 SkDConic conic; in dconic_dxdy_at_t() local 196 conic.set(a, weight); in dconic_dxdy_at_t() 197 return conic.dxdyAtT(t); in dconic_dxdy_at_t() 277 SkDConic conic; in conic_is_vertical() local 278 conic.set(a, weight); in conic_is_vertical() 279 SkDConic dst = conic.subDivide(startT, endT); in conic_is_vertical() 315 SkDConic conic; in conic_intersect_ray() local [all …]
|
D | SkIntersections.h | 59 SkDConic conic; in conicHorizontal() local 60 conic.set(a, weight); in conicHorizontal() 62 return horizontal(conic, left, right, y, flipped); in conicHorizontal() 67 SkDConic conic; in conicVertical() local 68 conic.set(a, weight); in conicVertical() 70 return vertical(conic, top, bottom, x, flipped); in conicVertical() 74 SkDConic conic; in conicLine() local 75 conic.set(a, weight); in conicLine() 79 return intersect(conic, line); in conicLine() 252 static int HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots); [all …]
|
D | SkDConicLineIntersection.cpp | 347 int SkIntersections::horizontal(const SkDConic& conic, double left, double right, double y, in horizontal() argument 350 LineConicIntersections c(conic, line, this); in horizontal() 354 int SkIntersections::vertical(const SkDConic& conic, double top, double bottom, double x, in vertical() argument 357 LineConicIntersections c(conic, line, this); in vertical() 361 int SkIntersections::intersect(const SkDConic& conic, const SkDLine& line) { in intersect() argument 362 LineConicIntersections c(conic, line, this); in intersect() 367 int SkIntersections::intersectRay(const SkDConic& conic, const SkDLine& line) { in intersectRay() argument 368 LineConicIntersections c(conic, line, this); in intersectRay() 371 fPt[index] = conic.ptAtT(fT[0][index]); in intersectRay() 376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots) { in HorizontalIntercept() argument [all …]
|
/external/skia/src/core/ |
D | SkGeometry.h | 351 SkConicCoeff(const SkConic& conic) { in SkConicCoeff() 352 Sk2s p0 = from_point(conic.fPts[0]); in SkConicCoeff() 353 Sk2s p1 = from_point(conic.fPts[1]); in SkConicCoeff() 354 Sk2s p2 = from_point(conic.fPts[2]); in SkConicCoeff() 355 Sk2s ww(conic.fW); in SkConicCoeff() 429 const SkPoint* computeQuads(const SkConic& conic, SkScalar tol) { in computeQuads() argument 430 int pow2 = conic.computeQuadPOW2(tol); in computeQuads() 433 fQuadCount = conic.chopIntoQuadsPOW2(pts, pow2); in computeQuads() 439 SkConic conic; in computeQuads() local 440 conic.set(pts, weight); in computeQuads() [all …]
|
D | SkContourMeasure.cpp | 73 SkConic conic(pts[0], pts[2], pts[3], pts[1].fX); in SkContourMeasure_segTo() local 77 dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in SkContourMeasure_segTo() 80 if (conic.chopAt(stopT, tmp)) { in SkContourMeasure_segTo() 87 if (conic.chopAt(startT, tmp1)) { in SkContourMeasure_segTo() 92 conic.chopAt(startT, stopT, &tmp); in SkContourMeasure_segTo() 195 SkScalar SkContourMeasureIter::compute_conic_segs(const SkConic& conic, SkScalar distance, in compute_conic_segs() argument 200 SkPoint halfPt = conic.evalAt(tValue2Scalar(halft)); in compute_conic_segs() 205 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex); in compute_conic_segs() 206 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex); in compute_conic_segs() 318 const SkConic conic(pts, fIter.conicWeight()); in buildSegments() local [all …]
|
D | SkStroke.cpp | 458 void SkPathStroker::setConicEndNormal(const SkConic& conic, const SkVector& normalAB, in setConicEndNormal() argument 460 setQuadEndNormal(conic.fPts, normalAB, unitNormalAB, normalBC, unitNormalBC); in setConicEndNormal() 600 static bool conic_in_line(const SkConic& conic) { in conic_in_line() argument 601 return quad_in_line(conic.fPts); in conic_in_line() 643 SkPathStroker::ReductionType SkPathStroker::CheckConicLinear(const SkConic& conic, in CheckConicLinear() argument 645 bool degenerateAB = degenerate_vector(conic.fPts[1] - conic.fPts[0]); in CheckConicLinear() 646 bool degenerateBC = degenerate_vector(conic.fPts[2] - conic.fPts[1]); in CheckConicLinear() 653 if (!conic_in_line(conic)) { in CheckConicLinear() 658 SkScalar t = SkFindQuadMaxCurvature(conic.fPts); in CheckConicLinear() 662 conic.evalAt(t, reduction, nullptr); in CheckConicLinear() [all …]
|
/external/skqp/src/core/ |
D | SkGeometry.h | 351 SkConicCoeff(const SkConic& conic) { in SkConicCoeff() 352 Sk2s p0 = from_point(conic.fPts[0]); in SkConicCoeff() 353 Sk2s p1 = from_point(conic.fPts[1]); in SkConicCoeff() 354 Sk2s p2 = from_point(conic.fPts[2]); in SkConicCoeff() 355 Sk2s ww(conic.fW); in SkConicCoeff() 429 const SkPoint* computeQuads(const SkConic& conic, SkScalar tol) { in computeQuads() argument 430 int pow2 = conic.computeQuadPOW2(tol); in computeQuads() 433 fQuadCount = conic.chopIntoQuadsPOW2(pts, pow2); in computeQuads() 439 SkConic conic; in computeQuads() local 440 conic.set(pts, weight); in computeQuads() [all …]
|
D | SkPathMeasure.cpp | 83 SkConic conic(pts[0], pts[2], pts[3], pts[1].fX); in SkPathMeasure_segTo() local 87 dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in SkPathMeasure_segTo() 90 if (conic.chopAt(stopT, tmp)) { in SkPathMeasure_segTo() 97 if (conic.chopAt(startT, tmp1)) { in SkPathMeasure_segTo() 102 conic.chopAt(startT, stopT, &tmp); in SkPathMeasure_segTo() 259 SkScalar SkPathMeasure::compute_conic_segs(const SkConic& conic, SkScalar distance, in compute_conic_segs() argument 266 SkPoint halfPt = conic.evalAt(tValue2Scalar(halft)); in compute_conic_segs() 271 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex); in compute_conic_segs() 272 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex); in compute_conic_segs() 385 const SkConic conic(pts, fIter.conicWeight()); in buildSegments() local [all …]
|
D | SkStroke.cpp | 458 void SkPathStroker::setConicEndNormal(const SkConic& conic, const SkVector& normalAB, in setConicEndNormal() argument 460 setQuadEndNormal(conic.fPts, normalAB, unitNormalAB, normalBC, unitNormalBC); in setConicEndNormal() 599 static bool conic_in_line(const SkConic& conic) { in conic_in_line() argument 600 return quad_in_line(conic.fPts); in conic_in_line() 642 SkPathStroker::ReductionType SkPathStroker::CheckConicLinear(const SkConic& conic, in CheckConicLinear() argument 644 bool degenerateAB = degenerate_vector(conic.fPts[1] - conic.fPts[0]); in CheckConicLinear() 645 bool degenerateBC = degenerate_vector(conic.fPts[2] - conic.fPts[1]); in CheckConicLinear() 652 if (!conic_in_line(conic)) { in CheckConicLinear() 657 SkScalar t = SkFindQuadMaxCurvature(conic.fPts); in CheckConicLinear() 661 conic.evalAt(t, reduction, nullptr); in CheckConicLinear() [all …]
|