30 paint.setAntiAlias(
true);
47 for (
int y = 0;
y < 4; ++
y) {
48 for (
int x = 0;
x < 4; ++
x) {
49 bool nonWhite = (1 ==
y) && (1 ==
x);
64 { 3.0995476e+010f, 42.929779f },
65 { -3.0995163e+010f, 51.050385f },
66 { -3.0995157e+010f, 51.050392f },
67 { -3.0995134e+010f, 51.050400f },
92 { L,
CY }, { L - 10,
CY },
97 { L,
T }, { L - 10,
T - 10 },
98 { L,
B }, { L - 10,
B + 10 },
99 {
R,
T }, {
R + 10,
T - 10 },
100 {
R,
B }, {
R + 10,
B + 10 },
102 for (i = 0; i < std::size(
gEmpty); i += 2) {
105 SkDebugf(
"----- [%zu] %g %g -> %g %g\n",
106 i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
111 static const SkPoint gFull[] = {
116 { L,
CY }, {
R,
CY },
118 {
CX,
T }, { L,
CY },
119 { L,
CY }, {
CX,
B },
127 for (i = 0; i < std::size(gFull); i += 2) {
129 if (!valid || 0 != memcmp(&gFull[i], dst,
sizeof(dst))) {
130 SkDebugf(
"++++ [%zu] %g %g -> %g %g\n",
131 i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
136 static const SkPoint gPartial[] = {
142 { L,
T - 10 }, { L,
B + 10 }, { L,
T }, { L,
B },
143 {
R,
T - 10 }, {
R,
B + 10 }, {
R,
T }, {
R,
B },
144 { L - 10,
T }, {
R + 10,
T }, { L,
T }, {
R,
T },
145 { L - 10,
B }, {
R + 10,
B }, { L,
B }, {
R,
B },
147 for (i = 0; i < std::size(gPartial); i += 4) {
149 if (!valid || 0 != memcmp(&gPartial[i+2], dst,
sizeof(dst))) {
150 SkDebugf(
"++++ [%zu] %g %g -> %g %g\n",
151 i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
154 !memcmp(&gPartial[i+2], dst,
sizeof(dst)));
166 SkPoint src[] = {{ -5.77698802E+17f, -1.81758057E+23f}, {38127, 2}};
168 SkRect clip = { -32767, -32767, 32767, 32767 };
static void test_edgeclipper()
static void test_hairclipping(skiatest::Reporter *reporter)
static void test_intersectline(skiatest::Reporter *reporter)
constexpr SkColor SK_ColorWHITE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static SkPathRef * gEmpty
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
#define DEF_TEST(name, reporter)
#define REPORTER_ASSERT(r, cond,...)
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
void eraseColor(SkColor4f) const
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
bool clipCubic(const SkPoint pts[4], const SkRect &clip)
static bool IntersectLine(const SkPoint src[2], const SkRect &clip, SkPoint dst[2])
static constexpr SkRect MakeWH(float w, float h)