Chromium Code Reviews| Index: Source/platform/graphics/Path.cpp |
| diff --git a/Source/platform/graphics/Path.cpp b/Source/platform/graphics/Path.cpp |
| index 0201ccdc2d1728e69fd173d3e6766022d87e89ec..a62ddc6356404d5dfe34146ad17c59373197a85c 100644 |
| --- a/Source/platform/graphics/Path.cpp |
| +++ b/Source/platform/graphics/Path.cpp |
| @@ -68,7 +68,7 @@ bool Path::operator==(const Path& other) const |
| bool Path::contains(const FloatPoint& point, WindRule rule) const |
| { |
| - return SkPathContainsPoint(m_path, point, rule == RULE_NONZERO ? SkPath::kWinding_FillType : SkPath::kEvenOdd_FillType); |
| + return SkPathContainsPoint(m_path, point, static_cast<SkPath::FillType>(rule)); |
| } |
| bool Path::strokeContains(const FloatPoint& point, const StrokeData& strokeData) const |
| @@ -270,16 +270,12 @@ FloatPoint Path::currentPoint() const |
| WindRule Path::windRule() const |
| { |
| - return m_path.getFillType() == SkPath::kEvenOdd_FillType |
| - ? RULE_EVENODD |
| - : RULE_NONZERO; |
| + return static_cast<WindRule>(m_path.getFillType()); |
|
f(malita)
2014/08/07 15:40:17
Note that WindRule <-> FillType is not a bijection
|
| } |
| void Path::setWindRule(const WindRule rule) |
| { |
| - m_path.setFillType(rule == RULE_EVENODD |
| - ? SkPath::kEvenOdd_FillType |
| - : SkPath::kWinding_FillType); |
| + m_path.setFillType(static_cast<SkPath::FillType>(rule)); |
| } |
| void Path::moveTo(const FloatPoint& point) |