13 double* closestDist)
const {
16 for (
int index = 0; index < fUsed; ++index) {
17 if (!
between(rangeStart, fT[0][index], rangeEnd)) {
22 if (*closestDist > dist) {
31 for (
int index = 0; index < fUsed; ++index) {
32 fT[1][index] = 1 - fT[1][index];
37 if (fIsCoincident[0] == 3 &&
between(fT[0][0], one, fT[0][1])) {
41 SkASSERT(fUsed <= 1 || fT[0][0] <= fT[0][1]);
43 for (index = 0; index < fUsed; ++index) {
44 double oldOne = fT[0][index];
45 double oldTwo = fT[1][index];
46 if (one == oldOne &&
two == oldTwo) {
59 int remaining = fUsed - index - 1;
60 memmove(&fPt[index], &fPt[index + 1],
sizeof(fPt[0]) * remaining);
61 memmove(&fT[0][index], &fT[0][index + 1],
sizeof(fT[0][0]) * remaining);
62 memmove(&fT[1][index], &fT[1][index + 1],
sizeof(fT[1][0]) * remaining);
63 int clearMask = ~((1 << index) - 1);
64 fIsCoincident[0] -= (fIsCoincident[0] >> 1) & clearMask;
65 fIsCoincident[1] -= (fIsCoincident[1] >> 1) & clearMask;
71 SkDebugf(
"%s t=%1.9g pts roughly equal\n", __FUNCTION__, one);
75 for (index = 0; index < fUsed; ++index) {
76 if (fT[0][index] > one) {
86 int remaining = fUsed - index;
88 memmove(&fPt[index + 1], &fPt[index],
sizeof(fPt[0]) * remaining);
89 memmove(&fT[0][index + 1], &fT[0][index],
sizeof(fT[0][0]) * remaining);
90 memmove(&fT[1][index + 1], &fT[1][index],
sizeof(fT[1][0]) * remaining);
91 int clearMask = ~((1 << index) - 1);
92 fIsCoincident[0] += fIsCoincident[0] & clearMask;
93 fIsCoincident[1] += fIsCoincident[1] & clearMask;
96 if (one < 0 || one > 1) {
99 if (two < 0 || two > 1) {
113 fNearlySame[one ? 1 : 0] =
true;
115 fPt2[one ? 1 : 0] =
pt2;
128 int bit = 1 << index;
129 fIsCoincident[0] |= bit;
130 fIsCoincident[1] |= bit;
136 fT[0][0] =
a.fT[0][aIndex];
137 fT[1][0] =
b.fT[0][bIndex];
138 fPt[0] =
a.fPt[aIndex];
139 fPt2[0] =
b.fPt[bIndex];
145 for (
int index = 0; index < fUsed; ++index) {
146 if (!
between(rangeStart, fT[0][index], rangeEnd)) {
155 if (
test.crossCheck(best) < 0) {
163 int remaining = --fUsed - index;
164 if (remaining <= 0) {
167 memmove(&fPt[index], &fPt[index + 1],
sizeof(fPt[0]) * remaining);
168 memmove(&fT[0][index], &fT[0][index + 1],
sizeof(fT[0][0]) * remaining);
169 memmove(&fT[1][index], &fT[1][index + 1],
sizeof(fT[1][0]) * remaining);
171 int coBit = fIsCoincident[0] & (1 << index);
172 fIsCoincident[0] -= ((fIsCoincident[0] >> 1) & ~((1 << index) - 1)) + coBit;
173 SkASSERT(!(coBit ^ (fIsCoincident[1] & (1 << index))));
174 fIsCoincident[1] -= ((fIsCoincident[1] >> 1) & ~((1 << index) - 1)) + coBit;
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
bool precisely_zero(double x)
bool between(double a, double b, double c)
bool precisely_equal(double x, double y)
bool more_roughly_equal(double x, double y)
void merge(const SkIntersections &, int, const SkIntersections &, int)
const SkDPoint & pt2(int index) const
int insertSwap(double one, double two, const SkDPoint &pt)
int insert(double one, double two, const SkDPoint &pt)
void removeOne(int index)
const SkDPoint & pt(int index) const
void insertNear(double one, double two, const SkDPoint &pt1, const SkDPoint &pt2)
int insertCoincident(double one, double two, const SkDPoint &pt)
int closestTo(double rangeStart, double rangeEnd, const SkDPoint &testPt, double *dist) const
void setCoincident(int index)
int mostOutside(double rangeStart, double rangeEnd, const SkDPoint &origin) const
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
double distanceSquared(const SkDPoint &a) const
bool roughlyEqual(const SkDPoint &a) const