/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 | 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()
|
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 …]
|
/external/skia/src/pathops/ |
D | SkPathOpsCubic.cpp | 21 if (fPts[endIndex].fX == fPts[ctrlIndex].fX) { in align() 22 dstPt->fX = fPts[endIndex].fX; in align() 24 if (fPts[endIndex].fY == fPts[ctrlIndex].fY) { in align() 25 dstPt->fY = fPts[endIndex].fY; in align() 80 return ((fPts[1] - fPts[0]).length() in calcPrecision() 81 + (fPts[2] - fPts[1]).length() in calcPrecision() 82 + (fPts[3] - fPts[2]).length()) / gPrecisionUnit; in calcPrecision() 106 dst.pts[0] = fPts[0]; in chopAt() 107 dst.pts[1].fX = (fPts[0].fX + fPts[1].fX) / 2; in chopAt() 108 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 = std::min(std::min(std::min(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 | 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()
|
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 …]
|
/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 | 89 int index = fPts.count(); in addPt() 90 *fPts.push() = pt; in addPt() 102 fPts.pop(); in popLastPt() 113 fPts.removeShuffle(0); in popFirstPtShuffle() 128 fPts[index] = pt; in updatePt() 143 fPts.rewind(); in rewind() 168 fNorms.append(fPts.count()); in computeNormals() 169 fNorms[0] = fPts[1] - fPts[0]; in computeNormals() 170 fNorms.top() = fPts[0] - fPts.top(); in computeNormals() 175 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 | 214 SkPoint fPts[N]; member in ArcToView 221 fPts[i].fX = 20 + rand.nextUScalar1() * 640; in ArcToView() 222 fPts[i].fY = 20 + rand.nextUScalar1() * 480; in ArcToView() 260 path->moveTo(fPts[0]); in makePath() 262 path->lineTo(fPts[i]); in makePath() 270 canvas->drawPoints(SkCanvas::kPoints_PointMode, N, fPts, fPtsPaint); in onDrawContent() 286 if (r.intersects(SkRect::MakeXYWH(fPts[i].fX, fPts[i].fY, 1, 1))) { in onFindClickHandler() 288 fPts[i] = c->fCurr; in onFindClickHandler() 312 SkPoint fPts[N]; member in FatStroke 319 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/skia/src/core/ |
D | SkPathMakers.h | 23 return fPts[fCurrent]; in current() 32 SkPoint fPts[N]; 44 fPts[0] = SkPoint::Make(rect.fLeft, rect.fTop); in SkPath_RectPointIterator() 45 fPts[1] = SkPoint::Make(rect.fRight, rect.fTop); in SkPath_RectPointIterator() 46 fPts[2] = SkPoint::Make(rect.fRight, rect.fBottom); in SkPath_RectPointIterator() 47 fPts[3] = SkPoint::Make(rect.fLeft, rect.fBottom); in SkPath_RectPointIterator() 59 fPts[0] = SkPoint::Make(cx, oval.fTop); in SkPath_OvalPointIterator() 60 fPts[1] = SkPoint::Make(oval.fRight, cy); in SkPath_OvalPointIterator() 61 fPts[2] = SkPoint::Make(cx, oval.fBottom); in SkPath_OvalPointIterator() 62 fPts[3] = SkPoint::Make(oval.fLeft, cy); in SkPath_OvalPointIterator() [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 | 138 SkPoint fPts[4]; member in QuadBenchBase 143 fPts[i].set(rand.nextUScalar1(), rand.nextUScalar1()); in QuadBenchBase() 155 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 156 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 157 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw() 158 SkEvalQuadAt(fPts, 0.5f, &result); 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() 174 result = SkEvalQuadAt(fPts, 0.5f); in onDraw() [all …]
|