/external/skia/src/pathops/ |
D | SkPathOpsCubic.cpp | 20 if (fPts[endIndex].fX == fPts[ctrlIndex].fX) { in align() 21 dstPt->fX = fPts[endIndex].fX; in align() 23 if (fPts[endIndex].fY == fPts[ctrlIndex].fY) { in align() 24 dstPt->fY = fPts[endIndex].fY; in align() 79 return ((fPts[1] - fPts[0]).length() in calcPrecision() 80 + (fPts[2] - fPts[1]).length() in calcPrecision() 81 + (fPts[3] - fPts[2]).length()) / gPrecisionUnit; in calcPrecision() 105 dst.pts[0] = fPts[0]; in chopAt() 106 dst.pts[1].fX = (fPts[0].fX + fPts[1].fX) / 2; in chopAt() 107 dst.pts[1].fY = (fPts[0].fY + fPts[1].fY) / 2; in chopAt() [all …]
|
D | SkPathOpsQuad.cpp | 15 static bool pointInTriangle(const SkDPoint fPts[3], const SkDPoint& test) { in pointInTriangle() 16 SkDVector v0 = fPts[2] - fPts[0]; in pointInTriangle() 17 SkDVector v1 = fPts[1] - fPts[0]; in pointInTriangle() 18 SkDVector v2 = test - fPts[0]; in pointInTriangle() 35 static bool matchesEnd(const SkDPoint fPts[3], const SkDPoint& test) { in matchesEnd() 36 return fPts[0] == test || fPts[2] == test; in matchesEnd() 56 double sign = (fPts[oddMan].fY - origY) * adj - (fPts[oddMan].fX - origX) * opp; in hullIntersects() 73 if (linear && !matchesEnd(fPts, q2.fPts[0]) && !matchesEnd(fPts, q2.fPts[2])) { in hullIntersects() 77 if (pointInTriangle(fPts, q2.fPts[0]) || pointInTriangle(fPts, q2.fPts[2])) { in hullIntersects() 106 endPt[opp - 1] = &fPts[end]; in otherPts() [all …]
|
D | SkPathOpsLine.cpp | 11 return fPts[0]; in ptAtT() 14 return fPts[1]; in ptAtT() 17 SkDPoint result = { one_t * fPts[0].fX + t * fPts[1].fX, one_t * fPts[0].fY + t * fPts[1].fY }; in ptAtT() 22 if (xy == fPts[0]) { // do cheapest test first in exactPoint() 25 if (xy == fPts[1]) { in exactPoint() 32 if (!AlmostBetweenUlps(fPts[0].fX, xy.fX, fPts[1].fX) in nearPoint() 33 || !AlmostBetweenUlps(fPts[0].fY, xy.fY, fPts[1].fY)) { in nearPoint() 37 SkDVector len = fPts[1] - fPts[0]; // the x/y magnitudes of the line in nearPoint() 39 SkDVector ab0 = xy - fPts[0]; in nearPoint() 51 double tiniest = SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() [all …]
|
D | SkOpCubicHull.cpp | 60 if (fPts[yMin].fY > fPts[index].fY || (fPts[yMin].fY == fPts[index].fY in convexHull() 61 && fPts[yMin].fX > fPts[index].fX)) { in convexHull() 92 if (fPts[1] == fPts[0] || fPts[1] == fPts[3]) { in convexHull() 96 if (fPts[2] == fPts[0] || fPts[2] == fPts[3]) { in convexHull() 101 double dist1_0 = fPts[1].distanceSquared(fPts[0]); in convexHull() 102 double dist1_3 = fPts[1].distanceSquared(fPts[3]); in convexHull() 103 double dist2_0 = fPts[2].distanceSquared(fPts[0]); in convexHull() 104 double dist2_3 = fPts[2].distanceSquared(fPts[3]); in convexHull()
|
D | SkPathOpsConic.cpp | 52 conic_eval_tan(&fPts[0].fX, fWeight, t), in dxdyAtT() 53 conic_eval_tan(&fPts[0].fY, fWeight, t) in dxdyAtT() 57 result = fPts[2] - fPts[0]; in dxdyAtT() 90 return fPts[0]; in ptAtT() 93 return fPts[2]; in ptAtT() 97 sk_ieee_double_divide(conic_eval_numerator(&fPts[0].fX, fWeight, t), denominator), in ptAtT() 98 sk_ieee_double_divide(conic_eval_numerator(&fPts[0].fY, fWeight, t), denominator) in ptAtT() 127 ax = fPts[0].fX; in subDivide() 128 ay = fPts[0].fY; in subDivide() 131 ax = conic_eval_numerator(&fPts[0].fX, fWeight, t1); in subDivide() [all …]
|
D | SkPathOpsCubic.h | 28 return fPts[0].approximatelyEqual(fPts[1]) && fPts[0].approximatelyEqual(fPts[2]) in collapsed() 29 && fPts[0].approximatelyEqual(fPts[3]); in collapsed() 33 SkDVector v01 = fPts[0] - fPts[1]; in controlsInside() 34 SkDVector v02 = fPts[0] - fPts[2]; in controlsInside() 35 SkDVector v03 = fPts[0] - fPts[3]; in controlsInside() 36 SkDVector v13 = fPts[1] - fPts[3]; in controlsInside() 37 SkDVector v23 = fPts[2] - fPts[3]; in controlsInside() 43 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; } 44 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; } 55 sk_bzero(fPts, sizeof(fPts)); in debugInit() [all …]
|
D | SkPathOpsQuad.h | 27 SkDPoint fPts[kPointCount]; member 30 return fPts[0].approximatelyEqual(fPts[1]) && fPts[0].approximatelyEqual(fPts[2]); in collapsed() 34 SkDVector v01 = fPts[0] - fPts[1]; in controlsInside() 35 SkDVector v02 = fPts[0] - fPts[2]; in controlsInside() 36 SkDVector v12 = fPts[1] - fPts[2]; in controlsInside() 41 sk_bzero(fPts, sizeof(fPts)); in debugInit() 47 SkDQuad result = {{fPts[2], fPts[1], fPts[0]} SkDEBUGPARAMS(fDebugGlobalState) }; in flip() 55 fPts[0] = pts[0]; in set() 56 fPts[1] = pts[1]; in set() 57 fPts[2] = pts[2]; in set() [all …]
|
D | SkDCubicToQuads.cpp | 37 quad[0] = fPts[0]; in toQuad() 38 const SkDPoint fromC1 = {(3 * fPts[1].fX - fPts[0].fX) / 2, (3 * fPts[1].fY - fPts[0].fY) / 2}; in toQuad() 39 const SkDPoint fromC2 = {(3 * fPts[2].fX - fPts[3].fX) / 2, (3 * fPts[2].fY - fPts[3].fY) / 2}; in toQuad() 42 quad[2] = fPts[3]; in toQuad()
|
/external/skqp/src/pathops/ |
D | SkPathOpsCubic.cpp | 20 if (fPts[endIndex].fX == fPts[ctrlIndex].fX) { in align() 21 dstPt->fX = fPts[endIndex].fX; in align() 23 if (fPts[endIndex].fY == fPts[ctrlIndex].fY) { in align() 24 dstPt->fY = fPts[endIndex].fY; in align() 79 return ((fPts[1] - fPts[0]).length() in calcPrecision() 80 + (fPts[2] - fPts[1]).length() in calcPrecision() 81 + (fPts[3] - fPts[2]).length()) / gPrecisionUnit; in calcPrecision() 105 dst.pts[0] = fPts[0]; in chopAt() 106 dst.pts[1].fX = (fPts[0].fX + fPts[1].fX) / 2; in chopAt() 107 dst.pts[1].fY = (fPts[0].fY + fPts[1].fY) / 2; in chopAt() [all …]
|
D | SkPathOpsQuad.cpp | 15 static bool pointInTriangle(const SkDPoint fPts[3], const SkDPoint& test) { in pointInTriangle() 16 SkDVector v0 = fPts[2] - fPts[0]; in pointInTriangle() 17 SkDVector v1 = fPts[1] - fPts[0]; in pointInTriangle() 18 SkDVector v2 = test - fPts[0]; in pointInTriangle() 35 static bool matchesEnd(const SkDPoint fPts[3], const SkDPoint& test) { in matchesEnd() 36 return fPts[0] == test || fPts[2] == test; in matchesEnd() 56 double sign = (fPts[oddMan].fY - origY) * adj - (fPts[oddMan].fX - origX) * opp; in hullIntersects() 73 if (linear && !matchesEnd(fPts, q2.fPts[0]) && !matchesEnd(fPts, q2.fPts[2])) { in hullIntersects() 77 if (pointInTriangle(fPts, q2.fPts[0]) || pointInTriangle(fPts, q2.fPts[2])) { in hullIntersects() 106 endPt[opp - 1] = &fPts[end]; in otherPts() [all …]
|
D | SkPathOpsLine.cpp | 11 return fPts[0]; in ptAtT() 14 return fPts[1]; in ptAtT() 17 SkDPoint result = { one_t * fPts[0].fX + t * fPts[1].fX, one_t * fPts[0].fY + t * fPts[1].fY }; in ptAtT() 22 if (xy == fPts[0]) { // do cheapest test first in exactPoint() 25 if (xy == fPts[1]) { in exactPoint() 32 if (!AlmostBetweenUlps(fPts[0].fX, xy.fX, fPts[1].fX) in nearPoint() 33 || !AlmostBetweenUlps(fPts[0].fY, xy.fY, fPts[1].fY)) { in nearPoint() 37 SkDVector len = fPts[1] - fPts[0]; // the x/y magnitudes of the line in nearPoint() 39 SkDVector ab0 = xy - fPts[0]; in nearPoint() 51 double tiniest = SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() [all …]
|
D | SkOpCubicHull.cpp | 60 if (fPts[yMin].fY > fPts[index].fY || (fPts[yMin].fY == fPts[index].fY in convexHull() 61 && fPts[yMin].fX > fPts[index].fX)) { in convexHull() 92 if (fPts[1] == fPts[0] || fPts[1] == fPts[3]) { in convexHull() 96 if (fPts[2] == fPts[0] || fPts[2] == fPts[3]) { in convexHull() 101 double dist1_0 = fPts[1].distanceSquared(fPts[0]); in convexHull() 102 double dist1_3 = fPts[1].distanceSquared(fPts[3]); in convexHull() 103 double dist2_0 = fPts[2].distanceSquared(fPts[0]); in convexHull() 104 double dist2_3 = fPts[2].distanceSquared(fPts[3]); in convexHull()
|
D | SkPathOpsConic.cpp | 52 conic_eval_tan(&fPts[0].fX, fWeight, t), in dxdyAtT() 53 conic_eval_tan(&fPts[0].fY, fWeight, t) in dxdyAtT() 57 result = fPts[2] - fPts[0]; in dxdyAtT() 90 return fPts[0]; in ptAtT() 93 return fPts[2]; in ptAtT() 97 sk_ieee_double_divide(conic_eval_numerator(&fPts[0].fX, fWeight, t), denominator), in ptAtT() 98 sk_ieee_double_divide(conic_eval_numerator(&fPts[0].fY, fWeight, t), denominator) in ptAtT() 127 ax = fPts[0].fX; in subDivide() 128 ay = fPts[0].fY; in subDivide() 131 ax = conic_eval_numerator(&fPts[0].fX, fWeight, t1); in subDivide() [all …]
|
D | SkPathOpsCubic.h | 28 return fPts[0].approximatelyEqual(fPts[1]) && fPts[0].approximatelyEqual(fPts[2]) in collapsed() 29 && fPts[0].approximatelyEqual(fPts[3]); in collapsed() 33 SkDVector v01 = fPts[0] - fPts[1]; in controlsInside() 34 SkDVector v02 = fPts[0] - fPts[2]; in controlsInside() 35 SkDVector v03 = fPts[0] - fPts[3]; in controlsInside() 36 SkDVector v13 = fPts[1] - fPts[3]; in controlsInside() 37 SkDVector v23 = fPts[2] - fPts[3]; in controlsInside() 43 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; } 44 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; } 55 sk_bzero(fPts, sizeof(fPts)); in debugInit() [all …]
|
D | SkPathOpsQuad.h | 27 SkDPoint fPts[kPointCount]; member 30 return fPts[0].approximatelyEqual(fPts[1]) && fPts[0].approximatelyEqual(fPts[2]); in collapsed() 34 SkDVector v01 = fPts[0] - fPts[1]; in controlsInside() 35 SkDVector v02 = fPts[0] - fPts[2]; in controlsInside() 36 SkDVector v12 = fPts[1] - fPts[2]; in controlsInside() 41 sk_bzero(fPts, sizeof(fPts)); in debugInit() 47 SkDQuad result = {{fPts[2], fPts[1], fPts[0]} SkDEBUGPARAMS(fDebugGlobalState) }; in flip() 55 fPts[0] = pts[0]; in set() 56 fPts[1] = pts[1]; in set() 57 fPts[2] = pts[2]; in set() [all …]
|
/external/skia/src/gpu/ops/ |
D | GrAAConvexTessellator.h | 51 int numPts() const { return fPts.count(); } in numPts() 54 const SkPoint& lastPoint() const { return fPts.top(); } in lastPoint() 55 const SkPoint& point(int index) const { return fPts[index]; } in point() 71 void setReserve(int numPts) { fPts.setReserve(numPts); } in setReserve() 72 void rewind() { fPts.rewind(); } in rewind() 74 int numPts() const { return fPts.count(); } in numPts() 76 const SkPoint& lastPoint() const { return fPts.top().fPt; } in lastPoint() 77 const SkPoint& firstPoint() const { return fPts[0].fPt; } in firstPoint() 78 const SkPoint& point(int index) const { return fPts[index].fPt; } in point() 80 int originatingIdx(int index) const { return fPts[index].fOriginatingIdx; } in originatingIdx() [all …]
|
D | GrAAConvexTessellator.cpp | 80 int index = fPts.count(); in addPt() 81 *fPts.push() = pt; in addPt() 93 fPts.pop(); in popLastPt() 104 fPts.removeShuffle(0); in popFirstPtShuffle() 119 fPts[index] = pt; in updatePt() 134 fPts.rewind(); in rewind() 159 fNorms.append(fPts.count()); in computeNormals() 160 fNorms[0] = fPts[1] - fPts[0]; in computeNormals() 161 fNorms.top() = fPts[0] - fPts.top(); in computeNormals() 166 fNorms[cur] = normalToVector(fPts[cur + 1] - fPts[cur]); in computeNormals() [all …]
|
/external/skqp/src/gpu/ops/ |
D | GrAAConvexTessellator.h | 51 int numPts() const { return fPts.count(); } in numPts() 54 const SkPoint& lastPoint() const { return fPts.top(); } in lastPoint() 55 const SkPoint& point(int index) const { return fPts[index]; } in point() 71 void setReserve(int numPts) { fPts.setReserve(numPts); } in setReserve() 72 void rewind() { fPts.rewind(); } in rewind() 74 int numPts() const { return fPts.count(); } in numPts() 76 const SkPoint& lastPoint() const { return fPts.top().fPt; } in lastPoint() 77 const SkPoint& firstPoint() const { return fPts[0].fPt; } in firstPoint() 78 const SkPoint& point(int index) const { return fPts[index].fPt; } in point() 80 int originatingIdx(int index) const { return fPts[index].fOriginatingIdx; } in originatingIdx() [all …]
|
D | GrAAConvexTessellator.cpp | 80 int index = fPts.count(); in addPt() 81 *fPts.push() = pt; in addPt() 93 fPts.pop(); in popLastPt() 104 fPts.removeShuffle(0); in popFirstPtShuffle() 119 fPts[index] = pt; in updatePt() 134 fPts.rewind(); in rewind() 159 fNorms.append(fPts.count()); in computeNormals() 160 fNorms[0] = fPts[1] - fPts[0]; in computeNormals() 161 fNorms.top() = fPts[0] - fPts.top(); in computeNormals() 166 fNorms[cur] = normalToVector(fPts[cur + 1] - fPts[cur]); in computeNormals() [all …]
|
/external/skqp/tests/ |
D | PathOpsConicIntersectionTest.cpp | 53 up.set(chopped[cIndex].fPts[pIndex]); in chopCompare() 54 SkASSERT(dChopped[cIndex].fPts[pIndex].approximatelyEqual(up)); in chopCompare() 77 conic.fPts[index].fX = c.fPts[index].fX * scale; in writePng() 78 conic.fPts[index].fY = c.fPts[index].fY * scale; in writePng() 80 chopped[chIndex].fPts[index].fX = ch[chIndex].fPts[index].fX * scale; in writePng() 81 chopped[chIndex].fPts[index].fY = ch[chIndex].fPts[index].fY * scale; in writePng() 100 path.moveTo(conic.fPts[0]); in writePng() 101 path.conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in writePng() 105 path.moveTo(chopped[0].fPts[0]); in writePng() 106 path.conicTo(chopped[0].fPts[1], chopped[0].fPts[2], chopped[0].fW); in writePng() [all …]
|
/external/skia/tests/ |
D | PathOpsConicIntersectionTest.cpp | 53 up.set(chopped[cIndex].fPts[pIndex]); in chopCompare() 54 SkASSERT(dChopped[cIndex].fPts[pIndex].approximatelyEqual(up)); in chopCompare() 77 conic.fPts[index].fX = c.fPts[index].fX * scale; in writePng() 78 conic.fPts[index].fY = c.fPts[index].fY * scale; in writePng() 80 chopped[chIndex].fPts[index].fX = ch[chIndex].fPts[index].fX * scale; in writePng() 81 chopped[chIndex].fPts[index].fY = ch[chIndex].fPts[index].fY * scale; in writePng() 100 path.moveTo(conic.fPts[0]); in writePng() 101 path.conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in writePng() 105 path.moveTo(chopped[0].fPts[0]); in writePng() 106 path.conicTo(chopped[0].fPts[1], chopped[0].fPts[2], chopped[0].fW); in writePng() [all …]
|
/external/skia/samplecode/ |
D | SamplePath.cpp | 220 SkPoint fPts[N]; member in ArcToView 227 fPts[i].fX = 20 + rand.nextUScalar1() * 640; in ArcToView() 228 fPts[i].fY = 20 + rand.nextUScalar1() * 480; in ArcToView() 271 path->moveTo(fPts[0]); in makePath() 273 path->lineTo(fPts[i]); in makePath() 281 canvas->drawPoints(SkCanvas::kPoints_PointMode, N, fPts, fPtsPaint); in onDrawContent() 297 fPts[index] = click->fCurr; in onClick() 307 if (r.intersects(SkRect::MakeXYWH(fPts[i].fX, fPts[i].fY, 1, 1))) { in onFindClickHandler() 332 SkPoint fPts[N]; member in FatStroke 339 fPts[i].fX = 20 + rand.nextUScalar1() * 640; in FatStroke() [all …]
|
/external/skqp/samplecode/ |
D | SamplePath.cpp | 220 SkPoint fPts[N]; member in ArcToView 227 fPts[i].fX = 20 + rand.nextUScalar1() * 640; in ArcToView() 228 fPts[i].fY = 20 + rand.nextUScalar1() * 480; in ArcToView() 271 path->moveTo(fPts[0]); in makePath() 273 path->lineTo(fPts[i]); in makePath() 281 canvas->drawPoints(SkCanvas::kPoints_PointMode, N, fPts, fPtsPaint); in onDrawContent() 297 fPts[index] = click->fCurr; in onClick() 307 if (r.intersects(SkRect::MakeXYWH(fPts[i].fX, fPts[i].fY, 1, 1))) { in onFindClickHandler() 332 SkPoint fPts[N]; member in FatStroke 339 fPts[i].fX = 20 + rand.nextUScalar1() * 640; in FatStroke() [all …]
|
/external/skqp/bench/ |
D | GeometryBench.cpp | 137 SkPoint fPts[4]; member in QuadBenchBase 142 fPts[i].set(rand.nextUScalar1(), rand.nextUScalar1()); in QuadBenchBase() 154 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 155 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 156 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 157 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 170 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() 171 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() 172 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() 173 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() [all …]
|
/external/skia/bench/ |
D | GeometryBench.cpp | 137 SkPoint fPts[4]; member in QuadBenchBase 142 fPts[i].set(rand.nextUScalar1(), rand.nextUScalar1()); in QuadBenchBase() 154 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 155 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 156 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 157 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 170 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() 171 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() 172 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() 173 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() [all …]
|