Chromium Code Reviews| Index: experimental/Intersection/SkAntiEdge.cpp |
| diff --git a/experimental/Intersection/SkAntiEdge.cpp b/experimental/Intersection/SkAntiEdge.cpp |
| index 0aa159c53e3b2822135bc881a31c8e01123c2fe5..2cce960e52dd4f613666aa685e6fb0200799516b 100644 |
| --- a/experimental/Intersection/SkAntiEdge.cpp |
| +++ b/experimental/Intersection/SkAntiEdge.cpp |
| @@ -7,6 +7,14 @@ |
| #include "SkAntiEdge.h" |
| #include "SkPoint.h" |
| +/** Returns the signed fraction of a SkFixed |
| + */ |
| +static inline SkFixed SkFixedFraction(SkFixed x) |
| +{ |
| + SkFixed mask = x >> 31 << 16; |
| + return (x & 0xFFFF) | mask; |
| +} |
|
caryclark
2013/12/19 13:56:57
alternatives --
- let experimental/Intersection
|
| + |
| void SkAntiEdge::pointOnLine(SkFixed x, SkFixed y) { |
| float x0 = SkFixedToFloat(x); |
| float y0 = SkFixedToFloat(y); |