Lines Matching full:path
50 // .path(p1)
51 // .path(p2)
135 ElementsBuilder& path(const SkPath& path) {
136 return this->path(path, fLocalToDevice, fAA, fOp);
138 ElementsBuilder& path(const SkPath& path, GrAA aa, SkClipOp op) {
139 return this->path(path, fLocalToDevice, aa, op);
141 ElementsBuilder& path(const SkPath& path, const SkMatrix& m, GrAA aa, SkClipOp op) {
142 fElements->push_back({GrShape(path), m, op, aa});
290 // A path's points are never transformed, the only modification is fill type which does
293 return a.fShape.path().getGenerationID() == b.fShape.path().getGenerationID() ||
296 a.fShape.path() == b.fShape.path());
328 cs.clipPath(e.fLocalToDevice, e.fShape.path(), e.fAA, e.fOp);
761 // Path
762 run_test_case(r, TestCase::Build("device-path", kDeviceBounds)
764 .path(make_octagon(crossesDeviceEdge))
771 // Tests that a simplifiable path turns into a simpler element type
778 .actual().path(empty).finishElements()
784 .actual().path(point).finishElements()
792 .actual().path(line).finishElements()
796 // Rect path -> rect element
801 .actual().path(rectPath).finishElements()
806 // Oval path -> rrect element
810 .actual().path(ovalPath).finishElements()
815 // RRect path -> rrect element
820 .actual().path(rrectPath).finishElements()
860 // Same convex path, by ==
862 .actual().path(make_octagon(rect)).path(make_octagon(rect))
864 .expect().path(make_octagon(rect)).finishElements()
869 .path(make_octagon(rect)).path(make_octagon(rect))
871 .expect().localToDevice(lm).path(make_octagon(rect))
876 // Same complicated path by gen-id but not ==
877 SkPath path; // an hour glass
878 path.moveTo({0.f, 0.f});
879 path.lineTo({20.f, 20.f});
880 path.lineTo({0.f, 20.f});
881 path.lineTo({20.f, 0.f});
882 path.close();
884 run_test_case(r, TestCase::Build("same-path", kDeviceBounds)
885 .actual().path(path).path(path).path(path).finishElements()
886 .expect().path(path).finishElements()
889 run_test_case(r, TestCase::Build("same-local-path", kDeviceBounds)
891 .path(path).path(path).path(path).finishElements()
892 .expect().localToDevice(lm).path(path)
915 .actual().aa().intersect().path(inverseRectPath).finishElements()
922 .actual().aa().difference().path(inverseRectPath).finishElements()
927 // Inverse filled path + intersect -> diff path
928 run_test_case(r, TestCase::Build("inverse-path-intersect", kDeviceBounds)
929 .actual().aa().intersect().path(inverseComplexPath).finishElements()
930 .expect().aa().difference().path(complexPath).finishElements()
934 // Inverse filled path + difference -> int. path
935 run_test_case(r, TestCase::Build("inverse-path-difference", kDeviceBounds)
936 .actual().aa().difference().path(inverseComplexPath).finishElements()
937 .expect().aa().intersect().path(complexPath).finishElements()
958 .path(offscreenPath)
974 run_test_case(r, TestCase::Build("intersect-path", kDeviceBounds)
976 .path(offscreenPath)
986 .path(offscreenPath)
1002 run_test_case(r, TestCase::Build("difference-path", kDeviceBounds)
1004 .path(offscreenPath)
1071 // Tests that multiple path operations are all recorded, but not otherwise consolidated
1082 b.actual().path(make_octagon(d), GrAA::kNo, SkClipOp::kDifference);
1099 b.actual().path(make_octagon(d), GrAA::kYes, SkClipOp::kIntersect);
1199 // Path -> matrix is NOT applied
1200 run_test_case(r, TestCase::Build("st+path", kDeviceBounds)
1201 .actual().intersect().localToDevice(lm).path(make_octagon(rect))
1238 // Path -> matrix is NOT applied
1239 run_test_case(r, TestCase::Build("r90+path", kDeviceBounds)
1240 .actual().intersect().localToDevice(lm).path(make_octagon(rect))
1247 // Tests that a convex path element can contain a rect or round rect, allowing the stack to be
1256 // Intersect -> path element isn't kept
1258 .actual().aa().intersect().rect(rect).path(bigPath).finishElements()
1263 .actual().aa().intersect().rrect(rrect).path(bigPath).finishElements()
1268 // Difference -> path element is the only one left
1270 .actual().aa().difference().rect(rect).path(bigPath).finishElements()
1271 .expect().aa().difference().path(bigPath).finishElements()
1275 .actual().aa().difference().rrect(rrect).path(bigPath)
1277 .expect().aa().difference().path(bigPath).finishElements()
1281 // Intersect small shape + difference big path -> empty
1284 .difference().path(bigPath).finishElements()
1289 .difference().path(bigPath).finishElements()
1293 // Diff small shape + intersect big path -> both
1295 .actual().aa().intersect().path(bigPath).difference().rect(rect)
1301 .actual().aa().intersect().path(bigPath).difference().rrect(rrect)
1512 .actual().intersect().path(convex).finishElements()
1526 .actual().difference().path(convex).finishElements()
1542 .actual().aa().intersect().rect(rt).rrect(rr).path(p).finishElements()
1548 .actual().nonAA().difference().rect(rt).rrect(rr).path(p)
1557 .nonAA().difference().rrect(rr).path(p)
1566 .nonAA().difference().rect(rt).path(p)
1572 // I+D from path
1574 .actual().aa().intersect().path(p)
1577 .expect().aa().intersect().path(p).finishElements()
1636 b.actual().path(make_octagon(rects[i], kR, kR), GrAA::kYes, op);
1780 REPORTER_ASSERT(r, aaPathElement.fShape.isPath(), "Expected path element");
1781 REPORTER_ASSERT(r, aaPathElement.fShape.path() == nonAAPath, "Wrong path element");
1782 REPORTER_ASSERT(r, aaPathElement.fAA == GrAA::kYes, "Path element not promoted to AA");
1838 SkPath path = make_octagon(rect.makeOutset(5.f, 5.f), 5.f, 5.f);
1839 cs.clipPath(SkMatrix::I(), path, GrAA::kYes, SkClipOp::kIntersect);
1840 result = cs.preApply(path.getBounds(), GrAA::kNo);
2072 SkPath path;
2073 path.addCircle(x, y, radius);
2074 path.addCircle(x + radius / 2.f, y + radius / 2.f, radius);
2075 path.setFillType(SkPathFillType::kEvenOdd);
2078 cs->clipPath(SkMatrix::I(), path, GrAA::kYes, SkClipOp::kIntersect);