Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: src/core/SkCubicClipper.cpp

Issue 1517883002: fix SkPath::contains() for points on edge, conics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkCubicClipper.h ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCubicClipper.cpp
diff --git a/src/core/SkCubicClipper.cpp b/src/core/SkCubicClipper.cpp
index 81ef18de7afa5e441ff359a804230d3ea12d410a..469fc222e336c3672eef98c94577b67ecdf526c5 100644
--- a/src/core/SkCubicClipper.cpp
+++ b/src/core/SkCubicClipper.cpp
@@ -20,7 +20,7 @@ void SkCubicClipper::setClip(const SkIRect& clip) {
}
-static bool chopMonoCubicAtY(SkPoint pts[4], SkScalar y, SkScalar* t) {
+bool SkCubicClipper::ChopMonoAtY(const SkPoint pts[4], SkScalar y, SkScalar* t) {
SkScalar ycrv[4];
ycrv[0] = pts[0].fY - y;
ycrv[1] = pts[1].fY - y;
@@ -131,7 +131,7 @@ bool SkCubicClipper::clipCubic(const SkPoint srcPts[4], SkPoint dst[4]) {
SkPoint tmp[7]; // for SkChopCubicAt
// are we partially above
- if (dst[0].fY < ctop && chopMonoCubicAtY(dst, ctop, &t)) {
+ if (dst[0].fY < ctop && ChopMonoAtY(dst, ctop, &t)) {
SkChopCubicAt(dst, tmp, t);
dst[0] = tmp[3];
dst[1] = tmp[4];
@@ -139,7 +139,7 @@ bool SkCubicClipper::clipCubic(const SkPoint srcPts[4], SkPoint dst[4]) {
}
// are we partially below
- if (dst[3].fY > cbot && chopMonoCubicAtY(dst, cbot, &t)) {
+ if (dst[3].fY > cbot && ChopMonoAtY(dst, cbot, &t)) {
SkChopCubicAt(dst, tmp, t);
dst[1] = tmp[1];
dst[2] = tmp[2];
« no previous file with comments | « src/core/SkCubicClipper.h ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698