#include "src/core/SkEdgeClipper.h"
#include "include/core/SkRect.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkMacros.h"
#include "src/core/SkGeometry.h"
#include "src/core/SkLineClipper.h"
#include "src/core/SkPathPriv.h"
#include <algorithm>
#include <cstring>
static bool quick_reject(const SkRect& bounds, const SkRect& clip) { … }
static inline void clamp_le(SkScalar& value, SkScalar max) { … }
static inline void clamp_ge(SkScalar& value, SkScalar min) { … }
static bool sort_increasing_Y(SkPoint dst[], const SkPoint src[], int count) { … }
bool SkEdgeClipper::clipLine(SkPoint p0, SkPoint p1, const SkRect& clip) { … }
static bool chopMonoQuadAt(SkScalar c0, SkScalar c1, SkScalar c2,
SkScalar target, SkScalar* t) { … }
static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { … }
static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { … }
static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { … }
void SkEdgeClipper::clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip) { … }
bool SkEdgeClipper::clipQuad(const SkPoint srcPts[3], const SkRect& clip) { … }
static SkScalar mono_cubic_closestT(const SkScalar src[], SkScalar x) { … }
static void chop_mono_cubic_at_y(SkPoint src[4], SkScalar y, SkPoint dst[7]) { … }
static void chop_cubic_in_Y(SkPoint pts[4], const SkRect& clip) { … }
static void chop_mono_cubic_at_x(SkPoint src[4], SkScalar x, SkPoint dst[7]) { … }
void SkEdgeClipper::clipMonoCubic(const SkPoint src[4], const SkRect& clip) { … }
static SkRect compute_cubic_bounds(const SkPoint pts[4]) { … }
static bool too_big_for_reliable_float_math(const SkRect& r) { … }
bool SkEdgeClipper::clipCubic(const SkPoint srcPts[4], const SkRect& clip) { … }
void SkEdgeClipper::appendLine(SkPoint p0, SkPoint p1) { … }
void SkEdgeClipper::appendVLine(SkScalar x, SkScalar y0, SkScalar y1, bool reverse) { … }
void SkEdgeClipper::appendQuad(const SkPoint pts[3], bool reverse) { … }
void SkEdgeClipper::appendCubic(const SkPoint pts[4], bool reverse) { … }
SkPath::Verb SkEdgeClipper::next(SkPoint pts[]) { … }
#ifdef SK_DEBUG
static void assert_monotonic(const SkScalar coord[], int count) { … }
void sk_assert_monotonic_y(const SkPoint pts[], int count) { … }
void sk_assert_monotonic_x(const SkPoint pts[], int count) { … }
#endif
void SkEdgeClipper::ClipPath(const SkPath& path, const SkRect& clip, bool canCullToTheRight,
void (*consume)(SkEdgeClipper*, bool newCtr, void* ctx), void* ctx) { … }