56const char* gDebugRayDirName[] = {
65 return static_cast<int>(
dir) & 1;
85 return (&r.
fLeft)[
static_cast<int>(
dir)];
94 return static_cast<bool>((
static_cast<int>(
dir) & 2) == 0);
99 bool leftBottom = ((
static_cast<int>(
dir) + 1) & 2) != 0;
100 return vPartPos == leftBottom;
107 fT = span->
t() * (1 - t) + span->
next()->
t() * t;
135 }
while ((testSegment = testSegment->
next()));
152 for (
int index = 0; index <
roots; ++index) {
153 double t = tVals[index];
169 if (
base.fSpan->segment() ==
this) {
182 SkDebugf(
"%s (rarely expect this)\n", __FUNCTION__);
198 newHit->
fNext = *hits;
201 newHit->
fSpan = span;
216 if (tHit < next->t()) {
219 }
while (!
next->final() && (span =
next->upCast()));
224 return a->fPt.fX <
b->fPt.fX;
228 return b->fPt.fX <
a->fPt.fX;
232 return a->fPt.fY <
b->fPt.fY;
236 return b->fPt.fY <
a->fPt.fY;
241 *dirOffset = tTry & 1;
242 int tBase = tTry >> 1;
249 int tIndex = (tBase - 1) & ((1 << tBits) - 1);
275 contour->rayCheck(hitBase,
dir, &hitHead, &allocator);
290 SkDebugf(
"%s dir=%s seg=%d t=%1.9g pt=(%1.9g,%1.9g)\n", __FUNCTION__,
293 for (
int index = 0; index <
count; ++index) {
297 bool operand = span ? hitSegment->
operand() :
false;
299 SkDebugf(
"%s [%d] valid=%d operand=%d span=%d ccw=%d ", __FUNCTION__, index,
304 SkDebugf(
" t=%1.9g pt=(%1.9g,%1.9g) slope=(%1.9g,%1.9g)\n", hit->
fT,
311 for (
int index = 0; index <
count; ++index) {
329 if (index <
count - 1) {
335 bool operand = hitSegment->
operand();
341 int lastOpp = oppWind;
357 || (
abs(wind) ==
abs(lastWind)
358 && (
windSum ^ wind ^ lastWind) == spanSum));
361 int oSpanSum = span->
oppSum();
368 || (
abs(oppWind) ==
abs(lastOpp)
369 && (
oppSum ^ oppWind ^ lastOpp) == oSpanSum));
404 }
while (!
next->final() && (span =
next->upCast()));
413 if (testSegment->
done()) {
421 }
while ((testSegment = testSegment->
next()));
sk_bzero(glyphs, sizeof(glyphs))
static bool approximately_zero(double x)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static constexpr int32_t SK_MinS32
static int(*const CurveIntercept[])(const SkPoint[], SkScalar, SkScalar, double *)
bool approximately_equal(double x, double y)
bool between(double a, double b, double c)
bool roughly_equal(double x, double y)
bool approximately_between(double a, double b, double c)
int SkPathOpsVerbToPoints(SkPath::Verb verb)
static double get_t_guess(int tTry, int *dirOffset)
static bool hit_compare_x(const SkOpRayHit *a, const SkOpRayHit *b)
static bool ccw_dxdy(const SkDVector &v, SkOpRayDir dir)
static int xy_index(SkOpRayDir dir)
SkOpSpan * FindSortableTop(SkOpContourHead *contourHead)
static bool hit_compare_y(const SkOpRayHit *a, const SkOpRayHit *b)
static bool reverse_hit_compare_y(const SkOpRayHit *a, const SkOpRayHit *b)
static bool less_than(SkOpRayDir dir)
static SkScalar pt_xy(const SkPoint &pt, SkOpRayDir dir)
static double pt_dydx(const SkDVector &v, SkOpRayDir dir)
static bool sideways_overlap(const SkRect &rect, const SkPoint &pt, SkOpRayDir dir)
static bool reverse_hit_compare_x(const SkOpRayHit *a, const SkOpRayHit *b)
static SkScalar pt_yx(const SkPoint &pt, SkOpRayDir dir)
static double pt_dxdy(const SkDVector &v, SkOpRayDir dir)
static SkScalar rect_side(const SkRect &r, SkOpRayDir dir)
void swap(sk_sp< T > &a, sk_sp< T > &b)
void SkTQSort(T *begin, T *end, const C &lessThan)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
SkOpSpan * findSortableTop(SkOpContour *)
void rayCheck(const SkOpRayHit &base, SkOpRayDir dir, SkOpRayHit **hits, SkArenaAlloc *)
SkDVector dSlopeAtT(double mid) const
void dumpPtsInner(const char *prefix="seg") const
SkPath::Verb verb() const
SkOpSpan * findSortableTop(SkOpContour *)
SkPoint ptAtT(double mid) const
void rayCheck(const SkOpRayHit &base, SkOpRayDir dir, SkOpRayHit **hits, SkArenaAlloc *)
bool markAndChaseWinding(SkOpSpanBase *start, SkOpSpanBase *end, int winding, SkOpSpanBase **lastPtr)
static bool UseInnerWinding(int outerWinding, int innerWinding)
SkOpSpan * windingSpanAtT(double tHit)
SkOpSegment * next() const
SkOpContour * contour() const
SkOpGlobalState * globalState() const
SkOpSegment * segment() const
bool sortableTop(SkOpContour *)
SkOpSpanBase * next() const
void setWindSum(int windSum)
void setOppSum(int oppSum)
sk_sp< SkBlender > blender SkRect rect
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
SIN Vec< N, float > abs(const Vec< N, float > &x)
static bool ApproximatelyEqual(const SkPoint &a, const SkPoint &b)
static bool RoughlyEqual(const SkPoint &a, const SkPoint &b)
SkOpRayDir makeTestBase(SkOpSpan *span, double t)
SkScalar fLeft
smaller x-axis bounds