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

Unified Diff: Source/platform/graphics/Path.cpp

Issue 446543002: Removing WindRule.h completely (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated according to comments Created 6 years, 4 months 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 | « Source/platform/graphics/Path.h ('k') | Source/platform/graphics/WindRule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Path.cpp
diff --git a/Source/platform/graphics/Path.cpp b/Source/platform/graphics/Path.cpp
index 0201ccdc2d1728e69fd173d3e6766022d87e89ec..a58e7d310652706cea35ab6fe44d8479f959853d 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
@@ -277,9 +277,7 @@ WindRule Path::windRule() const
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)
« no previous file with comments | « Source/platform/graphics/Path.h ('k') | Source/platform/graphics/WindRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698